You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[BUG] Gateway instance reporting uses configured port instead of the bound server port #7732
Independent HeartbeatListener starts a periodic reporter from its constructor and fills instancePort from ServerProperties.getPort(). The WebSocket sync service likewise passes serverProperties.getPort() into its client. These are configured values rather than the port actually bound by the running web server.
When server.port=0, the server obtains a real ephemeral port, but the report/client header carries 0. Admin identity includes the reported port, so instance information cannot identify the actual listener and multiple processes behind the same reported address can collide. The independent reporter also schedules immediately, before receiving a server-initialized event.
Use the actual bound application-server port after server initialization; account for a distinct management port without reporting it as the gateway listener.
Do not publish a placeholder port before initialization. Define startup/stop ordering and reject invalid/unavailable port observations consistently.
Integration-test server.port=0 and explicit fixed ports for the independent and WebSocket paths; verify two processes receive distinct appropriate identities.
Audit the HTTP sync path for the same configuration-versus-bound-port assumption and explicitly cover it if affected.
Preserve reporting shutdown/cancellation and avoid adding a second heartbeat scheduler.
Source-based finding; no ephemeral-port deployment was run during issue preparation. Related: #7696 corrects the instance type, and #7718 defines richer instance identity/readiness; neither supplies the actual bound port.
Activity
fix(register): report the bound server port for gateway instance iden…