Skip to main content

startup error - no free port within range

Please note these forums are being decommissioned and use the new and improved forums at
No replies
Joined: 2012-06-15

I am trying to start up a 2nd instance of glassfish server on my system. The first one uses the defaults, admin port=4848, http port=8080. Now I'm trying to start another instance with admin port=4849, http port=8081, but I get a "No free port within range" error as seen below:

waiting for domain1 to start ....Command start-domain failed.
Error starting domain domain1.
The server exited prematurely with exit code 0.
Before it died, it produced the following output:

Launching GlassFish on Felix platform
[#|2012-06-15T11:47:45.973-0600|INFO|glassfish3.1.2|com.sun.enterprise.server.logging.GFFileHandler|_ThreadID=1;_ThreadName=main;|Running GlassFish Version: GlassFish Server Open Source Edition 3.1.2 (build 23)|#]

[#|2012-06-15T11:47:46.259-0600|INFO|glassfish3.1.2||_ThreadID=20;_ThreadName=Grizzly-kernel-thread(1);|Grizzly Framework 1.9.46 started in: 42ms - bound to []|#]

[#|2012-06-15T11:47:46.261-0600|SEVERE|glassfish3.1.2|grizzly|_ThreadID=23;_ThreadName=Grizzly-kernel-thread(1);|doSelect IOException No free port within range:
at com.sun.grizzly.TCPSelectorHandler.initSelector(
at com.sun.grizzly.TCPSelectorHandler.preSelect(
at com.sun.grizzly.SelectorHandlerRunner.doSelect(
at java.util.concurrent.ThreadPoolExecutor.runWorker(
at java.util.concurrent.ThreadPoolExecutor$

Can I not have 2 instances of glassfish server running? It would seem ok since I use different admin and http ports for each. I must be missing something or doing something boneheaded...

TIA for any advice.