Tomcat shutdown unexpectedly
Solution 1
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).
Solution 2
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.
Related videos on Youtube
Eyosiyas Tadele
Experienced in designing, coding, testing and maintaining both UI and server-side web solutions. Proficient in UI frameworks like React & also developing REST APIs on SQL and NoSQL databases. Interested in joining a company with rich ML, AI and Big Data experience.
Updated on June 04, 2022Comments
-
Eyosiyas Tadele almost 2 years
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