Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Polaris' connect did not automatically stop when spring boot application has stopped #1032

Closed
Jansora opened this issue Jun 6, 2023 · 4 comments · Fixed by #1102, #1101, #1100, #1110 or #1111
Closed
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@Jansora
Copy link

Jansora commented Jun 6, 2023

Describe the bug
When i startup multi spring apps with same port (such as 23740). later started spring apps will run failed and should stopp normally.
when spring app failed. polaris 's connect blocked applications stopping.

check logs

2023-06-06 17:00:31.564  INFO 97953 --- [           main] o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
2023-06-06 17:00:31.613  WARN 97953 --- [           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.PortInUseException: Port 23740 is already in use
2023-06-06 17:00:31.616  INFO 97953 --- [           main] o.apache.catalina.core.StandardService   : Stopping service [Tomcat]
2023-06-06 17:00:31.626  INFO 97953 --- [           main] ConditionEvaluationReportLoggingListener : 

Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2023-06-06 17:00:31.632  INFO 97953 --- [           main] c.t.p.p.connector.grpc.GrpcConnector     : start to destroy connector grpc
2023-06-06 17:00:31.643 ERROR 97953 --- [           main] o.s.b.d.LoggingFailureAnalysisReporter   : 

***************************
APPLICATION FAILED TO START
***************************

Description:

Web server failed to start. Port 23740 was already in use.

Action:

Identify and stop the process that's listening on port 23740 or configure this application to listen on another port.

2023-06-06 17:00:32.119  INFO 97953 --- [n-LongPolling-1] .c.i.DefaultConfigFileLongPollingService : [Config] do long polling. config file size = 16, delay time = 0
2023-06-06 17:01:02.882  INFO 97953 --- [n-LongPolling-1] .c.i.DefaultConfigFileLongPollingService : [Config] long polling result: data no change
2023-06-06 17:01:02.883  INFO 97953 --- [n-LongPolling-1] .c.i.DefaultConfigFileLongPollingService : [Config] do long polling. config file size = 16, delay time = 0
2023-06-06 17:01:33.591  INFO 97953 --- [n-LongPolling-1] .c.i.DefaultConfigFileLongPollingService : [Config] long polling result: data no change

To Reproduce
needn't

Expected behavior
spring app stopped normal when run failed.

Environment

  • Version: 1.6.0-2021.0.3
  • OS: MAC OS 13.3.1 (22E261)

Additional context
Add any other context about the problem here.

@Jansora Jansora added the bug Something isn't working label Jun 6, 2023
@Jansora
Copy link
Author

Jansora commented Jun 6, 2023

这算是个 bug 吗

@SkyeBeFreeman
Copy link
Collaborator

不算BUG,因为动态配置还在正常运行。

@SkyeBeFreeman
Copy link
Collaborator

看了一下,这里可以搞一个优化,监听spring boot事件,如果没有成功启动,则终止远端配置的拉取线程。

@SkyeBeFreeman SkyeBeFreeman added enhancement New feature or request and removed bug Something isn't working labels Jun 6, 2023
@shuiqingliu
Copy link
Contributor

申请认领该 issue

@SkyeBeFreeman SkyeBeFreeman added this to the 1.13.0 milestone Sep 7, 2023
@SkyeBeFreeman SkyeBeFreeman linked a pull request Sep 14, 2023 that will close this issue
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment