Launching Spring Application Address Already in Use

Launching Spring application Address already in use

Spring Boot uses embedded Tomcat by default, but it handles it differently without using tomcat-maven-plugin. To change the port use --server.port parameter for example:

java -jar target/gs-serving-web-content-0.1.0.jar --server.port=8181

Update. Alternatively put server.port=8181 into application.properties (or application.yml).

Tomcat address already in use error due to two applications running on local machine

You can set the server port in application.properties

server.port=8081

or application.yml:

server:
port: 8081

One of both files is probably present in src/main/resources, if not, you can create one.

Java - Spring Boot - fails to start Web server on port 8080

This looks very similar to a previous question: Launching Spring application Address already in use.

You may already have the server running on that port, and need to stop it before relaunching.

You can also use a different port, such as 8181.

java.net.BindException: Address already in use in tomcat

The java.net.BindException: was solved with the scenario provided above together with help from the comments.

But the Internal Server Error was caused by missing module setEnv in server configuration of tomcat. Added that module to the server I could access the application without an error.



Related Topics



Leave a reply



Submit