Skip to main content

Remote EJB lookup behind a firewall hangs

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
riksweeney
Offline
Joined: 2007-07-30

Hi,

I am trying to lookup my remote EJB on a Glassfish server located behind a firewall. I have some test code which works happily between non-firewalled boxes, but if I try looking up the EJB behind a firewall, the lookup hangs.

I turned on the logging and when the lookup begins, I get the following entry

[#|2014-02-10T15:00:14.125+0000|FINE|glassfish3.1.2|javax.enterprise.resource.corba.org.glassfish.enterprise.iiop.impl|_ThreadID=16;_ThreadName=Thread-4;ClassName=org.glassfish.enterprise.iiop.impl.IIOPSSLSocketFactory;MethodName=setAcceptedSocketOptions;|setAcceptedSocketOptions: SocketOrChannelAcceptorImpl[7001 IIOP_CLEAR_TEXT true true] ServerSocket[addr=/0.0.0.0,localport=7001] Socket[addr=/xx.xx.xxx.x,port=61530,localport=7001]|#]

Which I guess means that the request has hit the box, but the lookup never completes. I can leave it in this state for days, and it will not timeout. The IIOP port has been configured to listen on 7001, and this works happily on the other servers.

If I kill the test code, then the server throws an IOException reporting an end-of-stream error. If anyone has any ideas as to what is causing this and how to solve it, I'd be very grateful.

Thanks

Richard

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
riksweeney
Offline
Joined: 2007-07-30

OK, I installed WireShark on both machines and now have more of an idea of what is going on.

The web server's external IP address is 10.33.123.22
It's internal IP address is 10.33.124.22

The client machine is running on the internal network on 10.44.666.1.

The client connects to Glassfish via the internal address.

The JNDI lookup works, and server replies to the client, but it sends back the external IP address, rather than the internal one. As a result, the client ignores the response and continues to wait for a response containing the internal IP address.

So what I want to know is, how can I make Glassfish respond with the correct IP address?