This week's book giveaway is in the OCP forum.
We're giving away four copies of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests and have Scott Selikoff and Jeanne Boyarsky on-line!
See this thread for details.
Win a copy of OCP Oracle Certified Professional Java SE 11 Developer Practice Tests this week in the OCP forum!
  • 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Jeanne Boyarsky
  • Ron McLeod
  • Tim Cooke
Sheriffs:
  • Devaka Cooray
  • paul wheaton
  • Mark Herschberg
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Frits Walraven
  • Jj Roberts
Bartenders:
  • Carey Brown
  • salvin francis
  • Piet Souris

Port 8080 already in use on localhost error

 
Ranch Hand
Posts: 98
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi
I am using Sun.One Cummunity Edition.with Tomcat 4.0
Here if i shutdown my server abruptly ..the port gets locked..
Ie when i try to start the server (Tomcat internal)it gives error
Port 8080 on localhost is already in use
What can be the reason??
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@above

me too experience the same problem.

i use eclipse and JBoss to deploy. while i debug using Jboss its throwing

java.net.BindException: Address already in use: JVM_Bind:8080

so when i type http://localhost:8080 in my browser i am getting a page not found error...

how to overcome this problem.
 
Ranch Hand
Posts: 86
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@both
The error message is self explanatory. There is some other process which is still alive and use 8080 port.
Try to find if these processes. You can use netstat. Or you find other java processes and kill them. If you work on Linux you should search also for processes like jsvc.
@Srikanthh Ar
The message is a normal web server response when it did not managed to find you a page for that address. So, there is an old instance of jboss out there.
 
Srikanthh Ar
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

i used netstat to find any process is still alive in 8080 port. but i found nothing with the 8080 port.. how could i resolve this problem further.
 
Saloon Keeper
Posts: 23256
158
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If Tomcat was using port 8080 and your shutdown doesn't release it, then Tomcat hasn't finished shutting down. Only one process at a time can own a TCP/IP port for listening.

Tomcat cannot completely terminate as long as any of the threads in its JVM are still running. It's not uncommon for webapps to spawn threads, and if these threads aren't terminated when you shutdown the server, Tomcat will hang and won't close its ports.
 
I'm a lumberjack and I'm okay, I sleep all night and work all day. Lumberjack ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic