Location: src/node0/utils/monitor.py line 333
Problem:
if load_state_peer_fail:
self.load_state_fail_cnt += 1
if self.load_state_fail_cnt >= self.terminate_load_state_limit:
logger.error("Failed to load state from peers. Exiting run.")
os.killpg(os.getpgrp(), signal.SIGTERM) # ← Wrong indentation, should be inside if block
Error:
[ERROR] [node.utils.monitor.run:333] Failed to load state from peers. Exiting run.
Root Cause:
The os.killpg() command is outside the limit check, causing immediate program termination on every peer connection failure. The server's retry mechanism cannot function because the monitor kills the process before any retry attempts can be made.