{"record":{"id":"64af1140a8e32ead","repo":"MHSanaei/3x-ui","slug":"node-name-is-disabled","errorCode":null,"errorMessage":"node {name} is disabled","messagePattern":"node (.+?) is disabled","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"internal/web/runtime/manager.go","lineNumber":104,"sourceCode":"\t\treturn rt, nil\n\t}\n\tif rt, ok := m.remotes[*nodeID]; ok {\n\t\tm.mu.RUnlock()\n\t\treturn rt, nil\n\t}\n\tm.mu.RUnlock()\n\n\tm.mu.Lock()\n\tdefer m.mu.Unlock()\n\tif rt, ok := m.remotes[*nodeID]; ok {\n\t\treturn rt, nil\n\t}\n\tn, err := loadNode(*nodeID)\n\tif err != nil {\n\t\treturn nil, err\n\t}\n\tif !n.Enable {\n\t\treturn nil, errors.New(\"node \" + n.Name + \" is disabled\")\n\t}\n\trt := NewRemote(n, m.egressResolver)\n\tm.remotes[*nodeID] = rt\n\treturn rt, nil\n}\n\nfunc (m *Manager) Local() Runtime { return m.local }\n\nfunc (m *Manager) RemoteFor(node *model.Node) (*Remote, error) {\n\tif node == nil {\n\t\treturn nil, errors.New(\"node is nil\")\n\t}\n\tm.mu.RLock()\n\tif rt, ok := m.remotes[node.Id]; ok {\n\t\tif sameRemoteIdentity(rt.node, node) {\n\t\t\tm.mu.RUnlock()\n\t\t\treturn rt, nil\n\t\t}","sourceCodeStart":86,"sourceCodeEnd":122,"githubUrl":"https://github.com/MHSanaei/3x-ui/blob/ad32144c42455696ea9f14e12168beac3e25f5d2/internal/web/runtime/manager.go#L86-L122","documentation":"Manager's remote-runtime cache returns this when loadNode succeeds but the node row has Enable=false: the runtime layer refuses to construct a Remote for a disabled node, so any inbound/client operation routed to that node fails with a named error. It is a deliberate policy gate — data still exists in the DB, but dispatching config changes to a disabled node is blocked to avoid drifting state.","triggerScenarios":"An API call or UI action that targets inbounds on a node that was disabled in node settings; automation that references a node id after an admin disabled it; cached node list in the frontend not reflecting the disable.","commonSituations":"Taking a sub-node offline for maintenance while old clients/scripts still reference it; node decommission workflow.","solutions":["Re-enable the node in panel node settings if it should receive operations","If decommissioned, update callers/scripts to stop targeting that node id","Refresh the node list in the UI before acting on it","For maintenance flows, queue changes and apply after re-enable rather than bypassing the runtime"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"node, err := loadNode(id)\nif err == nil && !node.Enable {\n    return fmt.Errorf(\"node %s is disabled — enable it or retarget the operation\", node.Name)\n}","typeGuard":null,"tryCatchPattern":"rt, err := manager.RemoteByID(id)\nif err != nil {\n    if strings.Contains(err.Error(), \"is disabled\") {\n        // policy gate: enable the node or stop targeting it — do not retry\n    }\n    return err\n}","preventionTips":["Check node.Enable before routing operations to it","Keep automation's node-id list aligned with enabled nodes","During maintenance, queue changes and apply after re-enable"],"tags":["node","runtime","policy","api"],"backgroundTag":null,"analyzedSha":"ad32144c42455696ea9f14e12168beac3e25f5d2","analyzedAt":"2026-08-15T11:13:23.905Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}