{"record":{"id":"ce6b8d83f7732e1a","repo":"nathanmarz/storm","slug":"no-drpc-servers-configured-for-topology","errorCode":null,"errorMessage":"No DRPC servers configured for topology","messagePattern":"No DRPC servers configured for topology","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"storm-core/src/jvm/backtype/storm/drpc/DRPCSpout.java","lineNumber":79,"sourceCode":"        _function = function;\n    }\n\n    public DRPCSpout(String function, ILocalDRPC drpc) {\n        _function = function;\n        _local_drpc_id = drpc.getServiceId();\n    }\n    \n    @Override\n    public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {\n        _collector = collector;\n        if(_local_drpc_id==null) {\n            int numTasks = context.getComponentTasks(context.getThisComponentId()).size();\n            int index = context.getThisTaskIndex();\n\n            int port = Utils.getInt(conf.get(Config.DRPC_INVOCATIONS_PORT));\n            List<String> servers = (List<String>) conf.get(Config.DRPC_SERVERS);\n            if(servers == null || servers.isEmpty()) {\n                throw new RuntimeException(\"No DRPC servers configured for topology\");   \n            }\n            if(numTasks < servers.size()) {\n                for(String s: servers) {\n                    _clients.add(new DRPCInvocationsClient(s, port));\n                }\n            } else {\n                int i = index % servers.size();\n                _clients.add(new DRPCInvocationsClient(servers.get(i), port));\n            }\n        }\n        \n    }\n\n    @Override\n    public void close() {\n        for(DRPCInvocationsClient client: _clients) {\n            client.close();\n        }","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/nathanmarz/storm/blob/cdb116e942666973bc4eaa0df098d5bab82739e7/storm-core/src/jvm/backtype/storm/drpc/DRPCSpout.java#L61-L97","documentation":"DRPCSpout.open reads Config.DRPC_SERVERS from the topology conf to create DRPCInvocationsClient connections. If the list is null or empty it throws a RuntimeException because the spout has no servers to pull DRPC requests from.","triggerScenarios":"Building a topology containing DRPCSpout without setting Config.DRPC_SERVERS (or setting it to an empty list) in the conf, then running the topology (local or distributed).","commonSituations":"DRPC topologies submitted with a bare conf; conf key omitted after copying an example; DRPC_SERVERS accidentally cleared by code that overwrites the conf Map.","solutions":["Set Config.DRPC_SERVERS in the topology conf to the list of DRPC server hosts.","Also set Config.DRPC_INVOCATIONS_PORT to the DRPC invocations port (default 3773).","Verify the config is not overwritten after being set (conf.putAll order).","For local testing, point DRPC_SERVERS at localhost and run a local DRPC server."],"exampleFix":"// before\nconf.put(Config.DRPC_INVOCATIONS_PORT, 3773);\n// after\nconf.put(Config.DRPC_INVOCATIONS_PORT, 3773);\nconf.put(Config.DRPC_SERVERS, Arrays.asList(\"drpc1.example.com\", \"drpc2.example.com\"));","handlingStrategy":"validation","validationCode":"List<String> servers = (List<String>) conf.get(Config.DRPC_SERVERS);\nif (servers == null || servers.isEmpty()) {\n    throw new IllegalStateException(\"Set \" + Config.DRPC_SERVERS + \" before submitting a DRPC topology\");\n}\nif (!conf.containsKey(Config.DRPC_INVOCATIONS_PORT)) {\n    throw new IllegalStateException(\"Set \" + Config.DRPC_INVOCATIONS_PORT);\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Build a shared DRPC conf factory that always sets DRPC_SERVERS and DRPC_INVOCATIONS_PORT.","Keep DRPC settings in storm.yaml so they load with readStormConfig defaults.","Test DRPC topologies in local mode with a LocalDRPC first."],"tags":["drpc","missing-config","storm"],"backgroundTag":"missing-required-config-field","analyzedSha":"cdb116e942666973bc4eaa0df098d5bab82739e7","analyzedAt":"2026-09-12T14:30:00.714Z","contentChangedAt":"2026-09-12T14:30:00.714Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}