报错内容
/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/bin/java -XX:TieredStopAtLevel=1 -noverify -Dspring.output.ansi.enabled=always -javaagent:/Applications/IntelliJ IDEA.app/Contents/lib/idea_rt.jar=50419:/Applications/IntelliJ IDEA.app/Contents/bin -Dcom.sun.management.jmxremote -Dspring.jmx.enabled=true -Dspring.liveBeansView.mbeanDomain -Dspring.application.admin.enabled=true -Dfile.encoding=UTF-8 -classpath /Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/cat.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/charsets.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/cldrdata.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/crs-agent.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/dnsns.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/jaccess.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/legacy8ujsse.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/localedata.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/nashorn.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/openjsse.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/sunec.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/sunjce_provider.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/sunpkcs11.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/ext/zipfs.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/jce.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/jfr.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/jsse.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/management-agent.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/resources.jar:/Library/Java/JavaVirtualMachines/zulu-8.jdk/Contents/Home/jre/lib/rt.jar:/Users/ivan/code/chiyou-plus/chiyou-plus-schedule/target/classes:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/boot/spring-boot-starter/2.3.12.RELEASE/spring-boot-starter-2.3.12.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/boot/spring-boot/2.3.12.RELEASE/spring-boot-2.3.12.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/spring-context/5.2.15.RELEASE/spring-context-5.2.15.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/boot/spring-boot-autoconfigure/2.3.12.RELEASE/spring-boot-autoconfigure-2.3.12.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/boot/spring-boot-starter-logging/2.3.12.RELEASE/spring-boot-starter-logging-2.3.12.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/ch/qos/logback/logback-classic/1.2.3/logback-classic-1.2.3.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/ch/qos/logback/logback-core/1.2.3/logback-core-1.2.3.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/slf4j/slf4j-api/1.7.30/slf4j-api-1.7.30.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/apache/logging/log4j/log4j-to-slf4j/2.13.3/log4j-to-slf4j-2.13.3.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/apache/logging/log4j/log4j-api/2.13.3/log4j-api-2.13.3.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/slf4j/jul-to-slf4j/1.7.30/jul-to-slf4j-1.7.30.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/jakarta/annotation/jakarta.annotation-api/1.3.5/jakarta.annotation-api-1.3.5.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/spring-core/5.2.15.RELEASE/spring-core-5.2.15.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/spring-jcl/5.2.15.RELEASE/spring-jcl-5.2.15.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/yaml/snakeyaml/1.26/snakeyaml-1.26.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/boot/spring-boot-starter-web/2.3.12.RELEASE/spring-boot-starter-web-2.3.12.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/boot/spring-boot-starter-json/2.3.12.RELEASE/spring-boot-starter-json-2.3.12.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/com/fasterxml/jackson/core/jackson-databind/2.11.4/jackson-databind-2.11.4.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/com/fasterxml/jackson/core/jackson-annotations/2.11.4/jackson-annotations-2.11.4.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/com/fasterxml/jackson/core/jackson-core/2.11.4/jackson-core-2.11.4.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/com/fasterxml/jackson/datatype/jackson-datatype-jdk8/2.11.4/jackson-datatype-jdk8-2.11.4.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/com/fasterxml/jackson/datatype/jackson-datatype-jsr310/2.11.4/jackson-datatype-jsr310-2.11.4.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/com/fasterxml/jackson/module/jackson-module-parameter-names/2.11.4/jackson-module-parameter-names-2.11.4.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/boot/spring-boot-starter-tomcat/2.3.12.RELEASE/spring-boot-starter-tomcat-2.3.12.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/apache/tomcat/embed/tomcat-embed-core/9.0.46/tomcat-embed-core-9.0.46.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/glassfish/jakarta.el/3.0.3/jakarta.el-3.0.3.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/apache/tomcat/embed/tomcat-embed-websocket/9.0.46/tomcat-embed-websocket-9.0.46.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/spring-web/5.2.15.RELEASE/spring-web-5.2.15.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/spring-beans/5.2.15.RELEASE/spring-beans-5.2.15.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/spring-webmvc/5.2.15.RELEASE/spring-webmvc-5.2.15.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/spring-aop/5.2.15.RELEASE/spring-aop-5.2.15.RELEASE.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/springframework/spring-expression/5.2.15.RELEASE/spring-expression-5.2.15.RELEASE.jar:/Users/ivan/code/chiyou-plus/chiyou-plus-common/chiyou-plus-common-mail/target/classes:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/javax/mail/mail/1.5.0-b01/mail-1.5.0-b01.jar:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/javax/activation/activation/1.1/activation-1.1.jar:/Users/ivan/code/chiyou-plus/chiyou-plus-common/chiyou-plus-common-core/target/classes:/Users/ivan/code/softwares/apache-maven-3.6.3/repo/org/projectlombok/lombok/1.18.20/lombok-1.18.20.jar com.shuwei.dai.schedule.ChiyouPlusScheduleApplication
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.3.12.RELEASE)
2022-10-29 00:23:05.460 INFO 79997 --- [ main] c.s.d.s.ChiyouPlusScheduleApplication : Starting ChiyouPlusScheduleApplication on ivandeMBP with PID 79997 (/Users/ivan/code/chiyou-plus/chiyou-plus-schedule/target/classes started by ivan in /Users/ivan/code/chiyou-plus)
2022-10-29 00:23:05.461 INFO 79997 --- [ main] c.s.d.s.ChiyouPlusScheduleApplication : No active profile set, falling back to default profiles: default
2022-10-29 00:23:05.866 INFO 79997 --- [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 90001 (http)
2022-10-29 00:23:05.870 INFO 79997 --- [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]
2022-10-29 00:23:05.870 INFO 79997 --- [ main] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.46]
2022-10-29 00:23:05.897 INFO 79997 --- [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext
2022-10-29 00:23:05.897 INFO 79997 --- [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 409 ms
2022-10-29 00:23:05.974 INFO 79997 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Initializing ExecutorService 'applicationTaskExecutor'
2022-10-29 00:23:06.033 INFO 79997 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Initializing ExecutorService 'taskScheduler'
2022-10-29 00:23:06.046 WARN 79997 --- [ 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.WebServerException: Unable to start embedded Tomcat server
2022-10-29 00:23:06.046 INFO 79997 --- [ main] o.s.s.c.ThreadPoolTaskScheduler : Shutting down ExecutorService 'taskScheduler'
2022-10-29 00:23:06.046 INFO 79997 --- [ main] o.s.s.concurrent.ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor'
2022-10-29 00:23:06.047 INFO 79997 --- [ main] o.apache.catalina.core.StandardService : Stopping service [Tomcat]
2022-10-29 00:23:06.052 INFO 79997 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-10-29 00:23:06.061 ERROR 79997 --- [ 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:185) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor.access$200(DefaultLifecycleProcessor.java:53) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor$LifecycleGroup.start(DefaultLifecycleProcessor.java:360) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor.startBeans(DefaultLifecycleProcessor.java:158) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor.onRefresh(DefaultLifecycleProcessor.java:122) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:895) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:554) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:755) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:402) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1247) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1236) [spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at com.shuwei.dai.schedule.ChiyouPlusScheduleApplication.main(ChiyouPlusScheduleApplication.java:9) [classes/:na]
Caused by: org.springframework.boot.web.server.WebServerException: Unable to start embedded Tomcat server
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:229) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.web.servlet.context.WebServerStartStopLifecycle.start(WebServerStartStopLifecycle.java:43) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.context.support.DefaultLifecycleProcessor.doStart(DefaultLifecycleProcessor.java:182) ~[spring-context-5.2.15.RELEASE.jar:5.2.15.RELEASE]
... 14 common frames omitted
Caused by: java.lang.IllegalArgumentException: standardService.connector.startFailed
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:243) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:282) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:213) ~[spring-boot-2.3.12.RELEASE.jar:2.3.12.RELEASE]
... 16 common frames omitted
Caused by: org.apache.catalina.LifecycleException: Protocol handler start failed
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1075) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
at org.apache.catalina.core.StandardService.addConnector(StandardService.java:239) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
... 18 common frames omitted
Caused by: java.lang.IllegalArgumentException: port out of range:90001
at java.net.InetSocketAddress.checkPort(InetSocketAddress.java:143) ~[na:1.8.0_345]
at java.net.InetSocketAddress.<init>(InetSocketAddress.java:188) ~[na:1.8.0_345]
at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:299) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:253) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1204) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1290) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:614) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
at org.apache.catalina.connector.Connector.startInternal(Connector.java:1072) ~[tomcat-embed-core-9.0.46.jar:9.0.46]
... 20 common frames omitted
Process finished with exit code 1
解决办法:
如果确认没有引错包,版本匹配没有问题的话,就是端口被占用,或者端口超出规定范围,TCP协议的端口是2字节16位表示,最多为2^16-1=65535个,将端口号设置在这个范围内就好了。