{"record":{"id":"2db22da18f296abe","repo":"canopy-network/canopy","slug":"plugin-rpc-server-disabled-failed-to-start-on-ad","errorCode":null,"errorMessage":"plugin RPC server disabled (failed to start on $addr)","messagePattern":"plugin RPC server disabled \\(failed to start on \\$addr\\)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"error","filePath":"plugin/kotlin/src/main/kotlin/com/canopy/plugin/Rpc.kt","lineNumber":78,"sourceCode":"\n        // The custom RPC server is OPTIONAL. Parsing the address or binding the port (e.g. already\n        // in use) can throw; a failure here must NOT crash the plugin — log it and continue without\n        // an RPC server so plugins that don't use this feature are unaffected.\n        try {\n            // parse host:port (default host 0.0.0.0 binds all interfaces)\n            val lastColon = addr.lastIndexOf(':')\n            val host = if (lastColon > 0) addr.substring(0, lastColon) else \"0.0.0.0\"\n            val port = if (lastColon >= 0) addr.substring(lastColon + 1).toInt() else addr.toInt()\n\n            val server = HttpServer.create(InetSocketAddress(host, port), 0)\n            // no routes are registered by default; builders add their own here (see TUTORIAL.md)\n            server.executor = null\n\n            // log the build marker so the running version is obvious in the log\n            logger.info { \"plugin RPC server ($PLUGIN_BUILD) listening on $addr (no custom routes registered)\" }\n            server.start()\n        } catch (e: Exception) {\n            logger.warn(e) { \"plugin RPC server disabled (failed to start on $addr)\" }\n        }\n    }\n}\n","sourceCodeStart":60,"sourceCodeEnd":82,"githubUrl":"https://github.com/canopy-network/canopy/blob/ee8197d91dd410f6592cb650a94c925ee6dc8bad/plugin/kotlin/src/main/kotlin/com/canopy/plugin/Rpc.kt#L60-L82","documentation":"Logged (not thrown fatally) in Rpc.start when the plugin's optional custom RPC server fails to bind its address — typically an invalid addr string or a port already in use. By design this failure does NOT crash the plugin; the server is simply disabled and the rest of the plugin keeps running.","triggerScenarios":"Thrown at plugin/kotlin/src/main/kotlin/com/canopy/plugin/Rpc.kt:78 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check the log for the underlying bind exception (port in use, invalid host:port).","Free the port or change rpc_address in the plugin config, then restart the plugin.","If RPC is not needed, ignore the warning — the plugin functions without the custom RPC server."],"exampleFix":null,"handlingStrategy":"fallback","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"ee8197d91dd410f6592cb650a94c925ee6dc8bad","analyzedAt":"2026-09-06T09:30:15.973Z","contentChangedAt":"2026-09-06T09:30:15.973Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}