Repository navigation
fix(controlplane): re-register when the instance heartbeat fails - #3731
Merged
juruoO-o merged 2 commits intoNov 12, 2026
Merged
Conversation
The HTTP self-registration heartbeat only recovered from connection failures and HTTP 404. A 401 (rotated internal token), 409 (generation conflict) or 5xx was silently ignored: the local state stayed "registered", no re-registration happened, and nothing above FINE was logged. The control plane expires an instance once heartbeats stop refreshing its last-seen timestamp (45s by default), so the agent flips from ready to unavailable roughly a minute after startup and, without an ASDP stream, message delivery answers "asdp: instance not connected". Every non-2xx heartbeat now takes the documented recovery path: log a warning with the status and response body, drop the local registration state and register again, which refreshes both the in-memory registry entry and the stored instance lease.
Contributor
Author
|
The |
juruoO-o
approved these changes
Nov 12, 2026
juruoO-o
left a comment
Collaborator
There was a problem hiding this comment.
Reviewed non-success heartbeat recovery through the existing registration flow and refreshed generation handling.
No blocking findings in the reviewed diff. This was a static review of source and tests; local Java/Maven tests were not run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Agentscope Service External 应用在约一分钟后由 ready 变成 unavailable;不启用 gRPC 时,ControlPlane 无法与其消息对话,提示
asdp: instance not connected。Why
实例心跳健康检查失败后没有重新注册到 ControlPlane,状态停留在失败态,后续请求被拒。
Fix
心跳失败时触发实例重新注册(re-register),恢复其在 ControlPlane 的可用状态,使非 gRPC 通道的消息对话恢复正常。
Fixes #3703