• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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

 
Ranch Hand
Posts: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ?


 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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: 89
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.



 
Yeah, but does being a ninja come with a dental plan? And what about this tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic