{"record":{"id":"db581a2ff5f1f8f5","repo":"fluent/fluentd","slug":"receiving-missing-id-data-data","errorCode":null,"errorMessage":"Receiving missing id data: #{data}","messagePattern":"Receiving missing id data: #(.+?)","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"lib/fluent/counter/client.rb","lineNumber":165,"sourceCode":"          Thread.start do\n            yield res.get\n          end\n        else\n          res\n        end\n      end\n\n      private\n\n      def exist_scope!\n        raise 'Call `establish` method to get a `scope` before calling this method' unless @scope\n      end\n\n      def on_message(data)\n        if response = @responses.delete(data['id'])\n          response.set(data)\n        else\n          @log.warn(\"Receiving missing id data: #{data}\")\n        end\n      end\n\n      def send_request(method, scope, params, opt = {})\n        id = generate_id\n        res = Future.new(@loop, @loop_mutex)\n        @responses[id] = res # set a response value to this future object at `on_message`\n        request = build_request(method, id, scope, params, opt)\n        @log.debug(request)\n        @conn.send_data request\n        res\n      end\n\n      def build_request(method, id, scope = nil, params = nil, options = nil)\n        r = { id: id, method: method }\n        r[:scope] = scope if scope\n        r[:params] = params if params\n        r[:options] = options if options","sourceCodeStart":147,"sourceCodeEnd":183,"githubUrl":"https://github.com/fluent/fluentd/blob/dd45c6e18dc7be33b5e5a0f0767bf46307ff5626/lib/fluent/counter/client.rb#L147-L183","documentation":"Fluent::Counter::Client correlates each request with a Future stored in @responses keyed by a generated id; on_message resolves the Future when a response with a matching data['id'] arrives. This warning fires when the counter server sends a response whose id matches no pending request — the reply is orphaned (already answered, duplicated, or stale after reconnect) and is discarded.","triggerScenarios":"The counter server sends two responses for one request; a response arrives after the caller timed out/stopped waiting and the entry was deleted; client reconnected to a server that replays old replies; a custom/test counter server emitting unsolicited messages; version mismatch in the counter protocol between client and server.","commonSituations":"Using the fluent-counter CLI or the plugin counter API against a custom counter server; flaky loopback connections causing duplicate delivery; integration tests with mock servers that do not honor request ids.","solutions":["If the warning is rare and counters otherwise work, treat it as noise from a duplicated/stale reply and ignore it.","Verify only one Counter::Client instance consumes the socket (no two clients sharing host:port).","Ensure the counter server responds exactly once per request and echoes the request id unchanged.","Check for client/server Fluentd version skew on the counter plugin API and align versions."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":"# Guard before acting on a counter-server response (mirrors the library's own check)\ndef handle_response(data, pending_ids)\n  return unless data.is_a?(Hash) && pending_ids.include?(data['id'])\n  # ...process matched response...\nend","tryCatchPattern":null,"preventionTips":["Run exactly one Counter::Client per process/endpoint; never share the socket.","Ensure custom counter servers echo request ids verbatim and reply exactly once.","Keep client and server Fluentd versions aligned when using the counter API."],"tags":["counter","rpc","request-id","message-mismatch"],"backgroundTag":"orphaned-response-id","analyzedSha":"dd45c6e18dc7be33b5e5a0f0767bf46307ff5626","analyzedAt":"2026-08-21T16:22:07.332Z","schemaVersion":2},"datasetVersion":"2026-08-21T18:17:14.833Z"}