{"record":{"id":"ca87a0ba6abd88c9","repo":"quarkusio/quarkus","slug":"dev-mode-process-did-not-complete-successfully","errorCode":null,"errorMessage":"Dev mode process did not complete successfully","messagePattern":"Dev mode process did not complete successfully","errorType":"exception","errorClass":"MojoExecutionException","httpStatus":null,"severity":"error","filePath":"devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java","lineNumber":565,"sourceCode":"        copySurefireVariables();\n\n        try {\n            DevModeRunner runner = new DevModeRunner(bootstrapId);\n            Map<Path, Long> pomFiles = readPomFileTimestamps(runner);\n            Map<Path, Long> additionalWatchedFiles = readAdditionaWatchedFilesTimestampts(watchedFiles);\n            runner.run();\n            long nextCheck = System.currentTimeMillis() + 100;\n            for (;;) {\n                //we never suspend after the first run\n                suspend = \"n\";\n                long sleep = Math.max(0, nextCheck - System.currentTimeMillis()) + 1;\n                Thread.sleep(sleep);\n                if (System.currentTimeMillis() > nextCheck) {\n                    nextCheck = System.currentTimeMillis() + 100;\n                    if (!runner.alive()) {\n                        restoreTerminalState();\n                        if (!runner.isExpectedExitValue()) {\n                            throw new MojoExecutionException(\"Dev mode process did not complete successfully\");\n                        }\n                        return;\n                    }\n                    // we need to keep POM files changes separated for reactor distinctions\n                    List<String> changedPoms = collectChangeFilesFrom(pomFiles);\n                    List<String> changedFiles = collectChangeFilesFrom(additionalWatchedFiles);\n                    changedFiles.addAll(changedPoms);\n                    if (!changedFiles.isEmpty()) {\n                        logChanges(changedFiles);\n\n                        // stop the runner before we build the new one as the debug port being free\n                        // is tested when building the runner\n                        runner.stop();\n\n                        final DevModeRunner newRunner;\n                        try {\n                            bootstrapId = handleAutoCompile(changedPoms);\n                            newRunner = new DevModeRunner(runner.commandLine.getDebugPort(), bootstrapId, pomFiles.keySet());","sourceCodeStart":547,"sourceCodeEnd":583,"githubUrl":"https://github.com/quarkusio/quarkus/blob/e1c734241f34c7919086ceb4c9262b4a58f6de44/devtools/maven/src/main/java/io/quarkus/maven/DevMojo.java#L547-L583","documentation":"During dev mode, DevMojo polls the launched application process. When the process exits, restoreTerminalState() runs and, if the exit code is not among the expected values, MojoExecutionException 'Dev mode process did not complete successfully' is thrown. This means the quarkus:dev JVM terminated abnormally instead of being stopped by the user.","triggerScenarios":"The forked dev-mode process crashes on startup or during hot reload (port already in use, compilation error causing early exit, OOM kill), or exits with a non-zero code, and that code is not in the mojo's expectedExitValues.","commonSituations":"Port 8080 already occupied by another instance; application fails fast due to a bad config property; container/CI killing the process (OOM, SIGTERM with unexpected code); JVM crash (hs_err files); Ctrl-C handled with unexpected exit code on Windows.","solutions":["Inspect the console output above the error for the actual crash reason (port conflict, config error, OOM).","Free the HTTP port (e.g. quarkus.http.port or kill the process on 8080) and restart.","Fix failing configuration or compilation errors that abort application startup.","If killed externally by CI/containers, adjust signals/exit codes or run dev mode only in interactive sessions."],"exampleFix":"// before\nmvn quarkus:dev  # port 8080 already used by a stale process\n// after\nlsof -ti:8080 | xargs kill -9 && mvn quarkus:dev","handlingStrategy":"validation","validationCode":"// check the dev port is free before starting\nint port = 8080;\ntry (ServerSocket s = new ServerSocket(port)) { /* free */ }\ncatch (IOException e) { throw new IllegalStateException(\"Port \" + port + \" in use — kill the stale process first\"); }","typeGuard":null,"tryCatchPattern":"try {\n    mvnQuarkusDev();\n} catch (MojoExecutionException e) {\n    if (e.getMessage().contains(\"did not complete successfully\")) {\n        // inspect console log above for crash cause; fix port/config, then retry\n    }\n}","preventionTips":["Ensure the HTTP port is free before launching dev mode.","Validate application configuration so startup does not abort.","Give dev-mode containers/CI enough memory to avoid OOM kills.","Run dev mode interactively, not under aggressive auto-kill supervision."],"tags":["maven","dev-mode","process-exit","quarkus"],"backgroundTag":"process-exited-unexpectedly","analyzedSha":"e1c734241f34c7919086ceb4c9262b4a58f6de44","analyzedAt":"2026-09-05T17:01:29.979Z","contentChangedAt":"2026-09-05T17:01:29.979Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}