mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-07-26 11:49:16 +00:00
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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user