This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git
commit f262f3e8ae396bbc15458a2c8b117798d845e905 Author: Claus Ibsen <[email protected]> AuthorDate: Fri Oct 16 22:48:57 2026 +0200 ai-benchmark: the server restart stops only its own server, and the postgres wait reads the new JSON errors start-server.sh stopped every camel-jbang-mcp runner jar on the machine, and Claude Code sessions run such jars as stdio MCP servers of their own; it now stops only the server on its port. It also stops the tail that feeds the server: each restart left one behind (26 since Oct 13). Since CAMEL-25392 a failing `camel infra get <svc> --json` prints a JSON error ({"status":"error","code":3,...}) while the service starts, and the wait took any JSON for the service being up. It now waits for an answer that is not an error. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m --- ai-benchmark/agent_local.py | 5 ++++- ai-benchmark/agent_mcp_stepwise.py | 7 +++++-- ai-benchmark/start-server.sh | 7 ++++++- 3 files changed, 15 insertions(+), 4 deletions(-) diff --git a/ai-benchmark/agent_local.py b/ai-benchmark/agent_local.py index 9de7e9a..2d3de9d 100755 --- a/ai-benchmark/agent_local.py +++ b/ai-benchmark/agent_local.py @@ -182,7 +182,10 @@ def infra_start(services): m = re.search(r"\{.*\}", out, re.S) if m: try: - data[svc] = json.loads(m.group(0)); break + d = json.loads(m.group(0)) + # since CAMEL-25392 an error is JSON too: {"status":"error","code":3,...} until the service is up + if d.get("status") != "error": + data[svc] = d; break except json.JSONDecodeError: pass time.sleep(5) diff --git a/ai-benchmark/agent_mcp_stepwise.py b/ai-benchmark/agent_mcp_stepwise.py index 1548bf1..70b2d0f 100755 --- a/ai-benchmark/agent_mcp_stepwise.py +++ b/ai-benchmark/agent_mcp_stepwise.py @@ -188,8 +188,11 @@ def infra_start(services): m = re.search(r"\{.*\}", out, re.S) if m: try: - data[svc] = json.loads(m.group(0)) - break + d = json.loads(m.group(0)) + # since CAMEL-25392 an error is JSON too: {"status":"error","code":3,...} until the service is up + if d.get("status") != "error": + data[svc] = d + break except json.JSONDecodeError: pass time.sleep(5) diff --git a/ai-benchmark/start-server.sh b/ai-benchmark/start-server.sh index 9bc15de..2bbe65d 100755 --- a/ai-benchmark/start-server.sh +++ b/ai-benchmark/start-server.sh @@ -3,7 +3,12 @@ # Set CAMEL_MCP_JAR to run a locally built camel-jbang-mcp runner jar instead of the CLI plugin. cd "$(dirname "$0")" PORT="${MCP_PORT:-9090}" -pkill -f "camel-jbang-mcp.*runner.jar" 2>/dev/null; pkill -f "camel mcp --http" 2>/dev/null; sleep 1 +# only the server on this port: Claude Code sessions run camel-jbang-mcp runner jars of their own (stdio MCP servers). +# The wrapper's tail goes too, or every restart leaves an orphaned tail behind +for w in $(pgrep -f "^sh -c tail -f /dev/null \| .*(quarkus.http.port=$PORT |camel mcp --http --port=$PORT )"); do + pkill -P $w 2>/dev/null; kill $w 2>/dev/null +done +pkill -f "quarkus.http.port=$PORT .*camel-jbang-mcp" 2>/dev/null; pkill -f "camel mcp --http --port=$PORT" 2>/dev/null; sleep 1 if [[ -n "${CAMEL_MCP_JAR:-}" ]]; then nohup sh -c "tail -f /dev/null | java -Dquarkus.http.host-enabled=true -Dquarkus.http.host=0.0.0.0 -Dquarkus.http.port=$PORT -Dquarkus.log.level=WARN -jar $CAMEL_MCP_JAR" > mcp-server.log 2>&1 & else
