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.
-
A Dev UI auto-off may have elapsed: the engine then logs
Goblin chaos auto-disabledand switches chaos off, even when the Dev UI is closed.
Chaos is active again after a restart although I switched it off:
-
The active flag is never persisted: every start takes it from
quarkus.goblin.enabled. Setquarkus.goblin.enabled=falseto start with chaos off.
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 recreates it at the next configuration change.
-
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, and a method excluded by `quarkus.goblin.target.exclude-annotationsis not woven either.@Asynchronousmethods are not covered; for a method returningUni/CompletionStageonly the synchronous part is, and latency is skipped on an event-loop thread. -
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, and the layer is resolved when the request starts: with
DATABASEandSERVICEarmed at level 100, every request resolves toDATABASE, so a request that never acquires a JDBC connection is not assaulted at all.
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.