prestodb/presto · error · WebApplicationException

nodeId mismatch

Error message

nodeId mismatch

What it means

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.

Source

Thrown at presto-main/src/main/java/com/facebook/presto/server/ResourceManagerResource.java:68

    @Inject
    public ResourceManagerResource(
            ResourceManagerClusterStateProvider clusterStateProvider,
            @ForResourceManager ListeningExecutorService executor)
    {
        this.clusterStateProvider = requireNonNull(clusterStateProvider, "clusterStateProvider is null");
        this.executor = executor;
    }

    /**
     * Registers a node heartbeat with the resource manager.
     */
    @PATCH
    @Consumes(APPLICATION_JSON)
    @Path("/node/{nodeId}")
    public void patchNodeHeartbeat(@PathParam("nodeId") String nodeId, NodeStatus nodeStatus)
    {
        if (!nodeId.equals(nodeStatus.getNodeId())) {
            throw new WebApplicationException(
                    Response.status(BAD_REQUEST)
                            .type(APPLICATION_JSON)
                            .entity(ImmutableMap.of(
                                    "error", "nodeId mismatch",
                                    "pathNodeId", nodeId,
                                    "bodyNodeId", nodeStatus.getNodeId()))
                            .build());
        }
        executor.execute(() -> clusterStateProvider.registerNodeHeartbeat(nodeStatus));
    }

    /**
     * This method registers a heartbeat to the resource manager.  A query heartbeat is used for the following purposes:
     *
     * 1) Inform resource managers about current resource group utilization.
     * 2) Inform resource managers about current running queries.
     * 3) Inform resource managers about coordinator status and health.
     */

View on GitHub (pinned to 55bb57d202)

Solutions

  1. Check node configuration for duplicated or misconfigured node.id
  2. Ensure proxies or routers do not rewrite the path versus the body inconsistently
Defensive patterns

Strategy: validation

When it happens

Trigger: Thrown at presto-main/src/main/java/com/facebook/presto/server/ResourceManagerResource.java:68 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of prestodb/presto@55bb57d202 (2026-09-04). Data as JSON: /api/errors/a71719901b361967. Report an issue: GitHub.