wood burning stoves 2.0*
The moose likes Tomcat and the fly likes port 8005 8080 and 8009 not working on Tomcat 6.0.32 with jdk 1.5 installed Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Tomcat
Bookmark "port 8005 8080 and 8009 not working on Tomcat 6.0.32 with jdk 1.5 installed" Watch "port 8005 8080 and 8009 not working on Tomcat 6.0.32 with jdk 1.5 installed" New topic
Author

port 8005 8080 and 8009 not working on Tomcat 6.0.32 with jdk 1.5 installed

Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 379
Hello my server starts and stops but when I try to view my files at

with IE:
http://localhost:8080/MMP I get a 404
when I try to load
http://localhost:8005 or
http://localhost:8009 it cannot display on either.

When I am in the Eclipse IDE I get this (the same as above and an error message as follows

Several ports (8005, 8080, 8009) required by Tomcat v6.0 Server at localhost are 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).
--------------------------------------------------------------------------------------------------------------------------------------------------------------------

I tried to run a netstat and a netstat -a and I get 'netstat' is not recognized as an internal or external command, operable program, or batch file.

I really need to run several modules in debug mode to see what is going on, can someone please help me?

Thank you, Michele
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

Ports 8005 and 8009 don't support HTTP, only the procedure Tomcat uses for shutting down (8005) and AJP (8009). That's why the second and third links don't work.

Port 8080 on the other hand should be able to provide HTTP access. Eclipse mentions that all three ports are still in use so that suggests that your Tomcat server is still running. So the first place to go is the Tomcat server logs. See if you find any errors in those.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 379
I've looked in all the log folders and nothing from today is posted in any of them.

What should I do?

Thanks,
Michele
Koen Aerts
Ranch Hand

Joined: Feb 07, 2012
Posts: 344

I'm wondering if you have another tomcat running on your workstation; for instance as a service (outside Eclipse), or maybe some other process that listens to port 8080. Did you try a netstat?
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 379
when I do that I get this:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Smitmi12>cd c:\

C:\>netstat
'netstat' is not recognized as an internal or external command,
operable program or batch file.

C:\>

Sachin Pachari
Ranch Hand

Joined: Jan 16, 2012
Posts: 56

type netstat -aon in the cmd, then you will get all the port numbers and the PID numbers of the respective ports(this will give the list of all listening ports).

then in the list search for the required ports and then use taskkill /f /pid <pid number> this will help you.

the problem is that one of the ports are being used.

for more info on netstat http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/netstat.mspx?mfr=true
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 379
Again I get the netstat -aon is not a recognized command.

Thanks,
Michele
Sachin Pachari
Ranch Hand

Joined: Jan 16, 2012
Posts: 56

if in case you are using Windows then this below link might help you

http://www.pcreview.co.uk/forums/netstat-not-working-t2006848.html

its possibly spyware problem, so it might put a lock over the commands, check the given link,

Good Luck
Sachin Pachari
Ranch Hand

Joined: Jan 16, 2012
Posts: 56

if you are not able to remove the Spyware,

You can anytime run Tomcat in different ports, you can change the port numbers inside server.xml , its found inside \conf folder in the Tomcat folder.

But i suggest you try to remove the spyware, because its better and you may need netstat command when you need to manually stop some services from the command prompt, believe me its the most useful command that helped me a lot.

naveena kamsali
Greenhorn

Joined: Sep 20, 2011
Posts: 8
hi,

try with a port no. 8081. this will work
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19543
    
  16

Not if ports 8005 and 8009 also are causing problems. You'd only be shifting the problem. If port 8081 becomes unavailable, would you switch to 8082?
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 379
I installed Tomcat: ApacheTomcat5_5_35 to work with Eclipse: Eclipse-SDK-3.1-win32 and when I go to http://localhost:8080 I did get the welcome screen, however, when I tried to navigate to my directory, I get the 404 error. To make matters worse, now I cannot get the http://localhost:8080 welcome to come up again.

Also I did do what you suggested, however, I got the blue screen of death when I tried to install the Adaware, so I just have Search and Destroy on my pc.

Got any suggestions about a different piece of software other than Adaware?

on the netstat, still getting this one:

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\Smitmi12>cd c:\

C:\>netstat a-
'netstat' is not recognized as an internal or external command,
operable program or batch file.

C:\>


Thanks,
Michele
Sachin Pachari
Ranch Hand

Joined: Jan 16, 2012
Posts: 56

there are some links that i would suggest you to check, please check the following links Completely,

http://forums.cnet.com/7723-6142_102-249839/help-my-cmd-field-does-not-recognize-commands-anymore/

