Spring Boot: The Tomcat connector configured to listen on port 8080 failed to start

spring boot change port
how to change tomcat port in spring boot
another server is running at port 6060 already please stop it or change the default port to continue
severe failed to start connector
tomcat connector configuration spring boot
exception in thread main'' java lang illegalstateexception tomcat connector in failed state
whitelabel error page
tomcat port=8080

I was running a Spring Boot program and at first everything went fine. But after I hit ctrl + c and stopped the program, I restart the program and met the following error:

***************************
APPLICATION FAILED TO START
***************************

Description:

The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured.

Action:

Verify the connector's configuration, identify and stop any process that's listening on port 8080, or configure this application to listen on another port.

My program is a jar file, so I start it with java -jar myJar, and stop it by ctrl + c.

At first I thought this was because port 8080 was used. But when I tried the following commands I found there was nothing running on port 8080,

lsof -i:8080 # shows nothing
sudo lsof -i tcp:8000 # shows nothing

So I think there's no process running on port 8080 but why spring gives me that error?

I've tried another port 8081 and met the same problem again. But when I use server.port=0, it works. Can anyone give some suggestions on what to do? Thanks so much!!


I meet with similar issue when the web server visit is busy, so your server socket may have TIME_WAIT state, in this case the tomcat-embeded-server in spring boot can't bind this port because SO_REUSEADDR is not set to true

so my solution is to use Jetty in spring boot, you can change your pom.xml

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-web</artifactId>
    <exclusions>
        <exclusion>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
        </exclusion>
    </exclusions>
</dependency>

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-jetty</artifactId>
</dependency>

Spring Boot application in eclipse, the Tomcat connector configured , Spring Boot- The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be  Spring Boot- Embedded Tomcat failed to start. The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured. Spring Boot application failed to start. P.S- Tested with Spring Boot 2.0.7.RELEASE.


It happens when you press ctrl+c when tomcat is running. This will turn the port to waiting. Firstly freeing up state by using this command: fuser 8080 -k then run the program again.

Spring Boot- The Tomcat connector configured to listen on port 8080 , During the process of learning SpringBoot, I encountered various problems. org.​apache.catalina.LifecycleException: Failed to start component  To display the conditions report re-run your application with 'debug' enabled. 2018-07-12 20:35:17.820 ERROR 2812 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : ***** APPLICATION FAILED TO START ***** Description: The Tomcat connector configured to listen on port 8080 failed to start.


I experience the similar issue when i was using ServerSocketIO. Problem in my code was, where Thread.sleep was used just after server.start(). So in ideal case if you just inject the ServerSocketIO bean and invoke the start method on it, Tomcat server will server the incoming request. handling of socket shutdown needs to be handled gracefully though in case of application crash or something...

The Tomcat connector configured to listen on port 8080 failed to start., Tomcat connector configured to listen port 8443 failed to start. #20 2018-02-08 16:00:12,149 ERROR [org.springframework.boot.diagnostics. 2018-06-26 20:48:01.000 ERROR 15332 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter : ***** APPLICATION FAILED TO START ***** Description: The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured.


Tomcat connector configured to listen port 8443 failed to start. · Issue , The Tomcat connector configured to listen on port 8080 failed to start. The port may Closing org.springframework.boot.context.embedded. Spring Boot application in eclipse, the Tomcat connector configured to listen on port XXXX failed to start (6) Find the process ID (PID) for the port (e.g.: 8080 ) On Windows:


application fail to start, Jan 20, 2019 - Spring Boot- The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be  Description: The Tomcat connector configured to listen on port 8080 failed to start. The port may already be in use or the connector may be misconfigured. Action: Verify the connector's configuration, identify and stop any process that's listening on port 8080, or configure this application to listen on another port.


The tomcat connector configured to listen on port 8080 failed to start , Solution: I know the solution for this issue. Go to your command prompt by just clicking on your Start and then typing cmd. In your command  The context for the first test will be cached and kept open while the second test is running. Both tests are configured to use the same port for Tomcat's connector. As a result, when the second test is run, the context fails to start due to a port clash with the connector from the first test. You have a few options: Use RANDOM_PORT