Reputation: 303
I have been working on xampp tomcat server and I'm new for it. I configured it and starts the xampp tomcat. It works fine and I see all the ports I configured perfectly but after 3 minutes it shows me this error
"Error: Tomcat shutdown unexpectedly.
4:55:38 PM [Tomcat] This may be due to a blocked port, missing dependencies,
4:55:38 PM [Tomcat] improper privileges, a crash, or a shutdown by another method.
4:55:38 PM [Tomcat] Press the Logs button to view error logs and check
4:55:38 PM [Tomcat] the Windows Event Viewer for more clues
4:55:38 PM [Tomcat] If you need more help, copy and post this
4:55:38 PM [Tomcat] entire log window on the forums"
I opened the Catalina log to get more info and I noticed this java eror:
SEVERE: Failed to initialize connector [Connector[HTTP/1.1-8080]]
org.apache.catalina.LifecycleException: Failed to initialize component [Connector[HTTP/1.1-8080]]
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:106)
at org.apache.catalina.core.StandardService.initInternal(StandardService.java:559)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.core.StandardServer.initInternal(StandardServer.java:814)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
at org.apache.catalina.startup.Catalina.load(Catalina.java:640)
at org.apache.catalina.startup.Catalina.load(Catalina.java:665)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.apache.catalina.startup.Bootstrap.load(Bootstrap.java:281)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:455)
Caused by: org.apache.catalina.LifecycleException: Protocol handler initialization failed
at org.apache.catalina.connector.Connector.initInternal(Connector.java:983)
at org.apache.catalina.util.LifecycleBase.init(LifecycleBase.java:102)
... 12 more
Caused by: java.net.BindException: Address already in use: JVM_Bind <null>:8080
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:406)
at org.apache.tomcat.util.net.AbstractEndpoint.init(AbstractEndpoint.java:610)
at org.apache.coyote.AbstractProtocol.init(AbstractProtocol.java:429)
at org.apache.coyote.http11.AbstractHttp11JsseProtocol.init(AbstractHttp11JsseProtocol.java:119)
at org.apache.catalina.connector.Connector.initInternal(Connector.java:981)
... 13 more
Caused by: java.net.BindException: Address already in use: JVM_Bind
at java.net.DualStackPlainSocketImpl.bind0(Native Method)
at java.net.DualStackPlainSocketImpl.socketBind(DualStackPlainSocketImpl.java:106)
at java.net.AbstractPlainSocketImpl.bind(AbstractPlainSocketImpl.java:382)
at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:190)
at java.net.ServerSocket.bind(ServerSocket.java:375)
at java.net.ServerSocket.<init>(ServerSocket.java:237)
at java.net.ServerSocket.<init>(ServerSocket.java:181)
at org.apache.tomcat.util.net.DefaultServerSocketFactory.createSocket(DefaultServerSocketFactory.java:49)
at org.apache.tomcat.util.net.JIoEndpoint.bind(JIoEndpoint.java:393)
... 17 more
Upvotes: 3
Views: 21709
Reputation: 41
This means your port (8080) for the Tomcat Server is currently utilized by another service. You can resolve this in two ways:
Option 1: Change the Tomcat server port
Step 1: Navigate to the server.xml; by either clicking on the "Config" button on your control panel or go to this directory C:\xampp\tomcat\conf.
Step 2: Ctrl + F to search for 8080 and change port 8080 to a higher number and save.
Step 3: Then try again.
Option 2: Kill/Stop all processes using port 8080 and 8005.
Step 1: Open CMD on your device (Windows: windows button + R, then type cmd and hit enter).
Step 2: Type this command "netstat -aon find str | 8080".
Step 3: Look for all processes running on these ports and identify their PIDs.
Step 4: Type this command "taskkill /PID 12345 /F" where 12345 is the identified PID.
Step 5: Repeat for other identified PIDS.
Step 6: Try to start the Tomcat Server again.
Upvotes: 0
Reputation: 31710
This is the cause:
Caused by: java.net.BindException: Address already in use: JVM_Bind :8080
It means the server is trying to bind to port 8080
but your machine already has something bound there. Make sure one of your other processes isn't taking up that port, or select another one (probably in server.xml
) to use.
Upvotes: 2
Reputation: 17534
See :
Caused by: java.net.BindException: Address already in use: JVM_Bind
The port that Tomcat is configured to use, is already in use by another application.
Either shutdown the other application, or edit your server.xml
file to use another port (the default one is 8080).
Upvotes: 2