You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/10/01 17:53:00 UTC
[jira] [Resolved] (CAMEL-25230) camel-cli-connector - the connector thread keeps the JVM alive when the application fails to start
[ https://issues.apache.org/jira/browse/CAMEL-25230?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-25230.
---------------------------------
Resolution: Fixed
Merged in https://github.com/apache/camel/pull/27220
_Claude Code on behalf of davsclaus_
> camel-cli-connector - the connector thread keeps the JVM alive when the application fails to start
> --------------------------------------------------------------------------------------------------
>
> Key: CAMEL-25230
> URL: https://issues.apache.org/jira/browse/CAMEL-25230
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang
> Reporter: Claus Ibsen
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.23.0
>
>
> When a Spring Boot application with the CLI connector fails to start before Camel has started (for example *APPLICATION FAILED TO START* because port 8080 is already in use), the JVM does not exit.
> The CLI connector is started early, while the CamelContext is built, so its status is available during startup. When the application then fails, the CamelContext was never started and is never stopped, so the connector is not stopped either. Its scheduled thread {{Camel Thread #1 - LocalCliConnector}} is not a daemon thread, and it keeps the JVM running with nothing else alive.
> Reproduce: start any Spring Boot example with {{camel run pom.xml}} (or with the camel-cli-connector-starter) while port 8080 is in use. Spring Boot prints APPLICATION FAILED TO START, and the java process stays up; {{jstack}} shows only the LocalCliConnector thread as non-daemon.
> Fix: the connector thread is a daemon thread, so it never keeps a JVM alive on its own.
> _Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)