0

我正在从 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.
4

3 回答 3

1

configure this application to listen on another port.

当应用程序已经运行时会发生上述错误。

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

于 2020-08-13T14:58:00.713 回答
0

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

有什么解决方案。

于 2020-09-07T12:58:43.873 回答
0

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

更新:您需要添加这行代码以使其与 apache 一起使用

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

端口 0 将让系统在绑定操作中选择一个临时端口

于 2020-08-21T10:06:49.327 回答