Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Localhost:\\8080 Problem

 
Mahi Rahman
Greenhorn
Posts: 21
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
'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
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
David O'Meara
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic