apache / dubbo-website

Apache Dubbo documents
https://dubbo.apache.org/
Apache License 2.0
468 stars 789 forks source link

Graceful shutdown #2944

Closed geekerzhou closed 5 months ago

geekerzhou commented 5 months ago

2024-03-29 13:41:07.854 [DubboShutdownHook] INFO , o.a.dubbo.config.DubboShutdownHook - [DUBBO] Dubbo shutdown hooks execute now. Dubbo Application1.1, dubbo version: 3.2.9, current host: 10.10.1.33

2024-03-29 13:41:08.155 {"status":"UP","components":{"db":{"status":"UP","details":{"database":"PostgreSQL","validationQuery":"isValid()"}},"discoveryComposite":{"description":"Discovery Client not initialized","status":"UNKNOWN","components":{"discoveryClient":{"description":"Discovery Client not initialized","status":"UNKNOWN"}}},"diskSpace":{"status":"UP","details":{"total":250685575168,"free":15884992512,"threshold":10485760,"path":"","exists":true}},"dubbo":{"status":"UP","details":{"memory":{"source":"management.health.dubbo.status.defaults","status":{"level":"OK","message":"max:4096M,total:224M,used:188M,free:36M"}},"load":{"source":"management.health.dubbo.status.defaults","status":{"level":"OK","message":"load:2.67822265625,cpu:12"}},"registry":{"source":"management.health.dubbo.status.defaults","status":{"level":"OK","message":"10.0.2.251:8848(connected),10.0.2.251:8848(connected)"}},"spring":{"source":"management.health.dubbo.status.defaults","status":{"level":"OK","message":""}},"server":{"source":"management.health.dubbo.status.defaults","status":{"level":"OK","message":"/10.10.1.33:20880(clients:0)"}}}},"nacosConfig":{"status":"UP"},"ping":{"status":"UP"},"redis":{"status":"UP","details":{"version":"6.0.9"}},"refreshScope":{"status":"UP"}}}

2024-03-29 13:41:12.098 {"status":"UP","components":{"db":{"status":"UP","details":{"database":"PostgreSQL","validationQuery":"isValid()"}},"discoveryComposite":{"description":"Discovery Client not initialized","status":"UNKNOWN","components":{"discoveryClient":{"description":"Discovery Client not initialized","status":"UNKNOWN"}}},"diskSpace":{"status":"UP","details":{"total":250685575168,"free":15878217728,"threshold":10485760,"path":"","exists":true}},"dubbo":{"status":"UNKNOWN","details":{"memory":{"source":"management.health.dubbo.status.defaults","status":{"level":"OK","message":"max:4096M,total:238M,used:155M,free:83M"}},"load":{"source":"management.health.dubbo.status.defaults","status":{"level":"OK","message":"load:2.67822265625,cpu:12"}},"registry":{"source":"management.health.dubbo.status.defaults","status":{"level":"OK","message":"10.0.2.251:8848(connected),10.0.2.251:8848(connected)"}},"spring":{"source":"management.health.dubbo.status.defaults","status":{"level":"OK","message":""}},"server":{"source":"management.health.dubbo.status.defaults","status":{"level":"UNKNOWN"}}}},"nacosConfig":{"status":"UP"},"ping":{"status":"UP"},"redis":{"status":"UP","details":{"version":"6.0.9"}},"refreshScope":{"status":"UP"}}}

dubbo 已经下线了 actuator health check 信息中 dubbo 状态还都是 up 的,5 秒后server 检查项才变成 UNKNOWN,但是整体 healthcheck 仍然是 UP。nginx 请求/actuator/health来判断是否下线 upstream,就行不通了,由于 dubbo 已下线,如果请求的 http 接口里边调用了 dubbo 相关逻辑,就抛异常了

AlbumenJ commented 5 months ago

Please submit a disscussion in https://github.com/apache/dubbo