💛 Environment: windows10, centos7.5.1804
linux_debug:Failed to start bean ‘webServerStartStop’; nested exception is org. springframework. boot.
1. Error information
2022-07-08 18:12:25.088 ERROR 33600 --- [ main] o.s.boot.SpringApplication : Application run failed
org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:181) ~[spring-context-5.3.21.jar!/:5.3.21]
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:54) ~[spring-context-5.3.21.jar!/:5.3.21]
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:356) ~[spring-context-5.3.21.jar!/:5.3.21]
at java.lang.Iterable.forEach(Iterable.java:75) ~[na:1.8.0_333]
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:155) ~[spring-context-5.3.21.jar!/:5.3.21]
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:123) ~[spring-context-5.3.21.jar!/:5.3.21]
2. Problem description
When running the jar package made by springboot project on Linux;
If the above problem occurs, port 8080 is occupied;
3. Solutions
Close the occupied 8080 port;
3.1 windows
Enter in CMD
# Find the corresponding pid
netstat -ano | findstr 8080
## out:TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 6148
Close the PID number corresponding to the port, assuming that port 8080 corresponds to the process number with process number 123
taskkill /pid 6148 -t -f
3.2 linux
Enter in CMD
# Find the corresponding pid
netstat -ano | grep 8080
## out:TCP 0.0.0.0:8080 0.0.0.0:0 LISTENING 6148
Close the PID number corresponding to the port, assuming that port 8080 corresponds to the process number with process number 123
kill -9 PID 123
Read More:
- Failed to start firewalld.service: Unit is masked [How to Solve]
- [Solved] Go use zoom to connect DM database and start reporting error in Linux
- [Solved] Ubuntu 20.04.3 Fail to Start sshd Error: Failed to start OpenBSD Secure Shell server
- [Solved] Web server failed to start. Port 8080 was already in use.
- Prompt “entering emergency mode. Exit the shell to continue” if the Linux operating system does not start normally
- Linux First Install oracle Start Error [How to Solve]
- [Solved] Using GCP copy to report errors in Linux: DBUS. Exceptions. Dbusexception: org. Freedesktop. DBUS. Error. Notsupported:
- [Solved] Centos7 firewalld startup error: Failed to start firewalld.service: Unit is masked.
- Win10 Start Linux error: Error: 0x800701bc WSL 2 [How to Solve]
- Linux Error: Failed to connect to ::1: No route to the host
- [Solved] Failed to start LSB: Bring up/down networking
- [Solved] Linux — 9 — txt files are copied from windows to Linux and read error
- linux yum Error: PYCURL ERROR 6 – “Couldn’t resolve host ‘mirrorlist.centos.org’”
- [FAILED] Failed to start Raise network interfaces
- [Solved] Linux Service Start Error: *.service: Main process exited, code=exited, status=203/EXEC
- [Solved] OCI runtime create failed: runc create failed: unable to start container process:
- Linux Execution Error “service mysqld start“error while loading shared libraries: libaio.so.1“
- [Solved] Virtual machine Failed to restart network Error: Error:Failed to start LSB: Bring up/down networking
- [Solved] failed to start remount root and kernel file system
- Linux Nagios failed to log in to internal server error (Fixed)