users@glassfish.java.net

Re: Problem with remote EJB client

From: <glassfish_at_javadesktop.org>
Date: Thu, 12 Feb 2009 10:24:19 PST

This might be relevant: https://glassfish.dev.java.net/issues/show_bug.cgi?id=4051

Check /etc/hosts on the server machine and see what entries it has for localhost (I'm guessing the valid-but-unusual 127.0.1.1, probably a typo) and the server name. If /etc/hosts specifies that the server's IP address is 127.0.1.1 like in the bug report then that would explain why it (glassfish) is returning 127.0.1.1 to the remote client. AFAIK to do that would be wrong as only the external IP address should be listed, though people do that sometimes to speed up local clients.

In other words, /etc/hosts should say:
127.0.0.1 localhost
192.168.1.1 servername # with the real IP address and servername here

It should not say:
127.0.1.1 localhost servername
192.168.1.1 servername
[Message sent by forum member 'matterbury' (matterbury)]

http://forums.java.net/jive/thread.jspa?messageID=331627