http://cboard.cprogramming.com/tech-board/54615-there-no-netstat.html

Completely read them there are a lot of fixes available here,

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

If netstat is not the issue, you need to run Tomcat and thats the final goal, then

Inside your Tomcat installation file you will have the conf folder, inside that folder you will find the server.xml, open this file in Notepad or other text Editor, you will find

<Connector port="8080" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />

The above means that your Tomcat uses port 8080 for Starting, during start all the required ports must be free, if the ports are used by other programs, then your Server does not start.

The simple way is to search for 8080 by using Edit-->Find(Ctrl+F) and type 8080 and search, then you can change connecting port, Say for example

<Connector port="8082" protocol="HTTP/1.1"
connectionTimeout="20000"
redirectPort="8443" />

Now if the adove is found in your server.xml, then your Tomcat will use port 8082, thus you can change the port Number.

There are some more ports in the Server.xml thats used by Tomcat, they are 8009,8443 all these are Default Values,

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

The Command netstat will give the user the current status of all the ports, thus its very useful in your case, if you are able to open netstat then you can check the availablity of the required ports, if your netstat does not work then you cant check your ports, but you can always run tomcat in a different port.

"netstat not workink" is an issue which will come back to you again in the future, so i recommend that you solve it today.

Best of Luck
Michele Smith
Ranch Hand

Joined: Oct 27, 2010
Posts: 379
Hi and I thank you SO MUCH!!! for your information.

Since my last posting, I have the most recent JBoss installed with Eclipse Galileo.

I have the same problem with JBoss that I did with Tomcat.

I am able to run the netstat command off the cmd line now, However, it goes away as soon as I run it.

I have also put anti-spyware detectors on my machine and it has deleted a couple of items.

Do you have any more suggestions for this type of a configuration?

Thanks AGAIN!!!

Midani
Sachin Pachari
Ranch Hand

Joined: Jan 16, 2012
Posts: 56

it is the same for all the servers, because all the servers use the default 8080 port, the other ports may change but 8080 is the default connecting port.

try to change the ports for the server using eclipse, simply double click on the server the configurations window will open, you can change the port number there and then you can try, this solution will work for now,

The permanent solution is to check for ways to make netstat work, or you might have to format your system completely. i think formatting will remove that lock over the commands in Command Prompt.

Hope this helps.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15641
    
  15

OK, enough with the ports stuff. It's not really relevant.

A "404" error means "Resource Not Found". It indicates that a webapp server is running, but that the URL is requesting a resource that cannot be resolved. That means one of 2 things:

1. The webapp that services the URL is either not properly structured as a WAR OR has not been deployed at all.

2. You're not talking the the webapp server you thought you were, and the server you are talking to doesn't contain that webapp resource.

Because of the way TCP/IP works, there can be one and only one program listening in on a given port (8080). So there cannot be 2 Tomcats (or a Tomcat and an Apache HTTPD, WebSphere, whatever) listening in on port 8080, 8005, 8443, etc.. If you try, the second server will either not come up at all, or will do like Tomcat: whine that the port is not available and start, but be unable to listen for and service requests from that port.

The netstat command can be used to tell if some other service is already listening on a port before you start up Tomcat. If no other server is active, then case 1, above applies. If there is something already listening, then you'll probably encounter case 2.


Customer surveys are for companies who didn't pay proper attention to begin with.
Sachin Pachari
Ranch Hand

Joined: Jan 16, 2012
Posts: 56

You are right about the 404, i totally agree with you, but take a look at the first post, the error he posted,


Several ports (8005, 8080, 8009) required by Tomcat v6.0 Server at localhost are 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).


the above error comes in Eclipse only when the required port is used by another program in your system, thats where the whole port thing started.

And i have attached a screenShot with this post,

There are two points that must be noted,

1.Note tha JBoss server is already running and using the port 8080, then i try to start Tomcat 6.
2. See the obtained error, So to start the Tomcat the Jboss must be stopped ( ie the port 8080 must be free, )

In his situation the problem is one of the three ports are used by another program, so the simple solution is to change the port number, if in case the Netstat works then we can fix the issue and use any port we want.




[Thumbnail for Tomcat.JPG]

 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: port 8005 8080 and 8009 not working on Tomcat 6.0.32 with jdk 1.5 installed
 
Similar Threads
Unable to start Tomcat v6.0 server
When I try to start Tomcat 6.0 service, I got the error
unable to start tomcat
Several ports required by Tomcat v5.5 Server at localhost are already in use
Issues with Starting Tomcat server in Ecllipse