users@glassfish.java.net

Re: Unable to bind glassfish v3 listener to specific IP

From: <glassfish_at_javadesktop.org>
Date: Sun, 22 Feb 2009 12:34:01 PST

Some additional info, if anyone can help me with this:

Using an example with private network of 2 IPs:

    10.0.1.200 -- bound to eth0
    10.0.1.210 -- bound to eth0:0

Launch Tomcat instance, bound to specific IP 10.0.1.200 and port 80.
netstat shows listening on:

    ::ffff:10.0.1.200:80

Launch Glassfish v3 instance, bound to http-listener of specific IP 10.0.1.210 and port 80:

This fails with the following section from the log:

Feb 22, 2009 3:23:11 PM com.sun.enterprise.v3.services.impl.GrizzlyProxy start
INFO: Listening on port
80
Feb 22, 2009 3:23:11 PM
com.sun.enterprise.v3.services.impl.GrizzlyService
postConstruct
INFO: Network listener http-listener-2 on port 8181 disabled per
domain.xml
Feb 22, 2009 3:23:11 PM com.sun.enterprise.v3.services.impl.GrizzlyProxy
start
INFO: Listening on port
4848
Feb 22, 2009 3:23:11 PM OSGiModuleImpl
start
INFO: Started bundle org.glassfish.common.container-common
[99]
Feb 22, 2009 3:23:11 PM
com.sun.enterprise.v3.admin.adapter.AdminConsoleAdapter
setStateMsg
INFO: The Admin Console Web Application has been
downloaded.
Feb 22, 2009 3:23:11 PM OSGiModuleImpl
start
INFO: Started bundle org.glassfish.common.glassfish-naming
[84]
Feb 22, 2009 3:23:11 PM OSGiModuleImpl
start
INFO: Started bundle org.glassfish.common.glassfish-api
[100]
Feb 22, 2009 3:23:11 PM OSGiModuleImpl
start
INFO: Started bundle org.glassfish.connectors.connectors-runtime
[22]
Feb 22, 2009 3:23:11 PM com.sun.enterprise.v3.server.AppServerStartup
run
INFO: GlassFish v3 Prelude startup time : Felix(1465ms) startup
services(861ms)
total(2326ms)
Feb 22, 2009 3:23:11 PM com.sun.grizzly.Controller
doSelect
SEVERE: doSelect
exception
java.net.BindException: Address already in use:
80=com.sun.grizzly.http.SelectorThreadHandler_at_ffc3eb
       at
com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:356)
       at
com.sun.grizzly.Controller.doSelect(Controller.java:367)
       at
com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:82)
       at
com.sun.grizzly.Controller.startSelectorHandlerRunner(Controller.java:1136)
       at
com.sun.grizzly.Controller.start(Controller.java:943)
       at
com.sun.grizzly.http.SelectorThread.startListener(SelectorThread.java:1178)
       at
com.sun.grizzly.http.SelectorThread.run(SelectorThread.java:1045)
       at
com.sun.grizzly.http.SelectorThread.startEndpoint(SelectorThread.java:1110)
       at
com.sun.enterprise.v3.services.impl.GrizzlyServiceListener.start(GrizzlyServiceListener.java:91)
       at com.sun.enterprise.v3.services.impl.GrizzlyProxy
$1.run(GrizzlyProxy.java:222)
Feb 22, 2009 3:23:11 PM com.sun.enterprise.v3.server.AppServerStartup
run
SEVERE: Shutting down v3 due to startup exception : Address already in
use: 80=com.sun.grizzly.http.SelectorThreadHandler_at_ffc3eb
Feb 22, 2009 3:23:11 PM com.sun.enterprise.v3.admin.StopDomainCommand
execute
INFO: Server shutdown initiated
[Message sent by forum member 'jaibox' (jaibox)]

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