将Spring Boot从2.2.2升级到2.3.2时出现错误

时间:2020-08-13 14:12:23

标签: java spring spring-boot gradle spring-boot-2

我正在从Spring Boot 2.2.2升级到2.3.2.RELEASE,并遇到以下错误。我确定它与已经在使用的端口无关。另外,根据Spring Boot 2.3.2,我将日志记录从logging.file更改为logging.file.name

WARN  [framework_5_5][traceId:][spanId:][parentSpanId:][spanExportable:][bt:@build.time@][cbn:@current.branch@][main][2020-08-20 15:22:29,317]- org.springframework.context.support.AbstractApplicationContext.refresh:Line 559 - Exception encountered during context initialization - cancelling refresh attempt: org.springframework.context.ApplicationContextException: Failed to start bean 'webServerStartStop'; nested exception is org.springframework.boot.web.embedded.tomcat.ConnectorStartFailedException: Connector configured to listen on port 10090 failed to start
INFO  [framework_5_5][traceId:][spanId:][parentSpanId:][spanExportable:][bt:@build.time@][cbn:@current.branch@][main][2020-08-20 15:22:29,321]- org.springframework.scheduling.concurrent.ExecutorConfigurationSupport.shutdown:Line 218 - Shutting down ExecutorService 'applicationTaskExecutor'
INFO  [framework_5_5][traceId:][spanId:][parentSpanId:][spanExportable:][bt:@build.time@][cbn:@current.branch@][main][2020-08-20 15:22:29,324]- com.zaxxer.hikari.HikariDataSource.close:Line 350 - HikariPool-1 - Shutdown initiated...
INFO  [framework_5_5][traceId:][spanId:][parentSpanId:][spanExportable:][bt:@build.time@][cbn:@current.branch@][main][2020-08-20 15:22:29,329]- com.zaxxer.hikari.HikariDataSource.close:Line 352 - HikariPool-1 - Shutdown completed.
INFO  [framework_5_5][traceId:][spanId:][parentSpanId:][spanExportable:][bt:@build.time@][cbn:@current.branch@][main][2020-08-20 15:22:29,329]- com.zaxxer.hikari.HikariDataSource.close:Line 350 - HikariPool-2 - Shutdown initiated...
INFO  [framework_5_5][traceId:][spanId:][parentSpanId:][spanExportable:][bt:@build.time@][cbn:@current.branch@][main][2020-08-20 15:22:29,337]- com.zaxxer.hikari.HikariDataSource.close:Line 352 - HikariPool-2 - Shutdown completed.
INFO  [framework_5_5][traceId:][spanId:][parentSpanId:][spanExportable:][bt:@build.time@][cbn:@current.branch@][main][2020-08-20 15:22:29,353]- org.springframework.boot.autoconfigure.logging.ConditionEvaluationReportLoggingListener.logMessage:Line 136 - 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
ERROR [framework_5_5][traceId:][spanId:][parentSpanId:][spanExportable:][bt:@build.time@][cbn:@current.branch@][main][2020-08-13 19:20:31,769]- org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter.report:Line 40 - 
***************************
APPLICATION FAILED TO START
***************************

Description:

The Tomcat connector configured to listen on port 10090 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 10090, or configure this application to listen on another port.

3 个答案:

答案 0 :(得分:1)

configure this application to listen on another port.

当应用程序已经在运行时,发生以上错误。

如果使用的是Eclipse或Intellij,则可以重新启动并运行该应用程序。

答案 1 :(得分:0)

我添加了 ((AbstractAjpProtocol<Long>)ajpConnector.getProtocolHandler()).setSecretRequired(false); 使用ajp连接器并解决了问题

已更新: 您需要添加以下代码行才能使其与apache一起使用

protocol.setAddress(new InetSocketAddress(0).getAddress());

零端口将使系统通过绑定操作选择一个临时端口

答案 2 :(得分:0)

因为我不允许在此处输入评论?

对此有什么解决方案。