Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 24, 2026

MCP gateway failures at workflow step 24 lacked diagnostic information to identify which server failed and why. The check_mcp_servers.sh script would report "server(s) failed" without details on failure type, retry attempts, or specific servers.

Changes

Enhanced check_mcp_servers.sh with structured diagnostic output:

  • Retry visibility: Logs each attempt with timeout progression (10s → 20s → 30s)
  • Error classification: Distinguishes connection refused, timeout, DNS failure, HTTP codes, JSON-RPC errors
  • Failure context: Per-server output includes URL, last error, retry count
  • Actionable summary: Failure counts, common causes, log file paths

Example Output

Before:

✗ serena: failed to connect
ERROR: 1 server(s) failed

After:

✗ serena: failed to connect
  URL: http://host.docker.internal:80/servers/serena
  Last error: Connection timeout
  Retries attempted: 3

ERROR: 1 of 6 server(s) failed connectivity check
Succeeded: 5, Failed: 1, Skipped: 0

Common causes:
  - MCP server container failed to start or crashed
  - Network connectivity issues between gateway and server
  - Server initialization taking longer than expected (>30s)

Check logs: /tmp/gh-aw/mcp-logs/stderr.log

This enables rapid differentiation between transient timing issues and persistent connectivity failures.

Original prompt

Reference: https://github.com/githubnext/gh-aw/actions/runs/21314137115/job/61354509874#step:24:1

Debug MCP gateway failure

Custom agent used: agentic-workflows
GitHub Agentic Workflows (gh-aw) - Create, debug, and upgrade AI-powered workflows with intelligent prompt routing


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 3 commits January 24, 2026 11:21
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Copilot AI changed the title [WIP] Debug MCP gateway failure Add diagnostic logging to MCP gateway health check failures Jan 24, 2026
Copilot AI requested a review from pelikhan January 24, 2026 11:29
@pelikhan pelikhan marked this pull request as ready for review January 24, 2026 11:30
@pelikhan pelikhan merged commit 8ac4009 into copilot/update-outdated-action-versions Jan 24, 2026
@pelikhan pelikhan deleted the copilot/debug-mcp-gateway-failure branch January 24, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants