From 717fd4cb7cdee93fc0f1f72d79077c0849b4a413 Mon Sep 17 00:00:00 2001 From: aitbc Date: Mon, 20 Apr 2026 20:26:04 +0200 Subject: [PATCH] fix: handle local node execution without SSH in blockchain health check - Detect when node is localhost or current hostname - Execute commands directly on local node instead of using SSH - Fixes SSH permission denied errors when checking services on local node - gitea-runner runs the workflow, so it should check aitbc services directly --- scripts/multi-node/blockchain-health-check.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/multi-node/blockchain-health-check.sh b/scripts/multi-node/blockchain-health-check.sh index 1793d4ae..bed0610f 100755 --- a/scripts/multi-node/blockchain-health-check.sh +++ b/scripts/multi-node/blockchain-health-check.sh @@ -57,7 +57,13 @@ log_warning() { ssh_exec() { local node="$1" local command="$2" - ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no "$node" "$command" 2>&1 || return 1 + + # If node is localhost, execute directly without SSH + if [ "$node" = "localhost" ] || [ "$node" = "$(hostname)" ]; then + bash -c "$command" 2>&1 || return 1 + else + ssh -o ConnectTimeout=10 -o StrictHostKeyChecking=no "$node" "$command" 2>&1 || return 1 + fi } # Check RPC endpoint health