Port Problem
- Launching multiple instance of SpringBoot Server results to crash.
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.4.2)
2021-02-18 15:41:58.469 INFO 11196 --- [ main] c.k.node.NodeServerApplicationKt : Starting NodeServerApplicationKt using Java 14.0.2 on kdr-navi-server with PID 11196 (/home/hyunwoo286_gmail_com/kdr_cl/CLNodeServer/build/libs/NodeServer-0.0.1-SNAPSHOT.jar started by hyunwoo286_gmail_com in /home/hyunwoo286_gmail_com/kdr_cl/CLNodeServer)
2021-02-18 15:41:58.523 INFO 11196 --- [ main] c.k.node.NodeServerApplicationKt : No active profile set, falling back to default profiles: default
2021-02-18 15:41:58.895 WARN 11196 --- [kground-preinit] o.s.h.c.j.Jackson2ObjectMapperBuilder : For Jackson Kotlin classes support please add "com.fasterxml.jackson.module:jackson-module-kotlin" to the classpath
2021-02-18 15:42:01.007 INFO 11196 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)
2021-02-18 15:42:01.047 INFO 11196 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2021-02-18 15:42:01.047 INFO 11196 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.41]
2021-02-18 15:42:01.155 INFO 11196 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2021-02-18 15:42:01.156 INFO 11196 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 2331 ms
2021-02-18 15:42:02.260 INFO 11196 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2021-02-18 15:42:02.543 WARN 11196 --- [ main] ConfigServletWebServerApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.PortInUseException: Port 8080 is already in use
2021-02-18 15:42:02.545 INFO 11196 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2021-02-18 15:42:02.556 INFO 11196 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2021-02-18 15:42:02.586 INFO 11196 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2021-02-18 15:42:02.614 ERROR 11196 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Web server failed to start. Port 8080 was already in use.
Action:
Identify and stop the process that's listening on port 8080 or configure this application to listen on another port.
Cause
- Multiple Port Conflict/collision
Solution
- Just put
--server.port=port_number
after after jar command