nathanmarz/storm · error · RuntimeException
Topology with name ` ` already exists on cluster
Error message
Topology with name `${name}` already exists on cluster What it means
During distributed submission, submitTopology checks topologyNameExists(conf, name) via Nimbus before uploading the jar. If a live topology already uses the given name, it throws a RuntimeException. Storm topology names must be unique on the cluster.
Solutions
- Kill the existing topology first: `storm kill <name>` (wait for deactivation to complete).
- Use a new unique topology name (e.g. append a version/timestamp).
- Script the redeploy: kill, wait for INACTIVE, then submit.
- If the old topology is actually dead but listed, check Nimbus state / use `storm list` to verify.
Example fix
# before storm jar mytopology.jar com.mypack.MyTopology my-topology # second run fails # after storm kill my-topology && sleep 20 && storm jar mytopology.jar com.mypack.MyTopology my-topology
Defensive patterns
Strategy: try-catch
Try / catch
try {
StormSubmitter.submitTopology(name, conf, topology);
} catch (RuntimeException e) {
if (e.getMessage() != null && e.getMessage().contains("already exists on cluster")) {
// kill existing or pick new name, then retry
System.err.println("Topology '" + name + "' already running; run: storm kill " + name);
} else { throw e; }
} Prevention
- Version topology names (my-topology-v3) instead of reusing fixed names.
- Automate kill-then-submit in deploy scripts with a wait between them.
- Run `storm list` before deploying in CI.
When it happens
Trigger: Calling StormSubmitter.submitTopology with a name that is already active on the cluster without SubmitOptions with initialStatus override to kill/restart semantics; re-running a submit script twice.
Common situations: Re-deploying an updated topology without killing the old one; CI pipelines re-submitting with a fixed name; accidental duplicate submissions from scripts.
Understand the failure class
Background: "already exists" / EEXIST / FileAlreadyExistsException: what the 'file already exists' error means and how to fix it — this error's family across 37 libraries.
Related errors
- Each element of the list
- Field must be an Iterable of
- Field must be a power of 2.
- Must submit topologies using the 'storm' client script so…
- No DRPC servers configured for topology
AI-assisted analysis of nathanmarz/storm@cdb116e942 (2026-09-12).
Data as JSON: /api/errors/28d3ba1d6bcf5079.
Report an issue: GitHub.
Appendix: source
Thrown at storm-core/src/jvm/backtype/storm/StormSubmitter.java:89
* @throws InvalidTopologyException if an invalid topology was submitted
*/
public static void submitTopology(String name, Map stormConf, StormTopology topology, SubmitOptions opts) throws AlreadyAliveException, InvalidTopologyException {
if(!Utils.isValidConf(stormConf)) {
throw new IllegalArgumentException("Storm conf is not valid. Must be json-serializable");
}
stormConf = new HashMap(stormConf);
stormConf.putAll(Utils.readCommandLineOpts());
Map conf = Utils.readStormConfig();
conf.putAll(stormConf);
try {
String serConf = JSONValue.toJSONString(stormConf);
if(localNimbus!=null) {
LOG.info("Submitting topology " + name + " in local mode");
localNimbus.submitTopology(name, null, serConf, topology);
} else {
NimbusClient client = NimbusClient.getConfiguredClient(conf);
if(topologyNameExists(conf, name)) {
throw new RuntimeException("Topology with name `" + name + "` already exists on cluster");
}
submitJar(conf);
try {
LOG.info("Submitting topology " + name + " in distributed mode with conf " + serConf);
if(opts!=null) {
client.getClient().submitTopologyWithOpts(name, submittedJar, serConf, topology, opts);
} else {
// this is for backwards compatibility
client.getClient().submitTopology(name, submittedJar, serConf, topology);
}
} catch(InvalidTopologyException e) {
LOG.warn("Topology submission exception", e);
throw e;
} catch(AlreadyAliveException e) {
LOG.warn("Topology already alive exception", e);
throw e;
} finally {
client.close();View on GitHub (pinned to cdb116e942)