Skip to content

HTTP 500 when running agentgateway in docker container #3118

@vitush93

Description

@vitush93

Following the basic example, but with docker container, is not working:

  • connect requests simply fail with status 500
  • tried different MCP servers - same problem (not an npx issue)
  • same config works fine using a binary
  • logs show nothing helpful, even at debug level request gateway=bind/3000 listener=listener0 route_rule=route0/default route=route0 src.addr=172.27.0.1:52514 http.method=GET http.host=localhost http.path=/sse http.version=HTTP/1.1 http.status=500 protocol=mcp duration=0ms

Example docker-compose (minimal):

services:
    image: ghcr.io/agentgateway/agentgateway:0.10.5
    command: [-f, /config/config.yaml]
    environment:
      RUST_LOG: debug
      RUST_BACKTRACE: "1"
    volumes:
      - ./config.yaml:/config/config.yaml:ro
    ports:
      - 3000:3000

with config:

# tried bunch of stuff - see comments
binds:
  - port: 3000
    listeners:
      - routes:
          - policies:
              cors:
                allowOrigins:
                  - "*"
                allowHeaders:
                  - "*"
                  # - mcp-protocol-version
                  # - content-type
                  # - cache-control
            backends:
              - mcp:
                  targets:
                    - name: time
                      stdio:
                        cmd: python
                        args:
                          [
                            "-m",
                            "mcp_server_time",
                            "--local-timezone=Europe/Prague",
                          ]
                    # - name: sequentialthinking
                    #   stdio:
                    #     cmd: npx
                    #     args:
                    #       [
                    #         "-y",
                    #         "@modelcontextprotocol/server-sequential-thinking",
                    #       ]
                    # - name: everything
                    #   stdio:
                    #     cmd: npx
                    #     args: ["-y", "@modelcontextprotocol/server-everything"]
config:
  adminAddr: 0.0.0.0:15000
  statsAddr: 0.0.0.0:15020

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions