英文:
Getting error when upgrading spring boot from 2.2.2 to 2.3.2.RELEASE
问题
我正在从Spring Boot 2.2.2升级到2.3.2.RELEASE,并遇到以下错误。我确信与已使用的端口无关。另外,我已根据Spring Boot 2.3.2的要求将日志从logging.file
更改为logging.file.name
。
警告 [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 - 在上下文初始化期间遇到异常 - 取消刷新尝试:org.springframework.context.ApplicationContextException: 无法启动bean 'webServerStartStop';嵌套异常是org.springframework.boot.web.embedded.tomcat.ConnectorStartFailedException:配置为监听端口10090的连接器无法启动
信息 [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 - 关闭ExecutorService 'applicationTaskExecutor'
信息 [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 - 关闭初始化...
信息 [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 - 关闭完成。
信息 [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 - 关闭初始化...
信息 [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 - 关闭完成。
信息 [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 -
启动应用程序时发生错误。要显示条件报告,请使用'debug'启动应用程序。
错误 [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 -
***************************
应用程序启动失败
***************************
描述:
配置为监听端口10090的Tomcat连接器无法启动。端口可能已被占用,或连接器可能配置错误。
操作:
验证连接器的配置,识别并停止任何在端口10090上监听的进程,或将此应用程序配置为监听另一个端口。
英文:
I am upgrading from spring boot 2.2.2 to 2.3.2.RELEASE and getting below error. I am sure that it is not related to the port which is already in use. Also, I have changed the logging from logging.file to logging.file.name as per spring boot 2.3.2
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.
答案1
得分: 1
Configure this application to listen on another port.
Above errors occurs when application is already running.
If you are using Eclipse or Intellij, could restart and run the application.
英文:
configure this application to listen on another port.
Above errors occurs when application is already running.
If you are using Eclipse or Intellij, could restart and run the application.
答案2
得分: 0
我已经添加了以下代码部分,问题已解决:
((AbstractAjpProtocol<Long>)ajpConnector.getProtocolHandler()).setSecretRequired(false);
更新:
要使其与Apache一起工作,您需要添加以下代码行:
protocol.setAddress(new InetSocketAddress(0).getAddress());
端口零将允许系统在绑定操作中选择一个临时端口。
英文:
I have added
((AbstractAjpProtocol<Long>)ajpConnector.getProtocolHandler()).setSecretRequired(false);
with ajp connector and issue is resolved
Updated:
You need to add this line of code to make it work with apache
protocol.setAddress(new InetSocketAddress(0).getAddress());
Port zero will let the system pick up an ephemeral port in a bind operation
答案3
得分: 0
这里是你要的翻译:
"As i am not allowed to enter comment putting it here?"
我不能输入评论,把它放在这里吗?
"What is the solution for this."
这个问题的解决方案是什么?
英文:
As i am not allowed to enter comment putting it here?
What is the solution for this.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论