Issue Details (XML | Word | Printable)

Key: GLASSFISH-14898
Type: Bug Bug
Status: Resolved Resolved
Resolution: Won't Fix
Priority: Critical Critical
Assignee: Amy Roh
Reporter: Amy Roh
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
glassfish

Cluster fails to start after upgrade - No free port within range: newPort=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler

Created: 30/Nov/10 05:03 PM   Updated: 01/Dec/10 02:05 PM   Resolved: 01/Dec/10 02:05 PM
Component/s: upgrade_tool
Affects Version/s: 3.1_b31
Fix Version/s: None

Time Tracking:
Not Specified

File Attachments: 1. XML File domain.xml (58 kB) 30/Nov/10 05:05 PM - Amy Roh
2. XML File domain.xml (52 kB) 30/Nov/10 05:05 PM - Amy Roh
3. Text File server.log (18 kB) 30/Nov/10 06:41 PM - Amy Roh
4. Text File server.log (110 kB) 30/Nov/10 05:05 PM - Amy Roh

Issue Links:
Dependency
 

Tags: 3_1-upgrade
Participants: Amy Roh and Bobby Bissett


 Description  « Hide

Followed cluster upgrade example from http://wikis.sun.com/display/GlassFish/V3.1ClusterUpgradeExample

After installing v2.1.1 and creating local cluster and instances,

a new virtual server "test-server" and http listener "test-listener-1" listening to port 7777 were created on cluster1-config. Deployed web application "hello" and made sure the web app is accessible on the instances and also on newly created http listener port 7777.

After installing v3.1, upgrade, and recreating instances, cluster cannot be started

bash-3.2$ ./asadmin start-cluster cluster1
in1: Could not start instance in1 on node na1 (amys-macbook-pro.local).

Command failed on node na1 (amys-macbook-pro.local): Waiting for in1 to start ................................Command start-local-instance failed.

Error starting instance in1.
The server exited prematurely with exit code 0.

[#|2010-11-30T16:44:37.223-0800|SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=1;_ThreadName=main;|Shutting down v3 due to startup exception : No free port within range: 7777=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@367720d7|#]

server.log, v3 domain.xml, and v2 domain.xml are attached



Bobby Bissett added a comment - 30/Nov/10 05:49 PM

This isn't an upgrade tool issue, because the upgrade tool doesn't perform upgrades (it just runs asadmin start-domain --upgrade).

Without more information, there's nothing I can do with this. Please give the steps to create the virtual server and new listener. Also, since the instance wouldn't start, we need the instance's server.log file to see what the error is.

Without the virtual server and new listener, the upgrade works fine. So my guess is that this is an issue for the configuration, web, or grizzly areas.


Amy Roh added a comment - 30/Nov/10 06:38 PM

In order to reproduce the error, create-http-listener in v2 and upgrade to v3.1

asadmin create-http-listener --listeneraddress 0.0.0.0 --listenerport 7777 --defaultvs server --target cluster1 test-listener

The instance fails to start with this error -

[#|2010-11-30T18:32:10.807-0800|SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=17;_ThreadName=Thread-1;|Shutting down v3 due to startup exception : No free port within range: 7777=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@6750cf54|#]

Attaching instance log and assigning to MonitorableSelectorHandler author, Alexey, for initial investigation.


Amy Roh added a comment - 30/Nov/10 06:41 PM

Instance log file.

[#|2010-11-30T18:32:10.807-0800|SEVERE|glassfish3.1|javax.enterprise.system.core.com.sun.enterprise.v3.server|_ThreadID=17;_ThreadName=Thread-1;|Shutting down v3 due to startup exception : No free port within range: 7777=com.sun.enterprise.v3.services.impl.monitor.MonitorableSelectorHandler@6750cf54|#]


Amy Roh added a comment - 01/Dec/10 02:04 PM

Apparently this is expected. V2 after creating http-listener at port 7777 cannot be started on both instances because the port is being shared by two instances.

[#|2010-11-30T18:19:13.876-0800|SEVERE|sun-appserver2.1|javax.enterprise.system.container.web|_ThreadID=18;_ThreadName=RMI TCP Connection(21)-192.168.0.11;_RequestID=a93615e0-b3bb-41b8-803c-0b59f53b23bd;|WEB0701: Error initializing endpoint
java.net.BindException: Address already in use: 7777

From Bobby,

"So I think it's actually working as expected. The other http listeners use a variable for their port such as port="${HTTP_LISTENER_PORT} and then this is set in a system property for the particular instance. But you've set "7777" on the config, and so both instances try to use it and can't, both before and after the upgrade."


Amy Roh added a comment - 01/Dec/10 02:05 PM

Not a bug.