Troubleshooting
Chaos is not activating:
-
Verify you are running in dev mode (
quarkus:dev) or test mode (@QuarkusTest): chaos never activates in production mode. -
In test mode, chaos is off unless
quarkus.goblin.test.enabled=true(an INFO log says so at startup), or a test callsAssaultEngine.setActive(true). -
In test mode the
.goblin-state.jsonfile is ignored: tests always start fromapplication.properties. -
Check that
quarkus.goblin.enabled=true(the default). -
Verify at least one assault type is enabled in the Dev UI.
-
Look for the WARN log at startup confirming chaos activation.
Previous config is not restored on restart:
-
Check that
.goblin-state.jsonexists in the project working directory. -
If the file is corrupted (e.g. manual edits), delete it and reconfigure via the Dev UI. Goblin will recreate it automatically.
-
Look for a WARN log:
Failed to load .goblin-state.json, falling back to application.properties.
Endpoints are returning 500:
-
If using EXCEPTION assault, verify the exception class exists and has a
Stringconstructor. -
Check the Quarkus dev console for stack traces.
A chaos layer is shown as unavailable in the Dev UI:
-
DATABASEneeds a JDBC datasource (quarkus-agroal, e.g. through Hibernate ORM or Panache);MESSAGINGneedsquarkus-messaging. An unavailable layer is never selected: arming it falls through to the next layer.
A layer is armed but its assaults never fire:
-
Only
latencyandexceptionapply to theSERVICE,DATABASEandMESSAGINGlayers: an HTTP status, dependency degradation, response body or response header assault only fires onHTTP_IN. -
SERVICE: the method must belong to an application bean of the root archive, be neither static nor private, and pass the targeting rules; JAX-RS resources,@Provider`s and fallback methods are never assaulted. `@Asynchronousmethods and reactive (Uni,@NonBlocking) endpoints are not covered. -
DATABASE: only connections acquired while an HTTP request or a consumed message is processed are assaulted (a startup task or a@Scheduledjob has no resolved layer); Hibernate Reactive and the reactive SQL clients are not covered. -
MESSAGING: only@Incomingmethods are assaulted, and latency needs a blocking consumer (@Blocking,@RunOnVirtualThread); for a consumer returningUni/CompletionStageonly the synchronous part is covered. -
A deeper armed layer shadows the shallower ones: with
DATABASEandSERVICEarmed at level 100, a request that touches the database is always assaulted at the database.
My @Retry / @Fallback never reacts:
-
Faults injected by
HTTP_INhit the request before the resource runs, so Fault Tolerance annotations below it never see them. Arm theSERVICEorDATABASElayer instead (see End-to-end example). -
A
MESSAGINGfault is handled by the channel failure strategy, not by a@Retryon the consumer.
Targeting filters not working:
-
Package matching uses
startsWith, socom.examplematchescom.example.apiandcom.example.internal. -
Annotation matching uses fully qualified class names, not simple names. Use
jakarta.ws.rs.GET, notGET.
Dev UI config changes not visible:
-
Check the Quarkus console for WARN logs confirming the change.
-
Changes are persisted to
.goblin-state.jsonand restored on restart. If the file is missing or corrupted, Goblin falls back toapplication.propertiesdefaults.