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.
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??
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.
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.
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.
Some people, when well-known sources tell them that fire will burn them, don't put their hands in the fire.
Some people, being skeptical, will put their hands in the fire, get burned, and learn not to put their hands in the fire.
And some people, believing that they know better than well-known sources, will claim it's a lie, put their hands in the fire, and continue to scream it's a lie even as their hands burn down to charred stumps.
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