fix: skip remote nodes in MonitorService to prevent direct Docker access errors

Remote nodes in the Distributed API model are self-monitoring — each
remote Sencho instance runs its own MonitorService against its local
Docker socket. The main instance must not attempt direct DockerController
access for remote nodes, which caused fatal crashes on every 30s tick.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
SaelixCode
2026-03-19 12:41:34 -04:00
parent 67d43bb3c6
commit b48cf62e5b
+4
View File
@@ -121,6 +121,8 @@ export class MonitorService {
const nodes = DatabaseService.getInstance().getNodes();
for (const node of nodes) {
if (!node.id) continue;
// Remote nodes run their own MonitorService locally — skip direct Docker access
if (node.type === 'remote') continue;
try {
const docker = DockerController.getInstance(node.id);
const containers = await docker.getAllContainers();
@@ -206,6 +208,8 @@ export class MonitorService {
for (const node of nodes) {
if (!node.id) continue;
// Remote nodes are self-monitoring — skip direct Docker access
if (node.type === 'remote') continue;
try {
const docker = DockerController.getInstance(node.id);
const containers = await docker.getRunningContainers();