nathanmarz/storm · error · RuntimeException
No DRPC servers configured for topology
Error message
No DRPC servers configured for topology
What it means
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.
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.
Example fix
// before
conf.put(Config.DRPC_INVOCATIONS_PORT, 3773);
// after
conf.put(Config.DRPC_INVOCATIONS_PORT, 3773);
conf.put(Config.DRPC_SERVERS, Arrays.asList("drpc1.example.com", "drpc2.example.com")); Defensive patterns
Strategy: validation
Validate before calling
List<String> servers = (List<String>) conf.get(Config.DRPC_SERVERS);
if (servers == null || servers.isEmpty()) {
throw new IllegalStateException("Set " + Config.DRPC_SERVERS + " before submitting a DRPC topology");
}
if (!conf.containsKey(Config.DRPC_INVOCATIONS_PORT)) {
throw new IllegalStateException("Set " + Config.DRPC_INVOCATIONS_PORT);
} Prevention
- 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.
When it happens
Trigger: 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).
Common situations: 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.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- Must declare exactly one stream from last bolt in…
- Output stream of last component in LinearDRPCTopology must…
- Cannot join DRPC stream with streams originating from other…
- Each element of the list
- Field must be an Iterable of
AI-assisted analysis of nathanmarz/storm@cdb116e942 (2026-09-12).
Data as JSON: /api/errors/ce6b8d83f7732e1a.
Report an issue: GitHub.
Appendix: source
Thrown at storm-core/src/jvm/backtype/storm/drpc/DRPCSpout.java:79
_function = function;
}
public DRPCSpout(String function, ILocalDRPC drpc) {
_function = function;
_local_drpc_id = drpc.getServiceId();
}
@Override
public void open(Map conf, TopologyContext context, SpoutOutputCollector collector) {
_collector = collector;
if(_local_drpc_id==null) {
int numTasks = context.getComponentTasks(context.getThisComponentId()).size();
int index = context.getThisTaskIndex();
int port = Utils.getInt(conf.get(Config.DRPC_INVOCATIONS_PORT));
List<String> servers = (List<String>) conf.get(Config.DRPC_SERVERS);
if(servers == null || servers.isEmpty()) {
throw new RuntimeException("No DRPC servers configured for topology");
}
if(numTasks < servers.size()) {
for(String s: servers) {
_clients.add(new DRPCInvocationsClient(s, port));
}
} else {
int i = index % servers.size();
_clients.add(new DRPCInvocationsClient(servers.get(i), port));
}
}
}
@Override
public void close() {
for(DRPCInvocationsClient client: _clients) {
client.close();
}View on GitHub (pinned to cdb116e942)