-5

I download tomcat on eclipse and it was working fine. but 1 month later I tryed to run it again and I got an error for some reason

ERROR: Port 8080 required by Tomcat v8.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).

What I have tried:

Seem to be tomcat is already running...

#1: I tried going on http://localhost:8080/ but I dont got a welcome screen but I get a login in popup... I didn't have a username or password enter image description here

#2: I click on startup.bat -> shutdown.bat -> run tomcat in eclipse. but no luck

#3: I check the 'Task Manager' but didn't see Tomcat.exe running.

#4: I tried the netstat command and I got the following results. than I use the taskkill... maybe I use the wrong taskkill id. can some one double check it?

C:\Users\dave>netstat -aon

Active Connections

  Proto  Local Address          Foreign Address        State           PID
  TCP    0.0.0.0:135            0.0.0.0:0              LISTENING       1320
  TCP    0.0.0.0:445            0.0.0.0:0              LISTENING       4
  TCP    0.0.0.0:1521           0.0.0.0:0              LISTENING       3100
  TCP    0.0.0.0:1522           0.0.0.0:0              LISTENING       4024
  TCP    0.0.0.0:5500           0.0.0.0:0              LISTENING       4024
  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       3100
  TCP    0.0.0.0:49664          0.0.0.0:0              LISTENING       1044
  TCP    0.0.0.0:49665          0.0.0.0:0              LISTENING       1676
  TCP    0.0.0.0:49666          0.0.0.0:0              LISTENING       688
  TCP    0.0.0.0:49667          0.0.0.0:0              LISTENING       2380
  TCP    0.0.0.0:49671          0.0.0.0:0              LISTENING       1116
  TCP    0.0.0.0:49687          0.0.0.0:0              LISTENING       1148
  TCP    0.0.0.0:49697          0.0.0.0:0              LISTENING       3220
  TCP    0.0.0.0:49705          0.0.0.0:0              LISTENING       4208
  TCP    127.0.0.1:1522         0.0.0.0:0              LISTENING       4024
  TCP    127.0.0.1:1522         127.0.0.1:49706        ESTABLISHED     4024
  TCP    127.0.0.1:2031         0.0.0.0:0              LISTENING       4040
  TCP    127.0.0.1:5037         0.0.0.0:0              LISTENING       11028
  TCP    127.0.0.1:5354         0.0.0.0:0              LISTENING       2976
  TCP    127.0.0.1:49668        0.0.0.0:0              LISTENING       2868
  TCP    127.0.0.1:49674        0.0.0.0:0              LISTENING       3100
  TCP    127.0.0.1:49706        127.0.0.1:1522         ESTABLISHED     4208
  TCP    192.168.2.10:139       0.0.0.0:0              LISTENING       4
  TCP    192.168.2.10:11316     0.0.0.0:0              LISTENING       6600
  TCP    192.168.2.10:49787     209.10.120.24:80       CLOSE_WAIT      2672
  TCP    192.168.2.10:49917     216.58.219.234:443     ESTABLISHED     9884
  TCP    192.168.2.10:52540     193.85.216.236:80      ESTABLISHED     2672
  TCP    192.168.2.10:52600     65.52.108.205:443      ESTABLISHED     6500
  TCP    192.168.2.10:52619     173.194.66.125:5222    ESTABLISHED     9884
  TCP    192.168.2.10:55224     216.58.219.238:443     ESTABLISHED     8520
  TCP    192.168.2.10:55262     74.125.22.95:443       ESTABLISHED     9884
  TCP    192.168.2.10:55265     74.125.29.91:443       ESTABLISHED     8520
  TCP    192.168.2.10:55266     172.217.4.206:443      ESTABLISHED     8520
  TCP    192.168.2.10:55271     216.58.219.237:443     ESTABLISHED     9884
  TCP    [::]:135               [::]:0                 LISTENING       1320
  TCP    [::]:445               [::]:0                 LISTENING       4
  TCP    [::]:1521              [::]:0                 LISTENING       3100
  TCP    [::]:1522              [::]:0                 LISTENING       4024
  TCP    [::]:5500              [::]:0                 LISTENING       4024
  TCP    [::]:8080              [::]:0                 LISTENING       3100
  TCP    [::]:49664             [::]:0                 LISTENING       1044
  TCP    [::]:49665             [::]:0                 LISTENING       1676
  TCP    [::]:49666             [::]:0                 LISTENING       688
  TCP    [::]:49667             [::]:0                 LISTENING       2380
  TCP    [::]:49671             [::]:0                 LISTENING       1116
  TCP    [::]:49687             [::]:0                 LISTENING       1148
  TCP    [::]:49697             [::]:0                 LISTENING       3220
  TCP    [::]:49705             [::]:0                 LISTENING       4208
  TCP    [::1]:2031             [::]:0                 LISTENING       4040
  TCP    [::1]:49672            [::]:0                 LISTENING       4024
  TCP    [::1]:49955            [::]:0                 LISTENING       1952
  TCP    [fe80::394e:2f21:75ae:9f92%13]:1521  [fe80::394e:2f21:75ae:9f92%13]:49691  ESTABLISHED     3100
  TCP    [fe80::394e:2f21:75ae:9f92%13]:49691  [fe80::394e:2f21:75ae:9f92%13]:1521  ESTABLISHED     3220
  TCP    [fe80::394e:2f21:75ae:9f92%13]:54211  [fe80::394e:2f21:75ae:9f92%13]:54213  ESTABLISHED     3220
  TCP    [fe80::394e:2f21:75ae:9f92%13]:54212  [fe80::394e:2f21:75ae:9f92%13]:54214  ESTABLISHED     3220
  TCP    [fe80::394e:2f21:75ae:9f92%13]:54213  [fe80::394e:2f21:75ae:9f92%13]:54211  ESTABLISHED     3100
  TCP    [fe80::394e:2f21:75ae:9f92%13]:54214  [fe80::394e:2f21:75ae:9f92%13]:54212  ESTABLISHED     3100
  UDP    0.0.0.0:3702           *:*                                    988
  UDP    0.0.0.0:3702           *:*                                    988
  UDP    0.0.0.0:5353           *:*                                    2248
  UDP    0.0.0.0:5355           *:*                                    2248
  UDP    0.0.0.0:49664          *:*                                    2976
  UDP    0.0.0.0:58538          *:*                                    988
  UDP    127.0.0.1:1900         *:*                                    1704
  UDP    127.0.0.1:56478        *:*                                    1704
  UDP    192.168.2.10:137       *:*                                    4
  UDP    192.168.2.10:138       *:*                                    4
  UDP    192.168.2.10:1900      *:*                                    1704
  UDP    192.168.2.10:5353      *:*                                    2976
  UDP    192.168.2.10:11316     *:*                                    6600
  UDP    192.168.2.10:56477     *:*                                    1704
  UDP    [::]:3702              *:*                                    988
  UDP    [::]:3702              *:*                                    988
  UDP    [::]:5353              *:*                                    2248
  UDP    [::]:5355              *:*                                    2248
  UDP    [::]:49665             *:*                                    2976
  UDP    [::]:58539             *:*                                    988
  UDP    [::1]:1900             *:*                                    1704
  UDP    [::1]:56476            *:*                                    1704
  UDP    [fe80::394e:2f21:75ae:9f92%13]:1900  *:*                                    1704
  UDP    [fe80::394e:2f21:75ae:9f92%13]:56475  *:*                                    1704

