[
https://issues.apache.org/jira/browse/CAMEL-25386?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18123960#comment-18123960
]
Claus Ibsen commented on CAMEL-25386:
-------------------------------------
To be fixed in 4.24.0 as part of CAMEL-25388 (making the Camel CLI reliable for
AI agents and scripts). CAMEL-25390 makes the runtime always reply to CLI
actions, including a short ack for the route start/stop/suspend/resume actions,
and CAMEL-25391 gives callers (CLI, MCP tools) a typed OK/ERROR/TIMEOUT result
instead of the "Timeout waiting for response" string, so these tools return
immediately with the real outcome.
_Claude Code on behalf of davsclaus (Claus Ibsen)_
> camel-jbang - the route control MCP tools report a timeout although the route
> command succeeded
> -----------------------------------------------------------------------------------------------
>
> Key: CAMEL-25386
> URL: https://issues.apache.org/jira/browse/CAMEL-25386
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang
> Affects Versions: 4.22.1
> Environment: Camel JBang 4.22.1, JBang 0.142.0, Java 25.0.4, macOS;
> also seen in a Linux container on Kubernetes
> Reporter: Serdar Gökay
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 4.24.0
>
>
> {{start_route}}, {{stop_route}}, {{suspend_route}} and {{resume_route}}
> change the route state, but each call waits 10 seconds and then returns, with
> isError=false:
> {noformat}
> Timeout waiting for response from PID 39618 for action: route
> {noformat}
> {{camel get route}} then shows the route in the requested state. The result
> reads like a failure although the command worked. {{camel cmd stop-route}}
> returns immediately.
> h3. Reproduce
> Camel JBang 4.22.1. {{demo.camel.yaml}}:
> {noformat}
> - route:
> id: tick
> from:
> uri: timer:tick
> steps:
> - log: tick
> - route:
> id: echo
> from:
> uri: direct:echo
> steps:
> - log: "foo=${header.foo}"
> {noformat}
> {noformat}
> camel run demo.camel.yaml --mcp
> {noformat}
> Then call {{stop_route}} from an MCP client connected to the {{/mcp}}
> endpoint, with these arguments:
> {noformat}
> {"routeId": "tick"}
> {noformat}
> h3. Cause
> The tools call {{ToolContext.executeAction("route", ...)}}, and
> {{RuntimeHelper.executeAction}} waits up to {{ACTION_TIMEOUT_MS}} (10 s) for
> the output file. {{LocalCliConnector.doActionRouteTask}} writes no output,
> since the {{camel cmd}} route commands do not wait for one. Of the actions
> the tools call through {{executeAction}}, it is the only one without output.
> Writing a short result from the route action, or not waiting in these four
> tools, would fix it.
> From reading the code, the route control tool of the {{camel mcp}} server
> ({{RuntimeTools}}) delegates to the same tools. The code is unchanged on main.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)