eclipse-ee4j / glassfish

Eclipse GlassFish
https://eclipse-ee4j.github.io/glassfish/
375 stars 143 forks source link

Problem with multilpe virtual servers for same port #11760

Closed glassfishrobot closed 14 years ago

glassfishrobot commented 14 years ago

We get the following error in the server.log... Exception while mapping the request java.lang.RuntimeException: SnifferAdapter cannot map themself.

This occurs with multiple listeners (with different IP) listening on port 80.

The problem is easily duplicated. Just setup more than 2 listeners(same port), with separate protocol and virtual servers. Then directory deploy hello1.war, hello2.war, hello3.war (etc) individually to each virtual server.

We were able to get 2 network-listener/protocol/virtual-server/application(web) configurations to work. However, adding more creates the SnifferAdapter error and leaves the web server unable to service the virtual-server(s).

Environment

Operating System: All Platform: Sun

Affected Versions

[v3.0.1]

glassfishrobot commented 5 years ago
glassfishrobot commented 14 years ago

@glassfishrobot Commented oleksiys said: I think SnifferAdapter is just side-effect, but as reported there is an issue, with handling virtual servers, which refer network-listeners with different ip addresses, but same TCP port.

glassfishrobot commented 14 years ago

@glassfishrobot Commented @shingwaichan said: The fix in https://grizzly.dev.java.net/issues/show_bug.cgi?id=814 resolved the case before the web container is started. An issue is identified in web container.

glassfishrobot commented 14 years ago

@glassfishrobot Commented @shingwaichan said: Incremental fix: Sending common/internal-api/src/main/java/org/glassfish/internal/grizzly/ContextMapper.java Sending common/internal-api/src/main/java/org/glassfish/internal/grizzly/V3Mapper.java Sending web/web-glue/src/main/java/com/sun/enterprise/web/WebContainer.java Transmitting file data ... Committed revision 36792.

The above fix allows the correct mapper is picked up. I have setup an environment with two NIC and an alias (three ip addresses). If ip addresses are used as host in virtual server configuration, then it works. If host name are used, then I see a 500 error code. We need to investigate this further.

glassfishrobot commented 14 years ago

@glassfishrobot Commented @shingwaichan said: Sending web-glue/src/main/java/com/sun/enterprise/web/WebContainer.java Transmitting file data . Committed revision 37206.

This fixed the issue for setting default web module in this case. Right now, the scenario works when we restart the server. We are working on the fix for dynamic reconfiguration for default web module in this case.

glassfishrobot commented 14 years ago

@glassfishrobot Commented @shingwaichan said: Sending web/web-core/src/main/java/org/apache/catalina/Host.java Sending web/web-core/src/main/java/org/apache/catalina/connector/Connector.java Sending web/web-core/src/main/java/org/apache/catalina/connector/MapperListener.java Sending web/web-core/src/main/java/org/apache/catalina/core/StandardHost.java Sending web/web-embed/impl/src/main/java/org/glassfish/web/embed/impl/EmbeddedWebContainerImpl.java Sending web/web-glue/src/main/java/com/sun/enterprise/web/VirtualServer.java Sending web/web-glue/src/main/java/com/sun/enterprise/web/WebContainer.java Sending web/web-glue/src/main/java/com/sun/enterprise/web/connector/extension/CatalinaListener.java Transmitting file data ........ Committed revision 37276.

glassfishrobot commented 14 years ago

@glassfishrobot Commented @shingwaichan said: fix a typo in log message key:

Sending WebContainer.java Transmitting file data . Committed revision 37379.

glassfishrobot commented 7 years ago

@glassfishrobot Commented This issue was imported from java.net JIRA GLASSFISH-11760

glassfishrobot commented 14 years ago

@glassfishrobot Commented Reported by htsguru

glassfishrobot commented 14 years ago

@glassfishrobot Commented Marked as fixed on Tuesday, June 1st 2010, 3:11:08 am