users@glassfish.java.net

Re: Glassfish web start application client connection settings

From: <glassfish_at_javadesktop.org>
Date: Wed, 19 Nov 2008 04:37:02 PST

I had the Same Problem, but found the real Problem and the Solution.

Problem:

Server is on a Linux Server !Important for the Error! Used Galssfish 2ur2
Client on a diffent Machine (in my case XP, but doesnt matter)
When i connect to the Server I get an error that I cant connect to 127.0.1.1

What really happend:

I looked with Wireshark and found out that the Client connects to the Server as defined in the Settings.
The Server answered an sent a redirect to 127.0.1.1.
The Clinet tries to connect and Failed.

So the Problem is on the Server not the Client.

Solution:

I found that in Linux the Hostname of the Computer is also in the /etc/hosts file and
(you think of it) with 127.0.1.1
Glassfish tries to get the external IP of the Computer and finds this entry in the hosts file and uses this IP.

I just changed the IP in the hosts file (and restarted Glassfish) and -voila no more redirects. The App works as ever.

Hope this helps someone else. If it does spread this Info to other Lists you came across. Thanx!
[Message sent by forum member 'rsh' (rsh)]

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