users@glassfish.java.net

Problems with listeners, hosts and multihoming

From: <glassfish_at_javadesktop.org>
Date: Mon, 30 Jun 2008 12:02:43 PDT

Hello

I want GF to serve different applications if requested from different hosts. So I've added three IP addresses to my eth0, I've declared them in an external DNS with different names: lvov1.ips, lvov2.ips and lvov3.ips. Machine name is localhost.localdomain and no host aliases are included in /etc/hosts file.

Then I've created three servers in GF with hosts value: lvov1.ips, lvov2.ips and lvov3.ips. I've changed the host value of server 'server' to [b]localhost, localhost.localdomain[/b]. All four servers connected to the default non-SSL listener.

Then I've deployed three simple jsf applications in each one of the servers, each one in context /A1, /A2 and /A3. No default server module has been selected.

When I try to go to http://lvov.ips:8173 or http://lvov.ips:8173/A1, I get the usual fault page as if that url is not present, and the same happens with lvov2.ips and lvov3.ips; and with applications A2 and A3.

I am wondering if the hosts value in each server is intended to route requests based on the host header value. Is there any other configuration value missing?

I've also tried to create three listeners to the same port for each IP alias, but in that case GF doesn't start due to port conflict. But each listener was defined for each IP.

Thanks,
[Message sent by forum member 'aperezymadrid' (aperezymadrid)]

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