"starting Tomcat server 7 at localhost has encountered a prob"
Asked Answered
L

10

14

Trying configure tomcat in my eclipse but "Port 8080 required by Tomcat v7.0 Server at 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)". i tried to set up tomcat environment several times but it hitting me with this error any thing i need to do in my eclipse?

Leannaleanne answered 1/11, 2012 at 21:8 Comment(6)
The error is pretty self explanatory. What system is this running on? (Windows/Linux) Have you ran a netstat of some kind to see what is currently occupying that port?Spic
i am using Windows7 , and i tried that port and getting error.Leannaleanne
did you tried in different workspace ?Speaking
yes sri ,i tried by changing 3 work-spaces but i didn't find any solution for this error.Leannaleanne
You need to figure out what is CURRENTLY using that port (what the error is telling you). If you go to a command prompt you can type netstat and it will show you what connections are being made on the machine (might have to do netstat /all but this takes forever). One of them should give an ip address and end in :8080 and should give you a clue as to what is currently using that port. Once that is known you should be able to view your services and figure out what needs to be shut offSpic
The other option is to simply have Tomcat use a different port (8181 for example).Spic
P
22

In Servers view double-click on Tomcat and change HTTP port in Ports section to something else. Or in Package Explorer navigate to Servers Tomcat and change Connector port part inside server.xml file.

Psalmist answered 1/11, 2012 at 21:35 Comment(0)
G
10
  1. Close Eclipse
  2. Copy all files from TOMCAT/conf to WORKSPACE/Servers/Tomcat v7.0 Server at localhost-config
  3. Start Eclipse
  4. Expand the Servers project, click on the Tomcat 7 project and hit F5
  5. Start Tomcat from Eclipse
Gregory answered 1/2, 2014 at 1:20 Comment(2)
Finally this solved my issue. I've been looking for it from an hour following different answers on stackoverflow but nothing worked. Thanks dude!Beeeater
This solved my problem, the answer is very simple and helped me a lot.Majesty
E
5

to overcome this kind of problem follow the steps below:

  • open command prompt.
  • c:\Users\CGITS_04> netstat -o -n -a | findstr 0.0:80
  • then you can see a list of process that is currently using port 80.
  • open task manager->search the process-> select and end process.
  • Now open eclipse and start tomcat.
  • happy coding!
Elizabetelizabeth answered 1/8, 2013 at 6:40 Comment(0)
R
2

In eclipse->in server tap-> double click on Tomcat server at localhost-> Ports -> HTTP/1.1

Default port number will be 8080. Change this to 8081. Tomcat version7.0

I have configured tomcat server also in NetBeans IDE 7.4 for JSP. So am facing this issue.

Revitalize answered 19/2, 2014 at 17:19 Comment(0)
P
0

Method 1:

  • type localhost:8080 in your browser to know which process is taking 8080 port
  • uninstall that program

Method 2:

re-install the apache tomcat BUT during installation change the port number. Watch carefully the installation process

Pardoner answered 23/5, 2014 at 10:33 Comment(0)
S
0

Open the terminal in ubuntu (ctrl+shift+t)
sudo gedit /etc/tomcat7/server.xml

change the default port in the server.xml,from 8080 to anything like 8081,8181,8008. Then save the file .

Now the project will work nicely without any interruption.

Selfconfessed answered 20/5, 2015 at 10:32 Comment(0)
H
0

I was having the same problem when my workspace was in E:\ drive. Then I changed my workspace location to C:\User\\ location. The problem seems to be solved now.

Hamel answered 17/11, 2016 at 14:32 Comment(0)
T
0

Go to web.xml add <element> before <web-app> and close </element> after </web-app>

should be somethings like this

<?xml version="1.0" encoding="UTF-8"?>

<element>

<web-app>

....
</web-app>

</element>
Thorman answered 17/1, 2020 at 20:2 Comment(1)
It works for me, my app start working but ended up HTTP status 404 error but anyway at least app started before it wasn't even instantiatedAmmunition
N
-1

Hey i got the solution recently... Just copy the "ROOT" folder FROM C:\Program Files\ Apache Software Foundation\ Tomcat 7.0\ webapps \ TO your_Workspace\ .metadata\ .plugins\ org.eclipse.wst.server.core\ tmp0 \wtpwebapps\ and over write it when asked..

This is needed because eclipse forgets to copy that root folder to its workspace.. Just right click on Apache tomcat 7.0 in servers tab and observe that in location will be workspace metadata by default example:"location:[workspace metadata]". Therefore it will find the root folder which has the welcome page in it and the 404 page not found error will be displayed. Thankyou ..

Novocaine answered 24/8, 2013 at 18:28 Comment(0)
T
-4

nop... just open the four dateis: content.xml; server.xml; tomcat-users.xml and web.xml in the tap servers. There are some text. Change the number of port 8080 to 8081

Tana answered 28/7, 2014 at 20:45 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.