This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Glassfish server cannot start ERROR - no free port within range:

 
Ramesh Kumar Swarnkar
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
When I installed Glassfish first time I am able to run the port 8080 and can configure JMS resources on it. It asked to restart. Hence I restarted it.
But there after the server started giving following error:

[#|2013-04-05T20:47:32.148+0530|SEVERE|glassfish3.1.2|grizzly|_ThreadID=16;_ThreadName=Thread-2;|doSelect IOException
java.net.BindException: No free port within range: 7676=com.sun.enterprise.v3.services.impl.ServiceInitializerHandler@1cf3710
at com.sun.grizzly.TCPSelectorHandler.initSelector(TCPSelectorHandler.java:432)
at com.sun.grizzly.TCPSelectorHandler.preSelect(TCPSelectorHandler.java:378)
at com.sun.grizzly.SelectorHandlerRunner.doSelect(SelectorHandlerRunner.java:188)
at com.sun.grizzly.SelectorHandlerRunner.run(SelectorHandlerRunner.java:132)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
|#]

I have checked the ports [ "netstat -a > c:\portsStatus.txt" ] and found all the ports 7676 and 8080 , 4848 are free.
It is not listening on either of 8080 and 4848 ports,as I can not open pages localhost:8080 or localhost:4848

I was doubting if it might be host mapping issue. therefore I check the "C:\WINDOWS\system32\drivers\etc\hosts" file and it had entry of
127.0.0.1 localhost
which I comneted and make a new entry.
10.202.60.127 localhost

Still no progress . I get the same error message as I can check into the domain1's log file.

Can some one give some pointer to overcome this issue please ?


 
Michael Ernest
High Plains Drifter
Sheriff
Posts: 7292
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is a common occurrence on systems that get their IP addresses through DHCP. Reconfigure your GlassFish server to listen to the IP address you've been given and the problem will probably clear up.
 
Ramesh Kumar Swarnkar
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I run the following command (i.e. 'D:\glassfish3\bin\asadmin.bat )
asadmin set configs.config.server-config.network-config. network-listeners.network-listener.http-listener-1.address=10.202.60.127
But it failed.

Then I tried altering the 'domain.xml' file by adding address attribute:
<network-listener address="10.202.60.127" port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"/>

- This also failed.

Any pointer to reconfigure the GLassfish so that it can listen the local IP please ?
 
Ramesh Kumar Swarnkar
Ranch Hand
Posts: 84
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have learned that this is because of the new Host I have created in addition to default_host on my JMS application server.
I deleted the new host info from \glassfish3\glassfish\domains\rameshDomain1\config\domain.xml and able to run the server successfully.



 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic