RMI, sockets and NAT

Apparently a RMI server in a LAN with NAT cannot be seen outside of LAN. Thus, it is possible to manage polling client in LAN and server outside of LAN, but I cannot make bidirectional RMI connection (where server could invoke client's methods, that is), right? Now, is there same kind of a problem with sockets?
Thanks,
Yuzaa

Yuzza,
There is no problem with sockets, NAT is causing the problem. Happily, there is an easy work-around.
When you create a remote object, you can specify two additional arguments, an RMIServerSocketFactory, and an RMIClientSocketFactory.
The RMIClientSocketFactory is an interface which defines one method:
Socket createSocket(String host, int port);
Your RMI client gets an object implementing this interface from your server, to connect back to it. Currently your server gives your client a default RMIClientSocketFactory object. This object will let the client connect to the address inside your NAT subnet, this will not work with NAT. That is the problem.
How can you fix this? Simply implement your own RMIClientSocketFactory, something like this:   class YuzzaCSF implements RMIClientSocketFactory, Serializable {
      final String host;
      YuzzaCSF(String host) { this.host = host; }
      public Socket createSocket(String host, int port) throws IOException {
         return new Socket(this.host, port);
   }Instantiate one using your server's address from outside NAT, and it will force the client to connect correctly.
This is the core of the solution, there are a few more small steps, but I think you can figure out the rest from here. It would not be as satisfying if I did it all for you :-)
John

Similar Messages

  • RMI and NAT(windows) ?

    Hello world,
    I've got a server and client working fine on internet excepted when the client is using a share internet connection with NAT. The important thing is that everythings works fine as long as I make simple client to server connections, but I've got a
    java.net.ConnectException: Operation timed out: connect
    java.net.ConnectException: Operation timed out: connect
    Exception when the server try a callback on the client.
    I have a limited idea of how NAT ( more precisely the windows NAT) do the job, and it's clear that it is not possible to acces to a server located in a local private network behind a NAT server. But then how does ICQ fonctions ?
    If anybody had any idea about this mess, I would be interested.
    Thanks
    Benoit

    ICQ, AOL, and Morpheus all work through a NAT because they keep a socket connection alive.
    i dont believe RMI does this.
    therefore, the RMI packets go out through the NAT filter to the remote RMI server and they get sent back to the outside IP address and stop dead. they know nothing about the internal IP because RMI sends the response back on a random port number in the 3000 or so range and it might be really hard for you to map that in your NAT filter so that it knows which machine to send port 3xxx to inside of your NAT.
    i hope i am making sense.
    try using netstat or ethereal to watch how your RMI traffic talks.

  • Conflict between socket and RMI

    Hi
    I wrote a program in client-server using socket and it was fine. I also wrote a client-server program using RMI. Fine as well. But after I connected the client-server using socket (open socket, send-receive messages, close socket), then use RMI. I got java.rmi.NotBoundException.
    Would anyone have a look and provide your feedback please? Thanks.
    big J
    *****************this is Server.java ***************************
    package single;
    import java.io.*;
    import java.rmi.Naming;
    import java.rmi.RemoteException;
    import java.net.*;
    import java.rmi.*;
    public class Server
    extends Thread {
    public static final int SOCKETPORT = 5555;
    private String serverName;
    public Server() throws IOException {
    System.out.println("*** socket opened ***");
    serverName = new String("localhost");
    ServerSocket serverSocket = new ServerSocket(SOCKETPORT);
    Socket socket = serverSocket.accept();
    InputStream is = socket.getInputStream();
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(is));
    System.out.println(bufferedReader.readLine());
    OutputStream os = socket.getOutputStream();
    PrintWriter printWriter = new PrintWriter(new OutputStreamWriter(os), true);
    printWriter.println("from server");
    os.close();
    is.close();
    socket.close();
    System.out.println("*** socket closed ***");
    public void runServer() {
    System.out.println("*** start of run():RMI ***");
    System.setSecurityManager(new SecurityManager());
    try {
    RMIInterfaceImpl rMIInterfaceImpl = new RMIInterfaceImpl();
    Naming.bind("//" + serverName + ":9999/RMIInterface", rMIInterfaceImpl);
    catch (RemoteException ex) {
    catch (MalformedURLException ex) {
    catch (AlreadyBoundException ex) {
    System.out.println("*** end of run():RMI ***");
    public static void main(String args[]) throws Exception {
    Server server = new Server();
    server.runServer();
    ******************this is Client.java **************************
    package single;
    import java.io.*;
    import java.net.*;
    import java.rmi.Naming;
    public class Client {
    private String serverName;
    private final static int SOCKETPORT = 5555;
    public Client() throws IOException {
    serverName = new String("localhost");
    Socket socket = new Socket(serverName, SOCKETPORT);
    OutputStream os = socket.getOutputStream();
    PrintWriter printWriter=new PrintWriter(os, true);
    printWriter.println("from client");
    InputStream is = socket.getInputStream();
    BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(is));
    System.out.println(bufferedReader.readLine());
    is.close();
    os.close();
    socket.close();
    public void runClient() throws Exception {
    System.out.println("*** start of runClient():RMI ***");
    System.setSecurityManager(new SecurityManager());
    RMIInterface rMIInterfaceImpl = (RMIInterface) Naming.lookup(
    "//" + serverName + ":9999/RMIInterface");
    String str = rMIInterfaceImpl.print();
    System.out.println(str);
    rMIInterfaceImpl.serverSide();
    System.out.println("*** end of runClient():RMI ***");
    public static void main(String args[]) throws Exception {
    Client client = new Client();
    client.runClient();
    ***************** this is RMIInterface.java ***********************
    package single;
    import java.rmi.Remote;
    import java.rmi.RemoteException;
    interface RMIInterface
    extends Remote {
    String print() throws RemoteException;
    void serverSide() throws RemoteException;
    ********************* this is RMIInterfaceImpl.java ***************
    package single;
    import java.rmi.RemoteException;
    import java.rmi.server.UnicastRemoteObject;
    public class RMIInterfaceImpl
    extends UnicastRemoteObject
    implements RMIInterface {
    public RMIInterfaceImpl() throws RemoteException {}
    public String print() {
    return new String("hello world");
    public void serverSide(){
    System.out.println("this should appear in serverside");

    I think you have a timing problem between your client and server. As soon as your client and server programs have finished their socket communication, they will both do their "runServer"/"runClient" methods. If the client attempts to lookup the server before the server has registered itself via Naming.bind(), I would expect that's why you're getting a NotBoundException in the client.
    You probably wouldn't use the design of your test client/server for something significant, but a quick and dirty way to make this work might be to have the client call Thread.sleep() for a few seconds before trying to do the lookup.

  • Making choice between socket and RMI

    I never use RMI, but i am familiar to socket programming. i want to write an online game, I know that use RMI will easy than use socket, could anyone tell me what factors will affect the choice between using socket and RMI if don't consider which one i am familiar ?
    thanks
    jacky

    I would consider the amount of traffic your online game is going to be generating. Obviously, if the traffic is the bottleneck, you will want to optimize it as much as possible.
    I can see that if you are familiar with sockets and socket programming, where this is very appealing because after all, you can't get much faster than raw sockets. Also, the Java APIs around sockets are much easier than the equivalent BSD Socket C/C++ libraries.
    Still, RMI has much more to offer.
    o It is relatively easy to set up a connection
    o exceptions will be thrown when problems occur
    o serializing classes is so easy it's laughable
    o If performance becomes an issue, you can (as the previous poster suggests) create your own custom socket factory which optimizes the used bandwidth. Options here include compression if you have the CPU cycles to spare.
    o There are mechanisms in place for working RMI over firewalls
    Many of the things that RMI offers, you might find yourself re-writing in your own socket-based API. Personally, I would choose RMI.

  • JSP+RMI = socket leak (with tomcat 5)

    Tried this in the RMI forum, no answer, so let's try here...
    When I use RMI from a JSP servlet, I have a "socket leak" problem. When I create an RMI unicast remote object, the RMI library (of course) opens up a server/listening socket. In a normal application, I can unbind the remote object, but then the next object I create will re-use the same server socket, so the server socket never closes, but only one is ever created, so it's not a big deal.
    Now for the problem: When I use the Tomcat manager to unload my webapp, the socket is still there. Sure, fine. But then when I reload the webapp, instead of re-using the same server socket, a new one is created! Furthermore, if I try to use explicit port numbers to force the server socket to be reused, I get "port already in use" errors. It seems that somehow tomcat won't let RMI recycle its entry points in between webapp restarts. Does anybody know how I can either:
    a) Get RMI to re-use the same ports
    b) Get RMI to completely shut down its ports when the webapp is unloaded (this would be even better)
    Thanks. It's irritating to see 10 open but unused server sockets on my system if I have to restart the webapp.

    Ah, I left out something: I construct the RMI object a servlet context listener in the contextInitialized() call, and I call UnicastRemoteObject.unexportObject() in the contextDestroyed() call. I added log messages, I am definitely correctly unbinding the object. The problem isn't that it is failing to be unbound - the problem is that the RMI system is refusing to reuse the same port after it is unbound. After unbinding, the port is still open, but it is never reused, each time I re-instantiate the remote object, it is making a new server socket and leaving the old one sitting open.
    As for why I'm doing this, it is a bit like a homegrown EJB, but just so small that this was the simplest way. I have a largish non-web based application, then I have a few JSP pages that do database queries to provide information to browsers. The JSP pages are not at all central to the application though, and just show some database info. The JSP system caches some SQL data, and I use RMI to tell JSP when to flush cached data due to database changes. It's all very simple, and it works fantastic, except for the issue that every time I reload the webapp I leave these server sockets hanging open. Even that is just an irritation, I don't reload much except when I'm testing, but it's a big enough irritation that I would really like to fix it.

  • Need help on Socket and HTTP

    Hi,
    I need help ... please ... I have to use socket and not HTTPURLConnection
    I try to connect with a socket to a web server (apache2) and request one page but two times.
    The first time it works well but the second one it doesn't ... I get a null message.
    Why ?
    Does the server close the socket as soon as the page is sent ?
    If it doesn't how I can continue sending and receiving data on the same socket ?
    Here is my code:
    package test;
    import java.net.*;
    import java.io.*;
    public class Test
    private String laRequete = new String(
    "POST http://localhost:5577/Test/ HTTP/1.0\r\n"+
    "Host:localhost:5577\r\n"+
    "\r\n");
    PrintWriter laSortie;
    BufferedReader lEntree;
    Socket laSocketTCP;
    public Test()
    String tmp;
    try
    laSocketTCP = new Socket("localhost", 5577);
    laSortie = new PrintWriter(laSocketTCP.getOutputStream());
    lEntree = new BufferedReader(new InputStreamReader(laSocketTCP.getInputStream()));
    laSortie.println(laRequete);
    laSortie.flush();
    // Premier essai OK
    System.out.println(lEntree.readLine());
    while((tmp = lEntree.readLine()) != null)
    System.out.println(tmp);
    // Second essai => Not OK
    laSortie.println(laRequete);
    laSortie.flush();
    System.out.println(lEntree.readLine());
    while((tmp = lEntree.readLine()) != null)
    System.out.println(tmp);
    catch (Exception e)
    e.printStackTrace();
    public static void main(String args[])
    Test tp = new Test();
    Here is the result of the execution
    HTTP/1.1 200 OK
    Date: Wed, 29 Sep 2004 08:35:35 GMT
    Server: Apache/2.0.51 (Win32)
    Last-Modified: Wed, 29 Sep 2004 08:27:57 GMT
    ETag: "23a46-9a-56c93f9a"
    Accept-Ranges: bytes
    Content-Length: 154
    Connection: close
    Content-Type: text/html; charset=ISO-8859-1
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    <HEAD>
    <TITLE> Index Test 1 </TITLE>
    </HEAD>
    <BODY>
    Test 1
    </BODY>
    </HTML>
    null
    Thanks, bye.

    Send an HTTP 1.1 request instead of a 1.0 request.
    HTTP 1.0 does not support keeping the connection open, so yes, the server closes the connection.
    Dave.

  • Cisco ASA Site to Site IPSEC VPN and NAT question

    Hi Folks,
    I have a question regarding both Site to Site IPSEC VPN and NAT. Basically what I want to achieve is to do the following:
    ASA2  is at HQ and ASA1 is a remote site. I have no problem setting up a  static static Site to Site IPSEC VPN between sites. Hosts residing at  10.1.0.0/16 are able to communicate with hosts at 192.168.1.0/24, but  what i want is to setup NAT with IPSEC VPN so that host at 10.1.0.0/16  will communicate with hosts at 192.168.1.0/24 with translated addresses
    Just an example:
    Host N2 (10.1.0.1/16) will communicate with host N1 192.168.1.5 with  destination lets say 10.23.1.5 not 192.168.1.5 (Notice the last octet  should be the same in this case .5)
    The same  translation for the rest of the communication (Host N2 pings host N3  destination ip 10.23.1.6 not 192.168.1.6. again last octet is the same)
    It sounds a bit confusing for me but i have seen this type of setup  before when I worked for managed service provider where we had  connection to our clients (Site to Site Ipsec VPN with NAT, not sure how  it was setup)
    Basically we were communicating  with client hosts over site to site VPN but their real addresses were  hidden and we were using translated address as mentioned above  10.23.1.0/24 instead of (real) 192.168.1.0/24, last octet should be the  same.
    Appreciate if someone can shed some light on it.

    Hi,
    Ok so were going with the older NAT configuration format
    To me it seems you could do the following:
    Configure the ASA1 with Static Policy NAT 
    access-list L2LVPN-POLICYNAT permit ip 192.168.1.0 255.255.255.0 10.1.0.0 255.255.0.0
    static (inside,outside) 10.23.1.0 access-list L2LVPN-POLICYNAT
    Because the above is a Static Policy NAT it means that the translation will only be done when the destination network is 10.1.0.0/16
    If you for example have a basic PAT configuration for inside -> outside traffic, the above NAT configuration and the actual PAT configuration wont interfere with eachother
    On ASA2 side you can normally configure NAT0 / NAT Exemption for the 10.1.0.0/16 network 
    access-list INSIDE-NONAT remark L2LVPN NONAT
    access-list INSIDE-NONAT permit ip 10.1.0.0 255.255.0.0 10.23.1.0 255.255.255.0
    nat (inside) 0 access-list INSIDE-NONAT
    You will have to take into consideration that your access-list defining the L2L-VPN encrypted traffic must reflect the new NAT network 
    ASA1: access-list L2LVPN-ENCRYPTIONDOMAIN permit ip 10.23.1.0 255.255.255.0 10.1.0.0 255.255.0.0
    ASA2: access-list L2LVPN-ENCRYPTIONDOMAIN permit ip 10.1.0.0 255.255.0.0 10.23.1.0 255.255.255.0
    I could test this setup tomorrow at work but let me know if it works out.
    Please rate if it was helpful
    - Jouni

  • ASA5505 SOHO public ip range and nat head ache

    Hello
    Can anyone shed some ligh on a problem im having. We have setup a ASA 5505 with an ISP called Zen that allocates you a subnet of public ip addresses. i have sucessfully  setup the asa to access the internet using nat on the outside interface. we would like to use the other ip addresses in the range for other services but i cannot think how i can do this/configure this.
    LAN > ASA5505 > VDSL Modem > ISP
    the range they have given us is
    Number of IP addresses: 8
    IP addresses: XX.XX.XXX.40 - XX.XX.XXX.47
    Subnet mask: 255.255.255.248
    Subnet in slash notation: XX.XX.XXX.40 /29
    Network address: XX.XX.XXX.40
    XX.XX.XXX.41
    XX.XX.XXX.42
    XX.XX.XXX.43
    XX.XX.XXX.44
    XX.XX.XXX.45
    XX.XX.XXX.46 Router
    Broadcast address: XX.XX.XXX.47
    Router address: XX.XX.XXX.46
    i have setup XX.XX.XXX.46 on the otside interface and hosts inside can access the net and nat from the internet to internal devices all work.
    we have a vdsl modem connected to the outside interface and using PPPoE we dynamically get the XX.XX.XXX.46/32 address.
    Is there any way i can use the other spare addresses? i do see how i can use them. i have done a lot of browsing and the only way i see that other people have been able to do this is using a layer3 device and using ip unnumber of the external int point to a loopback,
    any info or advice would be gratefully received.
    regards
    C.

    Hello
    the version is Cisco Adaptive Security Appliance Software Version 9.2(2)4
    debugging icmp i see pings to the .46 address however i see no pings/traffic received on the asa for the other addresses. how does zen know to route the xx.xx.xx.41 to .45 ip addresses to the firewall using the .46 address?
    the nat rules i have are
    nat (Vlan200_Int,Outside_Dirty_Int) dynamic interface < this works for lan access to the internet
    nat (Vlan200_Int,Outside_Dirty_Int) static xx.xx.xx.45 no-proxy-arp service tcp www 65100
    nat (Vlan200_Int,Outside_Dirty_Int) static xx.xx.xx.45 no-proxy-arp service tcp https 65101
    access-list Outside_Dirty_Network_access_in extended permit tcp object Click_PC object ESXi object-group DM_INLINE_TCP_7
    object-group service DM_INLINE_TCP_7 tcp
    port-object eq 902
    port-object eq www
    port-object eq https
    thanks for the help

  • Internal DNS server and NAT routing issue.

    Hi -- I am not terribly experienced with DNS and I am running into an issue that I can't seem to resolve. My company.com DNS information is hosted by an outside ISP for email, web, etc... but I have configured an A record there to point to the public IP to my mac os x server (server.company.com).
    We have a cisco router configured with one to one NAT from the public IP to the internal IP for our server in a 192.168.15.x subnet. The same router is running DHCP and and NAT on that subnet under a different public IP provided by our ISP.
    Our server is running DNS with recursion and has a "company.private" zone set up for internal services and machine names. Thus, the server is accessible via "server.company.com" from the outside and "server.company.private" from the private LAN.
    The problem is that I would like to be able to access some services simply via "server.company.com" both inside and outside the private network. Now, accessing the "server.company.com" services from the private lan does not work because the name resolves to the external IP and the external IP cannot be used internally due to NAT.
    Is there a way to configure my internal DNS server to respond with the appropriate private address when receiving a query only to "server.company.com" and forward requests on for anything else on "company.com"?
    I know that I could manually duplicate all entries for our domain from my ISP and host the same entries for internal clients, but it would be much easier to only have our server handle requests for itself. The server is running OS X Server 10.4.11.
    Thanks

    Is there a way to configure my internal DNS server to respond with the appropriate private address when receiving a query only to "server.company.com" and forward requests on for anything else on "company.com"?
    Ordinarily, no. Once your server thinks it is responsible for a zone (e.g. company.com) then it will answer all queries for that domain and never pass them upstream. Therefore you'd have to replicate all the zone data, including all the public records, and maintain them both.
    The one possible exception to this (I haven't tried) is to create a zone for server.company.com that has your internal address. In theory (like I said, I haven't tried this), the server should respond to 'server.company.com' lookups with its own zone data and defer all other lookups (including other company.com names since they're not in a zone it controls). Might be worth trying.

  • Apple Airport Extreme Base Station for PPPoE, DHCP and NAT with ActionTec DSL modem

    I just spent several hours trying to track down proper instructions for setting up my Apple AEBS to do the PPPoE, DHCP and NAT while connected to an ActionTec M1000 (no wireless module).  It turns out my initial set ups on both devices were correct, but that the order for rebooting and reconnecting the two devices is critical.  All of the threads I found on this forum and on many others suggested this was not possible, but it is.  What I don't yet know is whether it is the best method for running my home network DSL connection to my ISP (CenturyLink). 
    The instructions I found that worked come courtesy of Brandon Konkle's blog and are both simple and clear:  http://brandon.konkle.us/post/19637529637/centurylink-actiontec-q1000-airport-ex treme-bridge
    The proper settings for the ActionTec DSL Modem can be found under Advanced Setup/IP Adressing/WAN IP Address
    Click RFC 1483 Transparent Bridging then click on Apply.
    (see also http://qwest.centurylink.com/internethelp/modems/m1000/pdf/M1000_BRIDGE.pdf )
    To reduce time, do this BEFORE you reset your AEBS then set the AEBS so that you don't have to wait for the AEBS to reboot. 
    In contrast to what Brandon described for the Q1000 modem, my AEBS never reconnected to the modem (he describes his as getting an IP from his ISP, then dropping it then getting another over and over - mine never got an IP).  Once you have reset both devices as described, the critical steps I have not found described elsewhere were:
    1.  Disconnect the power from both the modem and the Airport Extreme.
    2.  Disconnect the Ethernet cable between the two devices
    3.  Restore power to the 2 devices and allow them to fully reboot.  For the ActionTec M1000, this is indicated when the lights stop blinking.  (Note that the Internet light will NOT be lit in this instance since the modem is acting only as a bridge.  You will NOT have an Internet connection until the AEBS is reconnected.)  The AEBS will be blinking yellow.
    4.  Reconnect the Ethernet cable between the devices (make sure on the M1000 that you are using the connector with the circle icon over it, not the arrow icon).
    Within about 60 seconds, the AEBS light went to steady green and the connection to the Internet was restored.
    Now I have to see if this is a more stable configuration than the flaky one I had before while using the AEBS as a bridge and the M1000 to do everything. 
    Does anyone think or know if it will make a difference?
    Message was edited by: Bud Shaw

    Now I have to see if this is a more stable configuration than the flaky one I had before while using the AEBS as a bridge and the M1000 to do everything.
    Does anyone think or know if it will make a difference?
    No one can accurately predict in advance what the actual results might be. I've tried both ways with different products and cannot say that one method is better than the other.  What works is best.
    In theory, it is preferable to have the modem provide the PPPoE connection service since it is the device connected directly to the Internet.
    In practice, results vary depending on the service provider, products used, phase of the moon, alignment of the planets, etc.

  • How to set up DHCP and NAT for QNAP NAS MyCloud service?

    I have an Apple AirPort Extreme Base Station (AEBS) attached to my DSL model (no router in the modem).  My QNAP NAS is attached via ethernet to the QNAP NAS.  My iMac (running AirPort Utility 6.x) is connected to the AEBS via wifi.
    I've found several folks who've tried this (and apparently succeeded) but I'm a networking novice and am having trouble making this work.  What I did was to go into the AirPort utility and in the networking section configure "DHCP and NAT" and then called out the static IP and MAC address of the QNAP NAS (as well as the ports I'd like to remain open).  However, when I did this and applied the changes, my iMac (connected to the AEBS via wifi) could no longer see the AEBS, which then required me to reset the AEBS, re-configure it back to the previous known good conifiguration and start over.  After about 5 cycles of this I gave up.
    So, what am I doing wrong here?  Do I need to go in and configure every device that is going to access the AEBS as static and call out each device's IP and MAC address? (hopefully not, that'd be a major PITA).
    Help.  Anyone?

    When I run diagnostics with the QNAP, here is the reply I get (IPs redacted):
    ------ NAT PMP Diagnostics ------
    initnatpmp() returned 0 (SUCCESS)
    using gateway : xx.x.x.x
    sendpublicaddressrequest returned 2 (SUCCESS)
    readnatpmpresponseorretry returned 0 (OK)
    Public IP address : 192.168.xxx.xxx
    epoch = 2621
    closenatpmp() returned 0 (SUCCESS)
    ------ UPnP Diagnostics ------
    upnpc : miniupnpc library test client. (c) 2006-2011 Thomas Bernard
    Go to http://miniupnp.free.fr/ or http://miniupnp.tuxfamily.org/
    for more information.
    List of UPNP devices found on the network :
    desc: http://xx.x.x.x:60606/8CC1212D0C6D/Server0/ddd
    st: upnp:rootdevice
    desc: http://xx.x.x.x:9000/TMSDeviceDescription.xml
    st: upnp:rootdevice
    desc: http://xx.x.x.xx:55000/nrc/ddd.xml
    st: upnp:rootdevice
    desc: http://xx.x.x.xx:55000/dmr/ddd.xml
    st: upnp:rootdevice
    desc: http://xx.x.x.xx:49152/4/description.xml
    st: upnp:rootdevice
    desc: http://xx.x.x.xx:49152/2/description.xml
    st: upnp:rootdevice
    desc: http://xx.x.x.xx:49152/0/description.xml
    st: upnp:rootdevice
    desc: http://xx.x.x.xxx:8200/rootDesc.xml
    st: upnp:rootdevice
    desc: http://xx.x.x.xxx:49152/gatedesc.xml
    st: upnp:rootdevice
    desc: http://xx.x.x.xxx:49153/gatedesc.xml
    st: upnp:rootdevice
    desc: http://xx.x.x.xxx:49155/gatedesc.xml
    st: upnp:rootdevice
    desc: http://xx.x.x.xxx:9000/TMSDeviceDescription.xml
    st: upnp:rootdevice
    UPnP device found. Is it an IGD ? : http://xx.x.x.x:60606/
    Trying to continue anyway
    Local LAN ip address : xx.x.x.xxx
    GetConnectionTypeInfo failed.
    Status : , uptime=3217870016s, LastConnectionError :
      Time started : Wed Mar 13 17:04:03 1912
    MaxBitRateDown : 7 bps   MaxBitRateUp 0 bps
    GetExternalIPAddress() returned -3
    GetExternalIPAddress failed.
    GetGenericPortMappingEntry() returned -3 ((null))

  • What is the recommended way of connecting to repository out of WebDAV, RMI, JNDI and JCA connector ?

    What is the recommended way of connecting to repository out of WebDAV, RMI, JNDI, and JCA connector possibilities provided by CQ 5.5?

    Hi dp_adusumalli,
    I recognized your list of ~8 questions you posted at around the same time, as I received that same list in our customer implementation from Arif A., from the India team, visiting San Jose. :-)
    I provided him feedback for most of the questions, so please check back with Arif for that info.
    For this particular question, can you provide specifics for the types of interactions you are interested in?
    Understanding the kinds of things you need to achieve will help determine which of the CQ/CRX interfaces is best suited for the task(s).
    I've collated a few points on this subject on this page:
    Manipulating the Adobe WEM/CQ JCR
    Regards,
    Paul

  • Problem with the socket and the standard output stream

    Hy, I have a little problem with a socket program. It has the server and the client. The problem is that the client at one point in the program, cannot print messages in the console.
    My program does the next: the server waits connections, when a client connects to it, the server gets outputstream to the socket and writes two strings on it. Meanwhile, the client gets the inputstream to the socket and reads on it with a loop the two strings written by the server . The strings are printed by the client in the console. The problem starts here; once the read strings are printed ,I mean, after the loop, there are other System.out.println in the client but the console doesnt print anything . It curious that only when I comment on the server code the line that says: "br.readLine()" just before the catch, the client prints all the System.out.println after the loop but why?
    Here is the code:
    Server code:
    public class MyServerSocket {
    public MyServerSocket() {
    try{
    ServerSocket server= new ServerSocket(2000);
    System.out.println("servidor iniciado");
    Socket client=server.accept();
    System.out.println("Client connected");
    OutputStream os=client.getOutputStream();
    PrintWriter pw= new PrintWriter(os);
    String cadena1="cadena1";
    String cadena2="cadena2";
    pw.println(cadena1);
    pw.println(cadena2);
    pw.flush();
    InputStream is=client.getInputStream();
    InputStreamReader isr= new InputStreamReader(is);
    BufferedReader br= new BufferedReader(isr);
    br.readLine(); //If a comment this line, the client prints after the loop, all the System.out....
    catch (IOException e) {
    // TODO: handle exception
    public static void main(String[] args) {
    new MyServerSocket
    Client code:
    public class MyClientSocket {
    public MyClientSocket () {
    try{
    Socket client= new Socket("localhost",2000);
    InputStream is=client.getInputStream();
    InputStreamReader isr= new InputStreamReader(is);
    BufferedReader br= new BufferedReader(isr);
    String read;
    while((read=br.readLine())!=null){
    System.out.println(read);
    //These messages are not printed unless I comment the line I talked about in the server code
    System.out.println("leido");
    System.out.println("hola");
    }catch (IOException e) {
    public static void main(String[] args) {
    new MyClientSocket
    }

    You are right but with this program the loop ends. As you see, the first class, the Server, writes to the socket one text file. The second class, the client, reads the text file in his socket written by the server and writes it to a file in his machine.
    NOTE: The loop in the client ends and the server doesnt make any close() socket or shutdownOutput() .
    public class ServidorSocketFicheromio {
         public ServidorSocketFicheromio() {
    try{
         ServerSocket servidor= new ServerSocket(2000);
         System.out.println("servidor iniciado");
         Socket cliente=servidor.accept();
         System.out.println("cliente conectado");
         OutputStream os=cliente.getOutputStream();
         PrintWriter pw= new PrintWriter(os);
         File f = new File("c:\\curso java\\DUDAS.TXT");
         FileReader fr= new FileReader(f);
         BufferedReader br= new BufferedReader(fr);
         String leido;
         while((leido=br.readLine())!=null){
              pw.println(leido);
         pw.flush();
         }catch (IOException e) {
         * @param args
         public static void main(String[] args) {
              new ServidorSocketFicheromio();
    public class ClienteSocketFicheromio {
         public ClienteSocketFicheromio() {
    try{
         Socket cliente= new Socket("localhost",2000);
         File f = new File("G:\\pepe.txt");
         FileWriter fw= new FileWriter(f);
         PrintWriter pw= new PrintWriter(fw);
         InputStream is=cliente.getInputStream();
         InputStreamReader isr= new InputStreamReader(is);
         BufferedReader br= new BufferedReader(isr);
         String leido;
         while((leido=br.readLine())!=null){
              pw.println(leido);
              System.out.println(leido);
              System.out.println("leido");
              System.out.println("hola");
              pw.flush();
         }catch (IOException e) {
         public static void main(String[] args) {
         new ClienteSocketFicheromio();/
    }

  • Problems with sockets and InputsStreams

    Hi,
    I ve this code:
    InputStream is = null;
    boolean ok=true;
    while(ok){
    //sc is an object instance of socketConnection
    is = sc.openInputStream();
    return this.parse(is);
    //is.close();
    return "";
    and this exception is produced:
    java.io.IOException: no more Input Streams available.
    This exception is produced in the line:
    is = sc.openInputStream();
    I m connecting to a server and this server sends data throw a socket... but the problem is that when i m reading from this socket and this socket doesn t have data in it...
    how could i solve this problem...?
    Thanks,
    Diego

    That would be the "real" code:
    public String process()throws IOException{
    InputStream is = null;
    is = sc.openInputStream();
    String result= this.parse(is);
    is.close();
    any suggestions?
    Thanks,
    Diego

  • How to connect Master socket and extension to fibr...

    I have just had my fttp service enabled.
    I watched the online video on how to connect my phone, and it says that if you don't have the special socket that allows you to switch from copper to fibre, you should just connect the phne to the modem.
    I don't have the socket, just a normal phone socket right next to the modem.
    How do I connect my extensions? Can I just connect my modem to the socket and go from there, or do I need to do anything else?
    Sorry folks, I know very little about this stuff! 

    There is a guide here.
    http://bt.custhelp.com/app/answers/detail/a_id/37138/related/1
    My guess is that you would have to disconnect your extension wiring from the old master socket, and plug it into the Tel 1 socket via a phone splitter, if you need a phone near the fibre modem.
    There are a few other FTTP users on this forum, who may be able to give you more advice.
    There are some useful help pages here, for BT Broadband customers only, on my personal website.
    BT Broadband customers - help with broadband, WiFi, networking, e-mail and phones.

Maybe you are looking for

  • URL Links not working in ADE

    I have created URL links in a PDF ebook using acrobat.  The links  work just fine in Acrobat.  When I try to click on the link in ADE 2.0 some of the links aren't recognized, meaning they're not clickable.  Is there a certain setting that should be u

  • Make an iView from MDM Web Dynpro Component

    Hello! I have read documentation about configuration of MDM WD Component. What I have found - MDM WD Components are used as standalone application and inside BPM. But what about iView? How to make an iVIew from MDM WD Component and to link it with Co

  • Can not attach older iSCSI lun to repository

    I am a current Virtual Iron user and have set up OVM to replace my aging system. I have everything set up on some new hardware and up to a point where I want to set up some VMs. I have an older VM under Virtual Iron I am no longer using, so I thought

  • Error in Transformation generated by Update rule 0SD_O01 to 0SD_C03

    Hello Friends.. I created Update rules from 0SD_O01 to 0SD_C03, and then, generated a transformation to do loads. But when I do this the following error is happening in my routines E:The data object "COMM_STRUCTURE" does not have a component called "

  • Error Logs generating

    Hi, SCRIPTS: Error Log is generating in Spool. Can you please advise me where is the problem and how to solve this. Best Regards, Maruti