This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Tomcat and the fly likes Localhost:\\8080 Problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Localhost:\\8080 Problem" Watch "Localhost:\\8080 Problem" New topic
Author

Localhost:\\8080 Problem

Mahi Rahman
Greenhorn

Joined: Feb 16, 2007
Posts: 21
Hi,

I am using to Tomcat 5.5 as application server. When I try to start it I get the following error message:

"Port 8080 required by Tomcat v5.5 Server @localhost is already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s)."

To make sure I have cheked if any other program is using the localhost:8080, but didn't find anything.

Can anybody please tell me how can I see which ports are available to allocate as "localhost" in Windows XP? Can I use any other port for Tomcat?

Thanks in advance!

Mahi.
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

'typically', yes, you can use any port for tomcat. maybe switch to 8081 (have a look in conf/server.xml)

Try opening http://localhost:8080 in a browser and see if you get anything. I once had Oracle installed and it had something running there. It was pretty easy to remove after a quick google search.
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Originally posted by Mahi Rahman:

To make sure I have cheked if any other program is using the localhost:8080, but didn't find anything.


How did you find that. What I do is , I try to telnet into localhost at port 8080.If connection is refused then no one is using that port.Or in some case you previous Tomcat process has not terminated properly and still listening to port 8080.Check the process manager.

Originally posted by Mahi Rahman:

Can anybody please tell me how can I see which ports are available to allocate as "localhost" in Windows XP? Can I use any other port for Tomcat?


You can surely use other port for Tomcat as pointed by David.
Check for connector configuration in server.xml for changing the default port.


Rahul Bhattacharjee
LinkedIn - Blog
David O'Meara
Rancher

Joined: Mar 06, 2001
Posts: 13459

There are programs that will tell you which programs (at which location on the local machine) are listening on which port, but I can't remember any of their names.
Rahul Bhattacharjee
Ranch Hand

Joined: Nov 29, 2005
Posts: 2308
Port sniffers are available (Never run on any public server , read somewhere that its illegal).

netstat -n at command prompt gives some information about the listening ports.
Rashid Mayes
Ranch Hand

Joined: Jan 11, 2006
Posts: 160
netstat is the proper command, but use "netstat -ano" or "netstat -ab"


nmap can be used to perform port scans. But as mentioned before, only use on your machines.


Rashid Mayes
http://www.hostj2me.com/ - http://www.worlddeveloper.org/
Rashid Mayes
Ranch Hand

Joined: Jan 11, 2006
Posts: 160
Sorry, I forgot to add. There is a slight difference between the syntax on the Windows and Linix platforms.

Use netstat \h on windows for help and man netstat on Linux for help.
[ May 29, 2007: Message edited by: Rashid Mayes ]
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Localhost:\\8080 Problem
 
Similar Threads
Localhost:\\8080 Problem
Error in running tomcat
Running Tomcat 7
Error in running tomcat
Localhost:\\8080 Problem