Tomcat start up error
Asked Answered
T

4

13

I am getting the following error in the Catalina log file while starting Tomcat on Windows:

Sep 3, 2010 3:22:53 PM org.apache.catalina.startup.Catalina start
SEVERE: Catalina.start: 
LifecycleException:  service.getName(): "Catalina";  Protocol handler start failed: java.lang.Exception: Socket bind failed: [730048] Only one usage of each socket address (protocol/network address/port) is normally permitted.  
    at org.apache.catalina.connector.Connector.start(Connector.java:1138)
    at org.apache.catalina.core.StandardService.start(StandardService.java:531)
    at org.apache.catalina.core.StandardServer.start(StandardServer.java:710)
    at org.apache.catalina.startup.Catalina.start(Catalina.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)
    at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413)
Sep 3, 2010 3:22:53 PM org.apache.catalina.startup.Catalina start
INFO: Server startup in 67604 ms

But when I changed the port number from 8080 to 9000 then there was no error but the request to http://localhost:9000/ gives the 404 error The requested resource (/) is not available.

Am I missing something?

Tomblin answered 3/9, 2010 at 10:6 Comment(3)
looks like you started Tomcat when it was already runningNavicular
how did you change the port, which line did you change?Navicular
On my computer is was SkypeOringas
M
18

One application is using the 8080 port. To find out which one, use the following command on Windows Command Prompt:

C:\>netstat -aon | findstr 0.0:8080

Then take the number in the last column (that's the process ID) and find out which is the process in task manager. If nothing comes out of the command, then you have no application using that port.

Morley answered 17/2, 2011 at 13:16 Comment(0)
E
3
C:\>netstat -aon | findstr 0.0:8080

This had fixed it , by just clearing the process with this id from the processes and restarting TomCat.

Elvieelvin answered 28/5, 2012 at 2:37 Comment(0)
S
0

You need to start tomcat at port 80 as root user.Other port do not.

Sardella answered 11/1, 2012 at 9:41 Comment(0)
L
0

Another process is using that port (probably another Tomcat instance).

If you don't want to use another port for your actual Tomcat instance, you need to kill that process.

cmd

  • 1 line

    for /f "tokens=5" %a in ('netstat -ao ^| findstr 0.0.8080') do taskkill /pid %a
    

    or

  • 2 lines

    • get PID

      netstat -ao | findstr 0.0:8080
      

      you get something like this:

      TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING       5180
      

      (the last value is the PID - use it in the following command)

    • kill process

      taskkill /pid <pid>
      
Laity answered 15/1, 2016 at 12:48 Comment(1)
I found Tomcat itself using 8080 port. So killing that stops server. How it can be possible as tomcat occupying port then given org.apache.catalina.LifecycleException: Protocol handler start failed.Jola

© 2022 - 2024 — McMap. All rights reserved.