Topic
3 replies Latest Post - ‏2012-05-15T10:47:26Z by peacocb
hdh
hdh
2 Posts
ACCEPTED ANSWER

Pinned topic Connection through socks

‏2012-05-09T11:30:51Z |
Hi, I'm having trouble creating a connection to the agent via socks (Open Text socks client).

Using the trace facility of the socks client, I get the following (extract):

12:57:46.44200002050http://eclipse. ***** NSPLookupServiceBegin(0, 0x00300110, 12, 0), HostByName_IPv4 = 'SVPNXTR200VL624.vpndev.local', IPv4 = '1.0.0.1'
12:57:46.65600002050http://eclipse. WSPConnect(5412, 5212, '1.0.0.1:9041')
12:57:46.65900002050http://eclipse. WSPConnect(5412, 5212), t = 0, RHDNS lookup for IP '1.0.0.1' = 'svpnxtr200vl624.vpndev.local'
12:57:46.66000002050http://eclipse. WSPConnect(5412, 5212), t = 0, match rule = (0, 1, '*.vpndev.local', 0-65535, 0, {61482D60-DD87-47EA-8069-5B311F10AF6A})
12:57:48.00900001e00http://eclipse. WSPConnect(5420, 5416, '1.0.0.1:9041')
12:57:49.55900001e00http://eclipse. WSPConnect(5644, 4968, '192.168.200.24:9041')
12:58:10.87000001e00http://eclipse. WSPConnect(5644, 4968, '192.168.200.24:9041'), connect direct, ret = -1, error = 10060
12:58:19.28400000ec4http://eclipse. WSPConnect(5496, 5024, '192.168.200.24:9041')
12:58:40.59400000ec4http://eclipse. WSPConnect(5496, 5024, '192.168.200.24:9041'), connect direct, ret = -1, error = 10060
12:58:43.21200001c44http://eclipse. WSPConnect(5024, 5096, '192.168.200.24:9041')

SVPNXTR200VL624.vpndev.local is the fully qualified name of the server running the agent. This is the hostname entered in Health Center Connection Wizard.

192.168.200.24 is the local ip address of the server, which is not directly accessible from the client. This address has not been configured anywhere on the client, so apparently it must have been supplied by the agent during the first successful connection for the client to use on subsequent requests?!?

BTW, the agent is configured with com.ibm.java.diagnostics.healthcenter.agent.transport=jrmp

Any recommendations?

Thanks in advance
Henrik
Updated on 2012-05-15T10:47:26Z at 2012-05-15T10:47:26Z by peacocb
  • peacocb
    peacocb
    22 Posts
    ACCEPTED ANSWER

    Re: Connection through socks

    ‏2012-05-15T09:07:57Z  in response to hdh
    Hi Henrik,

    Sorry for the delay in responding.

    It's been a long while since I used socks and am not sure I completely understand your setup. However, if I explain a bit more about how the connection is made hopefully this will help you.

    Basically, Health Center is using the standard rmi protocol and JMX, thus it needs to query an rmiregistry to get the IP address and port where it can make that JMX connection. When using jrmp, the rmiregistry will be on the same port as the JMX server within the Health Center agent. Thus, the Health Center client connects to the rmiregistry inside the agent and does the initial query to find out where the JMX server is located and the agent will reply with its own IP address and the same port that the initial request was made on.

    However, if there is some sort of socks/NAT/address translation going on the address used by the client to get to the server may not be the same address that the server thinks it is running on. To get over this there is a command-line parameter that can tell the rmiserver to over-ride this IPaddress/hostname:

    -Djava.rmi.server.hostname=x.x.x.x.

    In your case I believe you would specify the ip address the client knows the server by.

    Brian
    • hdh
      hdh
      2 Posts
      ACCEPTED ANSWER

      Re: Connection through socks

      ‏2012-05-15T10:37:05Z  in response to peacocb
      Brian, thanks a lot for you explanation.

      It wouldn't be possible for me to assign IP address, since it's dynamically generated and translated by the socks client. And it's not the same address used through all acces routes.

      Your suggestion did, however, encourage me to add the following:

      -Djava.rmi.server.hostname=svpnxtr200vl624.vpndev.local

      And now it's working!

      Thanks again
      Henrik
      • peacocb
        peacocb
        22 Posts
        ACCEPTED ANSWER

        Re: Connection through socks

        ‏2012-05-15T10:47:26Z  in response to hdh
        Excellent :-)