eclipse-vertx/vert.x · critical · VertxException
Oops!
Error message
Oops!
What it means
During HA failover, HAManager.processFailover redeploys a failed node's verticles on this node. If the failDuringFailover fault-injection flag is set (typically via -Dvertx.ha.failover-on-failover or test hooks), it deliberately throws VertxException('Oops!').
Source
Thrown at vertx-core/src/main/java/io/vertx/core/impl/HAManager.java:513
CountDownLatch latch = new CountDownLatch(1);
// The testsuite requires that this is called on a Vert.x thread
vertx.runOnContext(v -> {
try {
runnable.run();
} finally {
latch.countDown();
}
});
try {
latch.await(30, TimeUnit.SECONDS);
} catch (InterruptedException ignore) {
}
}
// Process the failover of a deployment
private void processFailover(JsonObject failedVerticle) {
if (failDuringFailover) {
throw new VertxException("Oops!");
}
// This method must block until the failover is complete - i.e. the verticle is successfully redeployed
final String verticleName = failedVerticle.getString("verticle_name");
final CountDownLatch latch = new CountDownLatch(1);
final AtomicReference<Throwable> err = new AtomicReference<>();
// Now deploy this verticle on this node
((VertxImpl)vertx).executeIsolated(v -> {
JsonObject options = failedVerticle.getJsonObject("options");
doDeployVerticle(verticleName, new DeploymentOptions(options)).onComplete(result -> {
if (result.succeeded()) {
log.info("Successfully redeployed verticle " + verticleName + " after failover");
} else {
log.error("Failed to redeploy verticle after failover", result.cause());
err.set(result.cause());
}
latch.countDown();
Throwable t = err.get();
if (t != null) {View on GitHub (pinned to fb308bd8c3)
Solutions
- Remove the failover fault-injection system property (e.g. -Dvertx.ha.failDuringFailover=true) from the JVM arguments
- Check launch scripts/container env for leftover HA test flags
- If seen in tests, this is the expected simulated failure — assert on it rather than fixing
Example fix
// before java -Dvertx.ha.failDuringFailover=true -cp ... io.vertx.launcher.application.VertxApplication run my_verticle.js -ha // after java -cp ... io.vertx.launcher.application.VertxApplication run my_verticle.js -ha
Defensive patterns
Strategy: validation
Validate before calling
if (System.getProperty("vertx.ha.failDuringFailover") != null) { /* remove before prod */ } Try / catch
try { vertx.start(); } catch (VertxException e) { if ("Oops!".equals(e.getMessage())) log.error("HA fault-injection flag enabled in production!"); throw e; } Prevention
- Never set HA fault-injection system properties outside test harnesses
- Scan prod launch scripts for -Dvertx.ha.* test flags
- Treat 'Oops!' from HAManager as a config red flag
When it happens
Trigger: Setting the vertx.ha.fail-on-failover style system property and then triggering failover (killing the HA node and running another node's checkFailover).
Common situations: Almost exclusively in HA fault-injection tests; production hits only if the fault-injection system property was accidentally left enabled in the environment.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
AI-assisted analysis of eclipse-vertx/vert.x@fb308bd8c3 (2026-09-06).
Data as JSON: /api/errors/b629798b1fd937ac.
Report an issue: GitHub.