C:\Users\dave>taskkill /F /PID 3100
ERROR: The process with PID 3100 could not be terminated.
Reason: Access is denied.
user1924249
  • 543
  • 2
  • 10
  • 30
  • why the negative vote? I tried every thing and added all the detail – user1924249 Jul 09 '16 at 19:47
  • You can try to change Tomcat port: http://stackoverflow.com/questions/18415578/how-to-change-tomcat-port-number another example: http://stackoverflow.com/questions/4756039/how-to-change-the-port-of-tomcat-from-8080-to-80 – Giupo Jul 09 '16 at 19:49
  • I changed to port 9090 but no luck – user1924249 Jul 09 '16 at 19:58
  • Your `netstat` output shows that port `8080` is in use by process `3100`. Look at process `3100` in Task Manager and you'll see what that process is. If you're on Windows 10, you'll see the process id on the Details tab. – Andreas Jul 09 '16 at 20:00
  • 1
    The "Access is denied" from `taskkill` is probably because you're not running the command prompt is admin mode. – Andreas Jul 09 '16 at 20:04
  • I'm voting to close this question as off-topic because it belongs on another Stack Exchange site such as "Server Fault" or "SuperUser". – Basil Bourque Jul 10 '16 at 03:44
  • why the so much hate on this website? – user1924249 Jul 10 '16 at 21:22
  • You are getting authentication prompt which means tomcat running outside Eclipse somewhere. Find all Tomcat installations on your machine! – Ved Jul 12 '16 at 07:26

3 Answers3

1

I can quickly think of 2 possibilities from your question/comments -

  1. You have installed tomcat at two different locations (1 used by Eclipse and other tomcat source) Usually developers download tomcat to run standalone Java applications irrespective of IDEs.

  2. process javaw.exe (OR java.exe sometimes) running in your machine. Also, process might be added in startup programs so every time you start machine, it is started. Try to end this process from task manager and then restart Eclipse. You should get tomcat running.

If none of above works, I insist you to create another Workspace in Eclipse and add tomcat there to run your application.

Hope this helps.

Ved
  • 7,667
  • 6
  • 33
  • 68
1

Step 1: (open the CMD command)

 C:\Users\username>netstat -o -n -a | findstr 0.0:8080

 TCP 0.0.0.0:3000 0.0.0.0:0 LISTENING 3116

 Now , we can see that LISTENING port is 3116 for 8080 ,

 We need to kill 3116 now

Step 2:-

 C:\Users\username>taskkill /F /PID 3116

Step 3:

Go to Eclipse and start Server , it will run

OR

you can change port number in folder  servers>Tomcat>server.xml
chethu
  • 305
  • 1
  • 5
  • 15
0

Open Command prompt with run as administrator and type taskkill /F /PID 3100 then it will terminate the process

https://i.stack.imgur.com/Co5Tg.png -- screenshot for Access is denied https://i.stack.imgur.com/JwZTv.png -- screenshot for successfully terminated

Ashwini
  • 541
  • 8
  • 5