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?
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.
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: 298
posted
0
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.
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.
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.
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: 298
posted
0
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.
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
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
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: 298
posted
0
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?
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.
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.
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.