users@glassfish.java.net

GlassFish v2ur2 with Client and Server in different subnets

From: Markus Karg <karg_at_quipsy.de>
Date: Mon, 17 Aug 2009 16:10:32 +0200

One of our customers is using GlassFish v2ur2 in two different IP
subnets. One IP subnet contains only the client containers (ACC), one IP
subnet contains only the server containers (EJB SLSB).

 

He has the problem that the client cannot connect to the server.

 

The reason is that the server sends his hostname to the client and the
client does NOT use DNS to resolve it, but it seems to ask the GlassFish
server to resolve it. As it is located in a different network, it
resolve to the wrong IP address. While this should not be a problem if
there is a router between both subnets, in this special case it is
problematic: The server itself IS the router. It has to LAN cards, one
in each subnet. To workaround it, we disabled the second ("wrong") LAN
card, so GlassFish now resolves inside of the correct subnet.

 

This is rather weird, why does the client not just use DNS but asks the
GlassFish server? This makes things rather complex!

 

Regards

Markus