{"record":{"id":"a71719901b361967","repo":"prestodb/presto","slug":"nodeid-mismatch","errorCode":null,"errorMessage":"nodeId mismatch","messagePattern":"nodeId mismatch","errorType":"http","errorClass":"WebApplicationException","httpStatus":400,"severity":"error","filePath":"presto-main/src/main/java/com/facebook/presto/server/ResourceManagerResource.java","lineNumber":68,"sourceCode":"    @Inject\n    public ResourceManagerResource(\n            ResourceManagerClusterStateProvider clusterStateProvider,\n            @ForResourceManager ListeningExecutorService executor)\n    {\n        this.clusterStateProvider = requireNonNull(clusterStateProvider, \"clusterStateProvider is null\");\n        this.executor = executor;\n    }\n\n    /**\n     * Registers a node heartbeat with the resource manager.\n     */\n    @PATCH\n    @Consumes(APPLICATION_JSON)\n    @Path(\"/node/{nodeId}\")\n    public void patchNodeHeartbeat(@PathParam(\"nodeId\") String nodeId, NodeStatus nodeStatus)\n    {\n        if (!nodeId.equals(nodeStatus.getNodeId())) {\n            throw new WebApplicationException(\n                    Response.status(BAD_REQUEST)\n                            .type(APPLICATION_JSON)\n                            .entity(ImmutableMap.of(\n                                    \"error\", \"nodeId mismatch\",\n                                    \"pathNodeId\", nodeId,\n                                    \"bodyNodeId\", nodeStatus.getNodeId()))\n                            .build());\n        }\n        executor.execute(() -> clusterStateProvider.registerNodeHeartbeat(nodeStatus));\n    }\n\n    /**\n     * This method registers a heartbeat to the resource manager.  A query heartbeat is used for the following purposes:\n     *\n     * 1) Inform resource managers about current resource group utilization.\n     * 2) Inform resource managers about current running queries.\n     * 3) Inform resource managers about coordinator status and health.\n     */","sourceCodeStart":50,"sourceCodeEnd":86,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-main/src/main/java/com/facebook/presto/server/ResourceManagerResource.java#L50-L86","documentation":"ResourceManagerResource.patchNodeHeartbeat received a heartbeat whose NodeStatus nodeId does not match the nodeId in the URL path. The registration is refused because the payload identifies a different node than the one being patched.","triggerScenarios":"Thrown at presto-main/src/main/java/com/facebook/presto/server/ResourceManagerResource.java:68 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Check node configuration for duplicated or misconfigured node.id","Ensure proxies or routers do not rewrite the path versus the body inconsistently"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}