{"record":{"id":"18ef29e506eb711e","repo":"testcontainers/testcontainers-java","slug":"container-hasn-t-come-up-yet","errorCode":null,"errorMessage":"container hasn't come up yet","messagePattern":"container hasn't come up yet","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"modules/yugabytedb/src/main/java/org/testcontainers/containers/strategy/YugabyteDBYCQLWaitStrategy.java","lineNumber":78,"sourceCode":"                                \"-u\",\n                                container.getUsername(),\n                                \"-p\",\n                                container.getPassword(),\n                                \"-k\",\n                                container.getKeyspace(),\n                                \"-e\",\n                                YCQL_TEST_QUERY\n                            );\n                            if (result.getExitCode() != 0) {\n                                status.set(false);\n                                log.debug(result.getStderr());\n                            }\n                        } catch (Exception e) {\n                            status.set(false);\n                            log.debug(e.getMessage(), e);\n                        } finally {\n                            if (!status.getAndSet(true)) {\n                                throw new RuntimeException(\"container hasn't come up yet\");\n                            }\n                        }\n                    });\n                return status;\n            }\n        );\n    }\n\n    @Override\n    public void waitUntilReady() {\n        waitUntilReady(target);\n    }\n}\n","sourceCodeStart":60,"sourceCodeEnd":92,"githubUrl":"https://github.com/testcontainers/testcontainers-java/blob/8e549514e3f01c57d70546fbb8599d138f3903e5/modules/yugabytedb/src/main/java/org/testcontainers/containers/strategy/YugabyteDBYCQLWaitStrategy.java#L60-L92","documentation":"YugabyteDBYCQLWaitStrategy polls YCQL readiness using a future whose finally block throws 'container hasn't come up yet' if the liveness status flag was never set to true by a successful probe. It signals the YCQL endpoint never became responsive within the wait period.","triggerScenarios":"waitUntilReady runs its probe loop until the wait timeout; every probe attempt throws (caught, status.set(false)), so the finally block throws this RuntimeException when getAndSet(true) returns false.","commonSituations":"YCQL API (9042) not listening because cluster startup is slow; wrong keyspace/port configured; container image slow to initialize exceeding wait strategy timeout.","solutions":["Increase the wait strategy timeout (withStartupTimeout / waitingFor duration)","Verify the YCQL port and keyspace configuration on the container","Check container logs for YCQL server startup errors","Use a startup check indicator or log-based wait if cluster init is inherently slow"],"exampleFix":"// before\nnew YugabyteDBYCQLWaitStrategy()\n// after\nnew YugabyteDBYCQLWaitStrategy().withStartupTimeout(Duration.ofMinutes(3))","handlingStrategy":"retry","validationCode":"// pre-start sanity check\nif (!container.isRunning()) throw new IllegalStateException(\"container exited before YCQL became ready\");","typeGuard":null,"tryCatchPattern":"try { container.start(); } catch (RuntimeException e) { if (e.getMessage().contains(\"hasn't come up yet\")) { /* bump timeout and retry */ } }","preventionTips":["Increase the wait strategy startup timeout for slow CI machines","Verify the YCQL port (9042) mapping and keyspace settings","Inspect container logs when the wait strategy times out"],"tags":["yugabytedb","wait-strategy","timeout"],"backgroundTag":"request-timeout","analyzedSha":"8e549514e3f01c57d70546fbb8599d138f3903e5","analyzedAt":"2026-09-12T14:56:41.227Z","contentChangedAt":"2026-09-12T14:56:41.227Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}