[GH-ISSUE #13373] issue: Tool server verification fails with mcpo when serving multiple tools with --config file #16896

Closed
opened 2026-04-19 22:43:22 -05:00 by GiteaMirror · 1 comment
Owner

Originally created by @andrewrreed on GitHub (Apr 30, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/13373

Check Existing Issues

  • I have searched the existing issues and discussions.
  • I am using the latest version of Open WebUI.

Installation Method

Docker

Open WebUI Version

v0.6.5

Ollama Version (if applicable)

No response

Operating System

MacOS

Browser (if applicable)

Chrome

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have listed steps to reproduce the bug in detail.

Expected Behavior

When I deploy an mcpo proxy server with uvx mcpo --config ./apps/openwebui/test-mcpo-config.json, where the config contains:

{
    "mcpServers": {
        "memory": {
            "command": "npx",
            "args": [
                "-y",
                "@modelcontextprotocol/server-memory"
            ]
        },
        "airbnb": {
            "command": "npx",
            "args": [
                "-y",
                "@openbnb/mcp-server-airbnb"
            ]
        },
        "time": {
            "command": "uvx",
            "args": [
                "mcp-server-time",
                "--local-timezone=America/New_York"
            ]
        }
    }
}

I should be able to successfully configure each tool server via the OpenWebUI UI with the following:

  • Admin Panel > Settings > Tools > Add Connection
  • URL: http://0.0.0.0:8000/time/openapi.json

Actual Behavior

I get a Connection Failed error in UI pop up.

Steps to Reproduce

  1. Deploy OpenWebUI with docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:main
  2. Create admin user
  3. Deploy mcpo proxy server locally with --config pointing to config file from above
  4. Manually test the mcpo server: curl http://localhost:8000/time/openapi.json 200 OK
  5. Attempt to add one of the MCP tools as a tool in the UI like this: http://0.0.0.0:8000/time/openapi.json
  6. Notice error.

Logs & Screenshots

Heres the logs in the OpenWebUI docker container:

2025-04-30 19:15:26.425 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 192.168.65.1:33876 - "POST /api/v1/configs/tool_servers/verify HTTP/1.1" 400 - {}
2025-04-30 19:15:39.729 | ERROR    | open_webui.utils.tools:get_tool_server_data:447 - Could not fetch tool server spec from http://0.0.0.0:8000/time/openapi.json - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1115, in _wrap_create_connection
    sock = await aiohappyeyeballs.start_connection(
                 │                └ <function start_connection at 0xffff984b3ce0>
                 └ <module 'aiohappyeyeballs' from '/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/__init__.py'>
  File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 122, in start_connection
    raise first_exception
          └ ConnectionRefusedError(111, "Connect call failed ('0.0.0.0', 8000)")
  File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 73, in start_connection
    sock = await _connect_sock(
                 └ <function _connect_sock at 0xffff984d4040>
  File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 208, in _connect_sock
    await loop.sock_connect(sock, address)
          │    │            │     └ ('0.0.0.0', 8000)
          │    │            └ <socket.socket [closed] fd=-1, family=2, type=1, proto=6>
          │    ��� <cyfunction Loop.sock_connect at 0xffff9ab57e00>
          └ <uvloop.Loop running=True closed=False debug=False>
  File "uvloop/loop.pyx", line 2633, in sock_connect
    await fut
  File "uvloop/loop.pyx", line 1108, in uvloop.loop.Loop._sock_connect_cb
    raise OSError(err, 'Connect call failed %s' % (address,))

ConnectionRefusedError: [Errno 111] Connect call failed ('0.0.0.0', 8000)


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "/usr/local/bin/uvicorn", line 10, in <module>
    sys.exit(main())
    │   │    └ <Command main>
    │   └ <built-in function exit>
    └ <module 'sys' (built-in)>
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           │    │     │       └ {}
           │    │     └ ()
           │    └ <function BaseCommand.main at 0xffff9aecb7e0>
           └ <Command main>
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
         │    │      └ <click.core.Context object at 0xffff9be8c3d0>
         │    └ <function Command.invoke at 0xffff9aee4400>
         └ <Command main>
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           │   │      │    │           │   └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
           │   │      │    │           └ <click.core.Context object at 0xffff9be8c3d0>
           │   │      │    └ <function main at 0xffff9ab52fc0>
           │   │      └ <Command main>
           │   └ <function Context.invoke at 0xffff9aecad40>
           └ <click.core.Context object at 0xffff9be8c3d0>
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
                       │       └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
                       └ ()
  File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main
    run(
    └ <function run at 0xffff9af16de0>
  File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run
    server.run()
    │      └ <function Server.run at 0xffff9ace02c0>
    └ <uvicorn.server.Server object at 0xffff9ad54610>
  File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run
    return asyncio.run(self.serve(sockets=sockets))
           │       │   │    │             └ None
           │       │   │    └ <function Server.serve at 0xffff9ace0360>
           │       │   └ <uvicorn.server.Server object at 0xffff9ad54610>
           │       └ <function run at 0xffff9b3e8ae0>
           └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'>
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           │      │   └ <coroutine object Server.serve at 0xffff9ab116c0>
           │      └ <function Runner.run at 0xffff9b19c680>
           └ <asyncio.runners.Runner object at 0xffff9ab5f4d0>
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           │    │     │                  └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:70> wai...
           │    │     └ <cyfunction Loop.run_until_complete at 0xffff9ab56cf0>
           │    └ <uvloop.Loop running=True closed=False debug=False>
           └ <asyncio.runners.Runner object at 0xffff9ab5f4d0>
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
          │    │   │      │                      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0xffff096d6480>
          │    │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00>
          │    │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          │    └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0xffff0b7d0150>
          └ <open_webui.main.RedirectMiddleware object at 0xffff0b4adf90>
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
          │                            │    │    │     │      │        └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0xffff096d6480>
          │                            │    │    │     │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00>
          │                            │    │    │     └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          │                            │    │    └ <starlette.requests.Request object at 0xffff096d9590>
          │                            │    └ <fastapi.routing.APIRouter object at 0xffff48acca10>
          │                            └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0xffff0b7d0150>
          └ <function wrap_app_handling_exceptions at 0xffff97c60720>
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
          │   │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d5080>
          │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00>
          │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          └ <fastapi.routing.APIRouter object at 0xffff48acca10>
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
          │    │                │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d5080>
          │    │                │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00>
          │    │                └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          │    └ <bound method Router.app of <fastapi.routing.APIRouter object at 0xffff48acca10>>
          └ <fastapi.routing.APIRouter object at 0xffff48acca10>
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
    await route.handle(scope, receive, send)
          │     │      │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d5080>
          │     │      │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00>
          │     │      └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          │     └ <function Route.handle at 0xffff97c61d00>
          └ APIRoute(path='/api/v1/configs/tool_servers/verify', name='verify_tool_servers_config', methods=['POST'])
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
    await self.app(scope, receive, send)
          │    │   │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d5080>
          │    │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00>
          │    │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          │    └ <function request_response.<locals>.app at 0xffff0b5b8040>
          └ APIRoute(path='/api/v1/configs/tool_servers/verify', name='verify_tool_servers_config', methods=['POST'])
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
          │                            │    │        │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d5080>
          │                            │    │        │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00>
          │                            │    │        └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          │                            │    └ <starlette.requests.Request object at 0xffff096da310>
          │                            └ <function request_response.<locals>.app.<locals>.app at 0xffff096d6ac0>
          └ <function wrap_app_handling_exceptions at 0xffff97c60720>
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
          │   │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d7380>
          │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00>
          │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          └ <function request_response.<locals>.app.<locals>.app at 0xffff096d6ac0>
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
                     │ └ <starlette.requests.Request object at 0xffff096da310>
                     └ <function get_request_handler.<locals>.app at 0xffff0b5b8ea0>
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
    raw_response = await run_endpoint_function(
                         └ <function run_endpoint_function at 0xffff97c63b00>
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
    return await dependant.call(**values)
                 │         │      └ {'user': UserModel(id='8590bf4c-19d2-44a1-9199-833e8590b9cc', name='Andrew Reed', email='andrew.reed@huggingface.co', role='a...
                 │         └ <function verify_tool_servers_config at 0xffff48f5ac00>
                 └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...

  File "/app/backend/open_webui/routers/configs.py", line 132, in verify_tool_servers_config
    return await get_tool_server_data(token, url)
                 │                    │      └ 'http://0.0.0.0:8000/time/openapi.json'
                 │                    └ ''
                 └ <function get_tool_server_data at 0xffff48fb85e0>

> File "/app/backend/open_webui/utils/tools.py", line 435, in get_tool_server_data
    async with session.get(url, headers=headers) as response:
               │       │   │            └ {'Accept': 'application/json', 'Content-Type': 'application/json'}
               │       │   └ 'http://0.0.0.0:8000/time/openapi.json'
               │       └ <function ClientSession.get at 0xffff985359e0>
               └ <aiohttp.client.ClientSession object at 0xffff4955ffd0>

  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1425, in __aenter__
    self._resp: _RetType = await self._coro
    │    │                       │    └ <member '_coro' of '_BaseRequestContextManager' objects>
    │    │                       └ <aiohttp.client._BaseRequestContextManager object at 0xffff09952ad0>
    │    └ <member '_resp' of '_BaseRequestContextManager' objects>
    └ <aiohttp.client._BaseRequestContextManager object at 0xffff09952ad0>
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 703, in _request
    conn = await self._connector.connect(
                 │    └ None
                 └ <aiohttp.client.ClientSession object at 0xffff4955ffd0>
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 548, in connect
    proto = await self._create_connection(req, traces, timeout)
                  │    │                  │    │       └ ClientTimeout(total=10, connect=None, sock_read=None, sock_connect=None, ceil_threshold=5)
                  │    │                  │    └ []
                  │    │                  └ <aiohttp.client_reqrep.ClientRequest object at 0xffff09976250>
                  │    └ <function TCPConnector._create_connection at 0xffff984d77e0>
                  └ <aiohttp.connector.TCPConnector object at 0xffff09964750>
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1056, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
                     │    │                         │    │       └ ClientTimeout(total=10, connect=None, sock_read=None, sock_connect=None, ceil_threshold=5)
                     │    │                         │    └ []
                     │    │                         └ <aiohttp.client_reqrep.ClientRequest object at 0xffff09976250>
                     │    └ <function TCPConnector._create_direct_connection at 0xffff984d7f60>
                     └ <aiohttp.connector.TCPConnector object at 0xffff09964750>
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1400, in _create_direct_connection
    raise last_exc
          └ ClientConnectorError(ConnectionKey(host='0.0.0.0', port=8000, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_head...
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1369, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                          │    └ <function TCPConnector._wrap_create_connection at 0xffff984d79c0>
                          └ <aiohttp.connector.TCPConnector object at 0xffff09964750>
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1130, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
          │            │   └ <property object at 0xffff984a81d0>
          │            └ <aiohttp.client_reqrep.ClientRequest object at 0xffff09976250>
          └ <class 'aiohttp.client_exceptions.ClientConnectorError'>

aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 0.0.0.0:8000 ssl:default [Connect call failed ('0.0.0.0', 8000)]
2025-04-30 19:15:39.733 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 192.168.65.1:32133 - "POST /api/v1/configs/tool_servers/verify HTTP/1.1" 400 - {}
2025-04-30 19:16:47.374 | ERROR    | open_webui.utils.tools:get_tool_server_data:447 - Could not fetch tool server spec from http://0.0.0.0:8000/time/openapi.json - {}
Traceback (most recent call last):

  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1115, in _wrap_create_connection
    sock = await aiohappyeyeballs.start_connection(
                 │                └ <function start_connection at 0xffff984b3ce0>
                 └ <module 'aiohappyeyeballs' from '/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/__init__.py'>
  File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 122, in start_connection
    raise first_exception
          └ ConnectionRefusedError(111, "Connect call failed ('0.0.0.0', 8000)")
  File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 73, in start_connection
    sock = await _connect_sock(
                 └ <function _connect_sock at 0xffff984d4040>
  File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 208, in _connect_sock
    await loop.sock_connect(sock, address)
          │    │            │     └ ('0.0.0.0', 8000)
          │    │            └ <socket.socket [closed] fd=-1, family=2, type=1, proto=6>
          │    └ <cyfunction Loop.sock_connect at 0xffff9ab57e00>
          └ <uvloop.Loop running=True closed=False debug=False>
  File "uvloop/loop.pyx", line 2633, in sock_connect
    await fut
  File "uvloop/loop.pyx", line 1108, in uvloop.loop.Loop._sock_connect_cb
    raise OSError(err, 'Connect call failed %s' % (address,))

ConnectionRefusedError: [Errno 111] Connect call failed ('0.0.0.0', 8000)


The above exception was the direct cause of the following exception:


Traceback (most recent call last):

  File "/usr/local/bin/uvicorn", line 10, in <module>
    sys.exit(main())
    │   │    └ <Command main>
    │   └ <built-in function exit>
    └ <module 'sys' (built-in)>
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1161, in __call__
    return self.main(*args, **kwargs)
           │    │     │       └ {}
           │    │     └ ()
           │    └ <function BaseCommand.main at 0xffff9aecb7e0>
           └ <Command main>
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main
    rv = self.invoke(ctx)
         │    │      └ <click.core.Context object at 0xffff9be8c3d0>
         │    └ <function Command.invoke at 0xffff9aee4400>
         └ <Command main>
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1443, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           │   │      │    │           │   └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
           │   │      │    │           └ <click.core.Context object at 0xffff9be8c3d0>
           │   │      │    └ <function main at 0xffff9ab52fc0>
           │   │      └ <Command main>
           │   └ <function Context.invoke at 0xffff9aecad40>
           └ <click.core.Context object at 0xffff9be8c3d0>
  File "/usr/local/lib/python3.11/site-packages/click/core.py", line 788, in invoke
    return __callback(*args, **kwargs)
                       │       └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ...
                       └ ()
  File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main
    run(
    └ <function run at 0xffff9af16de0>
  File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run
    server.run()
    │      └ <function Server.run at 0xffff9ace02c0>
    └ <uvicorn.server.Server object at 0xffff9ad54610>
  File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run
    return asyncio.run(self.serve(sockets=sockets))
           │       │   │    │             └ None
           │       │   │    └ <function Server.serve at 0xffff9ace0360>
           │       │   └ <uvicorn.server.Server object at 0xffff9ad54610>
           │       └ <function run at 0xffff9b3e8ae0>
           └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'>
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run
    return runner.run(main)
           │      │   └ <coroutine object Server.serve at 0xffff9ab116c0>
           │      └ <function Runner.run at 0xffff9b19c680>
           └ <asyncio.runners.Runner object at 0xffff9ab5f4d0>
  File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run
    return self._loop.run_until_complete(task)
           │    │     │                  └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:70> wai...
           │    │     └ <cyfunction Loop.run_until_complete at 0xffff9ab56cf0>
           │    └ <uvloop.Loop running=True closed=False debug=False>
           └ <asyncio.runners.Runner object at 0xffff9ab5f4d0>
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro
    await self.app(scope, receive_or_disconnect, send_no_error)
          │    │   │      │                      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0xffff096d4ea0>
          │    │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0>
          │    │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          │    └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0xffff0b7d0150>
          └ <open_webui.main.RedirectMiddleware object at 0xffff0b4adf90>
  File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__
    await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send)
          │                            │    │    │     │      │        └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0xffff096d4ea0>
          │                            │    │    │     │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0>
          │                            │    │    │     └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          │                            │    │    └ <starlette.requests.Request object at 0xffff098d8750>
          │                            │    └ <fastapi.routing.APIRouter object at 0xffff48acca10>
          │                            └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0xffff0b7d0150>
          └ <function wrap_app_handling_exceptions at 0xffff97c60720>
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
          │   │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d54e0>
          │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0>
          │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          └ <fastapi.routing.APIRouter object at 0xffff48acca10>
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__
    await self.middleware_stack(scope, receive, send)
          │    │                │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d54e0>
          │    │                │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0>
          │    │                └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          │    └ <bound method Router.app of <fastapi.routing.APIRouter object at 0xffff48acca10>>
          └ <fastapi.routing.APIRouter object at 0xffff48acca10>
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app
    await route.handle(scope, receive, send)
          │     │      │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d54e0>
          │     │      │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0>
          │     │      └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          │     └ <function Route.handle at 0xffff97c61d00>
          └ APIRoute(path='/api/v1/configs/tool_servers/verify', name='verify_tool_servers_config', methods=['POST'])
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle
    await self.app(scope, receive, send)
          │    │   │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d54e0>
          │    │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0>
          │    │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          │    └ <function request_response.<locals>.app at 0xffff0b5b8040>
          └ APIRoute(path='/api/v1/configs/tool_servers/verify', name='verify_tool_servers_config', methods=['POST'])
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app
    await wrap_app_handling_exceptions(app, request)(scope, receive, send)
          │                            │    │        │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d54e0>
          │                            │    │        │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0>
          │                            │    │        └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          │                            │    └ <starlette.requests.Request object at 0xffff098daf10>
          │                            └ <function request_response.<locals>.app.<locals>.app at 0xffff096d7380>
          └ <function wrap_app_handling_exceptions at 0xffff97c60720>
  File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app
    await app(scope, receive, sender)
          │   │      │        └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d5bc0>
          │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0>
          │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c...
          └ <function request_response.<locals>.app.<locals>.app at 0xffff096d7380>
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
                     │ └ <starlette.requests.Request object at 0xffff098daf10>
                     └ <function get_request_handler.<locals>.app at 0xffff0b5b8ea0>
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app
    raw_response = await run_endpoint_function(
                         └ <function run_endpoint_function at 0xffff97c63b00>
  File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function
    return await dependant.call(**values)
                 │         │      └ {'user': UserModel(id='8590bf4c-19d2-44a1-9199-833e8590b9cc', name='Andrew Reed', email='andrew.reed@huggingface.co', role='a...
                 │         └ <function verify_tool_servers_config at 0xffff48f5ac00>
                 └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...

  File "/app/backend/open_webui/routers/configs.py", line 132, in verify_tool_servers_config
    return await get_tool_server_data(token, url)
                 │                    │      └ 'http://0.0.0.0:8000/time/openapi.json'
                 │                    └ ''
                 └ <function get_tool_server_data at 0xffff48fb85e0>

> File "/app/backend/open_webui/utils/tools.py", line 435, in get_tool_server_data
    async with session.get(url, headers=headers) as response:
               │       │   │            └ {'Accept': 'application/json', 'Content-Type': 'application/json'}
               │       │   └ 'http://0.0.0.0:8000/time/openapi.json'
               │       └ <function ClientSession.get at 0xffff985359e0>
               └ <aiohttp.client.ClientSession object at 0xffff495ca4d0>

  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1425, in __aenter__
    self._resp: _RetType = await self._coro
    │    │                       │    └ <member '_coro' of '_BaseRequestContextManager' objects>
    │    │                       └ <aiohttp.client._BaseRequestContextManager object at 0xffff09952ad0>
    │    └ <member '_resp' of '_BaseRequestContextManager' objects>
    └ <aiohttp.client._BaseRequestContextManager object at 0xffff09952ad0>
  File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 703, in _request
    conn = await self._connector.connect(
                 │    └ None
                 └ <aiohttp.client.ClientSession object at 0xffff495ca4d0>
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 548, in connect
    proto = await self._create_connection(req, traces, timeout)
                  │    │                  │    │       └ ClientTimeout(total=10, connect=None, sock_read=None, sock_connect=None, ceil_threshold=5)
                  │    │                  │    └ []
                  │    │                  └ <aiohttp.client_reqrep.ClientRequest object at 0xffff0a2cab10>
                  │    └ <function TCPConnector._create_connection at 0xffff984d77e0>
                  └ <aiohttp.connector.TCPConnector object at 0xffff09946410>
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1056, in _create_connection
    _, proto = await self._create_direct_connection(req, traces, timeout)
                     │    │                         │    │       └ ClientTimeout(total=10, connect=None, sock_read=None, sock_connect=None, ceil_threshold=5)
                     │    │                         │    └ []
                     │    │                         └ <aiohttp.client_reqrep.ClientRequest object at 0xffff0a2cab10>
                     │    └ <function TCPConnector._create_direct_connection at 0xffff984d7f60>
                     └ <aiohttp.connector.TCPConnector object at 0xffff09946410>
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1400, in _create_direct_connection
    raise last_exc
          └ ClientConnectorError(ConnectionKey(host='0.0.0.0', port=8000, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_head...
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1369, in _create_direct_connection
    transp, proto = await self._wrap_create_connection(
                          │    └ <function TCPConnector._wrap_create_connection at 0xffff984d79c0>
                          └ <aiohttp.connector.TCPConnector object at 0xffff09946410>
  File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1130, in _wrap_create_connection
    raise client_error(req.connection_key, exc) from exc
          │            │   └ <property object at 0xffff984a81d0>
          │            └ <aiohttp.client_reqrep.ClientRequest object at 0xffff0a2cab10>
          └ <class 'aiohttp.client_exceptions.ClientConnectorError'>

aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 0.0.0.0:8000 ssl:default [Connect call failed ('0.0.0.0', 8000)]
2025-04-30 19:16:47.378 | INFO     | uvicorn.protocols.http.httptools_impl:send:476 - 192.168.65.1:25786 - "POST /api/v1/configs/tool_servers/verify HTTP/1.1" 400 - {}

Additional Information

Thanks for the awesome project you are building 🤗

Originally created by @andrewrreed on GitHub (Apr 30, 2025). Original GitHub issue: https://github.com/open-webui/open-webui/issues/13373 ### Check Existing Issues - [x] I have searched the existing issues and discussions. - [x] I am using the latest version of Open WebUI. ### Installation Method Docker ### Open WebUI Version v0.6.5 ### Ollama Version (if applicable) _No response_ ### Operating System MacOS ### Browser (if applicable) Chrome ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have listed steps to reproduce the bug in detail. ### Expected Behavior When I deploy an `mcpo` proxy server with `uvx mcpo --config ./apps/openwebui/test-mcpo-config.json`, where the config contains: ``` { "mcpServers": { "memory": { "command": "npx", "args": [ "-y", "@modelcontextprotocol/server-memory" ] }, "airbnb": { "command": "npx", "args": [ "-y", "@openbnb/mcp-server-airbnb" ] }, "time": { "command": "uvx", "args": [ "mcp-server-time", "--local-timezone=America/New_York" ] } } } ``` I should be able to successfully configure each tool server via the OpenWebUI UI with the following: - Admin Panel > Settings > Tools > Add Connection - URL: `http://0.0.0.0:8000/time/openapi.json` ### Actual Behavior I get a `Connection Failed` error in UI pop up. ### Steps to Reproduce 1. Deploy OpenWebUI with `docker run -d -p 3000:8080 -v open-webui:/app/backend/data --name open-webui ghcr.io/open-webui/open-webui:main` 2. Create admin user 3. Deploy `mcpo` proxy server locally with `--config` pointing to config file from above 4. Manually test the `mcpo` server: `curl http://localhost:8000/time/openapi.json` ✅ 200 OK 5. Attempt to add one of the MCP tools as a tool in the UI like this: `http://0.0.0.0:8000/time/openapi.json` 6. Notice error. ### Logs & Screenshots Heres the logs in the OpenWebUI docker container: ``` 2025-04-30 19:15:26.425 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 192.168.65.1:33876 - "POST /api/v1/configs/tool_servers/verify HTTP/1.1" 400 - {} 2025-04-30 19:15:39.729 | ERROR | open_webui.utils.tools:get_tool_server_data:447 - Could not fetch tool server spec from http://0.0.0.0:8000/time/openapi.json - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1115, in _wrap_create_connection sock = await aiohappyeyeballs.start_connection( │ └ <function start_connection at 0xffff984b3ce0> └ <module 'aiohappyeyeballs' from '/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/__init__.py'> File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 122, in start_connection raise first_exception └ ConnectionRefusedError(111, "Connect call failed ('0.0.0.0', 8000)") File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 73, in start_connection sock = await _connect_sock( └ <function _connect_sock at 0xffff984d4040> File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 208, in _connect_sock await loop.sock_connect(sock, address) │ │ │ └ ('0.0.0.0', 8000) │ │ └ <socket.socket [closed] fd=-1, family=2, type=1, proto=6> │ ��� <cyfunction Loop.sock_connect at 0xffff9ab57e00> └ <uvloop.Loop running=True closed=False debug=False> File "uvloop/loop.pyx", line 2633, in sock_connect await fut File "uvloop/loop.pyx", line 1108, in uvloop.loop.Loop._sock_connect_cb raise OSError(err, 'Connect call failed %s' % (address,)) ConnectionRefusedError: [Errno 111] Connect call failed ('0.0.0.0', 8000) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/bin/uvicorn", line 10, in <module> sys.exit(main()) │ │ └ <Command main> │ └ <built-in function exit> └ <module 'sys' (built-in)> File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1161, in __call__ return self.main(*args, **kwargs) │ │ │ └ {} │ │ └ () │ └ <function BaseCommand.main at 0xffff9aecb7e0> └ <Command main> File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main rv = self.invoke(ctx) │ │ └ <click.core.Context object at 0xffff9be8c3d0> │ └ <function Command.invoke at 0xffff9aee4400> └ <Command main> File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1443, in invoke return ctx.invoke(self.callback, **ctx.params) │ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ... │ │ │ │ └ <click.core.Context object at 0xffff9be8c3d0> │ │ │ └ <function main at 0xffff9ab52fc0> │ │ └ <Command main> │ └ <function Context.invoke at 0xffff9aecad40> └ <click.core.Context object at 0xffff9be8c3d0> File "/usr/local/lib/python3.11/site-packages/click/core.py", line 788, in invoke return __callback(*args, **kwargs) │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ... └ () File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main run( └ <function run at 0xffff9af16de0> File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run server.run() │ └ <function Server.run at 0xffff9ace02c0> └ <uvicorn.server.Server object at 0xffff9ad54610> File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run return asyncio.run(self.serve(sockets=sockets)) │ │ │ │ └ None │ │ │ └ <function Server.serve at 0xffff9ace0360> │ │ └ <uvicorn.server.Server object at 0xffff9ad54610> │ └ <function run at 0xffff9b3e8ae0> └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'> File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) │ │ └ <coroutine object Server.serve at 0xffff9ab116c0> │ └ <function Runner.run at 0xffff9b19c680> └ <asyncio.runners.Runner object at 0xffff9ab5f4d0> File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) │ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:70> wai... │ │ └ <cyfunction Loop.run_until_complete at 0xffff9ab56cf0> │ └ <uvloop.Loop running=True closed=False debug=False> └ <asyncio.runners.Runner object at 0xffff9ab5f4d0> File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro await self.app(scope, receive_or_disconnect, send_no_error) │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0xffff096d6480> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0xffff0b7d0150> └ <open_webui.main.RedirectMiddleware object at 0xffff0b4adf90> File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) │ │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0xffff096d6480> │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00> │ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ │ │ └ <starlette.requests.Request object at 0xffff096d9590> │ │ └ <fastapi.routing.APIRouter object at 0xffff48acca10> │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0xffff0b7d0150> └ <function wrap_app_handling_exceptions at 0xffff97c60720> File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d5080> │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00> │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... └ <fastapi.routing.APIRouter object at 0xffff48acca10> File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__ await self.middleware_stack(scope, receive, send) │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d5080> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0xffff48acca10>> └ <fastapi.routing.APIRouter object at 0xffff48acca10> File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app await route.handle(scope, receive, send) │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d5080> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ └ <function Route.handle at 0xffff97c61d00> └ APIRoute(path='/api/v1/configs/tool_servers/verify', name='verify_tool_servers_config', methods=['POST']) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle await self.app(scope, receive, send) │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d5080> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ └ <function request_response.<locals>.app at 0xffff0b5b8040> └ APIRoute(path='/api/v1/configs/tool_servers/verify', name='verify_tool_servers_config', methods=['POST']) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) │ │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d5080> │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00> │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ │ └ <starlette.requests.Request object at 0xffff096da310> │ └ <function request_response.<locals>.app.<locals>.app at 0xffff096d6ac0> └ <function wrap_app_handling_exceptions at 0xffff97c60720> File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d7380> │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d4e00> │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... └ <function request_response.<locals>.app.<locals>.app at 0xffff096d6ac0> File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app response = await f(request) │ └ <starlette.requests.Request object at 0xffff096da310> └ <function get_request_handler.<locals>.app at 0xffff0b5b8ea0> File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app raw_response = await run_endpoint_function( └ <function run_endpoint_function at 0xffff97c63b00> File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function return await dependant.call(**values) │ │ └ {'user': UserModel(id='8590bf4c-19d2-44a1-9199-833e8590b9cc', name='Andrew Reed', email='andrew.reed@huggingface.co', role='a... │ └ <function verify_tool_servers_config at 0xffff48f5ac00> └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant... File "/app/backend/open_webui/routers/configs.py", line 132, in verify_tool_servers_config return await get_tool_server_data(token, url) │ │ └ 'http://0.0.0.0:8000/time/openapi.json' │ └ '' └ <function get_tool_server_data at 0xffff48fb85e0> > File "/app/backend/open_webui/utils/tools.py", line 435, in get_tool_server_data async with session.get(url, headers=headers) as response: │ │ │ └ {'Accept': 'application/json', 'Content-Type': 'application/json'} │ │ └ 'http://0.0.0.0:8000/time/openapi.json' │ └ <function ClientSession.get at 0xffff985359e0> └ <aiohttp.client.ClientSession object at 0xffff4955ffd0> File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1425, in __aenter__ self._resp: _RetType = await self._coro │ │ │ └ <member '_coro' of '_BaseRequestContextManager' objects> │ │ └ <aiohttp.client._BaseRequestContextManager object at 0xffff09952ad0> │ └ <member '_resp' of '_BaseRequestContextManager' objects> └ <aiohttp.client._BaseRequestContextManager object at 0xffff09952ad0> File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 703, in _request conn = await self._connector.connect( │ └ None └ <aiohttp.client.ClientSession object at 0xffff4955ffd0> File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 548, in connect proto = await self._create_connection(req, traces, timeout) │ │ │ │ └ ClientTimeout(total=10, connect=None, sock_read=None, sock_connect=None, ceil_threshold=5) │ │ │ └ [] │ │ └ <aiohttp.client_reqrep.ClientRequest object at 0xffff09976250> │ └ <function TCPConnector._create_connection at 0xffff984d77e0> └ <aiohttp.connector.TCPConnector object at 0xffff09964750> File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1056, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) │ │ │ │ └ ClientTimeout(total=10, connect=None, sock_read=None, sock_connect=None, ceil_threshold=5) │ │ │ └ [] │ │ └ <aiohttp.client_reqrep.ClientRequest object at 0xffff09976250> │ └ <function TCPConnector._create_direct_connection at 0xffff984d7f60> └ <aiohttp.connector.TCPConnector object at 0xffff09964750> File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1400, in _create_direct_connection raise last_exc └ ClientConnectorError(ConnectionKey(host='0.0.0.0', port=8000, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_head... File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1369, in _create_direct_connection transp, proto = await self._wrap_create_connection( │ └ <function TCPConnector._wrap_create_connection at 0xffff984d79c0> └ <aiohttp.connector.TCPConnector object at 0xffff09964750> File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1130, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc │ │ └ <property object at 0xffff984a81d0> │ └ <aiohttp.client_reqrep.ClientRequest object at 0xffff09976250> └ <class 'aiohttp.client_exceptions.ClientConnectorError'> aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 0.0.0.0:8000 ssl:default [Connect call failed ('0.0.0.0', 8000)] 2025-04-30 19:15:39.733 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 192.168.65.1:32133 - "POST /api/v1/configs/tool_servers/verify HTTP/1.1" 400 - {} 2025-04-30 19:16:47.374 | ERROR | open_webui.utils.tools:get_tool_server_data:447 - Could not fetch tool server spec from http://0.0.0.0:8000/time/openapi.json - {} Traceback (most recent call last): File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1115, in _wrap_create_connection sock = await aiohappyeyeballs.start_connection( │ └ <function start_connection at 0xffff984b3ce0> └ <module 'aiohappyeyeballs' from '/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/__init__.py'> File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 122, in start_connection raise first_exception └ ConnectionRefusedError(111, "Connect call failed ('0.0.0.0', 8000)") File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 73, in start_connection sock = await _connect_sock( └ <function _connect_sock at 0xffff984d4040> File "/usr/local/lib/python3.11/site-packages/aiohappyeyeballs/impl.py", line 208, in _connect_sock await loop.sock_connect(sock, address) │ │ │ └ ('0.0.0.0', 8000) │ │ └ <socket.socket [closed] fd=-1, family=2, type=1, proto=6> │ └ <cyfunction Loop.sock_connect at 0xffff9ab57e00> └ <uvloop.Loop running=True closed=False debug=False> File "uvloop/loop.pyx", line 2633, in sock_connect await fut File "uvloop/loop.pyx", line 1108, in uvloop.loop.Loop._sock_connect_cb raise OSError(err, 'Connect call failed %s' % (address,)) ConnectionRefusedError: [Errno 111] Connect call failed ('0.0.0.0', 8000) The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/usr/local/bin/uvicorn", line 10, in <module> sys.exit(main()) │ │ └ <Command main> │ └ <built-in function exit> └ <module 'sys' (built-in)> File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1161, in __call__ return self.main(*args, **kwargs) │ │ │ └ {} │ │ └ () │ └ <function BaseCommand.main at 0xffff9aecb7e0> └ <Command main> File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1082, in main rv = self.invoke(ctx) │ │ └ <click.core.Context object at 0xffff9be8c3d0> │ └ <function Command.invoke at 0xffff9aee4400> └ <Command main> File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1443, in invoke return ctx.invoke(self.callback, **ctx.params) │ │ │ │ │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ... │ │ │ │ └ <click.core.Context object at 0xffff9be8c3d0> │ │ │ └ <function main at 0xffff9ab52fc0> │ │ └ <Command main> │ └ <function Context.invoke at 0xffff9aecad40> └ <click.core.Context object at 0xffff9be8c3d0> File "/usr/local/lib/python3.11/site-packages/click/core.py", line 788, in invoke return __callback(*args, **kwargs) │ └ {'host': '0.0.0.0', 'port': 8080, 'forwarded_allow_ips': '*', 'workers': 1, 'app': 'open_webui.main:app', 'uds': None, 'fd': ... └ () File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main run( └ <function run at 0xffff9af16de0> File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run server.run() │ └ <function Server.run at 0xffff9ace02c0> └ <uvicorn.server.Server object at 0xffff9ad54610> File "/usr/local/lib/python3.11/site-packages/uvicorn/server.py", line 66, in run return asyncio.run(self.serve(sockets=sockets)) │ │ │ │ └ None │ │ │ └ <function Server.serve at 0xffff9ace0360> │ │ └ <uvicorn.server.Server object at 0xffff9ad54610> │ └ <function run at 0xffff9b3e8ae0> └ <module 'asyncio' from '/usr/local/lib/python3.11/asyncio/__init__.py'> File "/usr/local/lib/python3.11/asyncio/runners.py", line 190, in run return runner.run(main) │ │ └ <coroutine object Server.serve at 0xffff9ab116c0> │ └ <function Runner.run at 0xffff9b19c680> └ <asyncio.runners.Runner object at 0xffff9ab5f4d0> File "/usr/local/lib/python3.11/asyncio/runners.py", line 118, in run return self._loop.run_until_complete(task) │ │ │ └ <Task pending name='Task-1' coro=<Server.serve() running at /usr/local/lib/python3.11/site-packages/uvicorn/server.py:70> wai... │ │ └ <cyfunction Loop.run_until_complete at 0xffff9ab56cf0> │ └ <uvloop.Loop running=True closed=False debug=False> └ <asyncio.runners.Runner object at 0xffff9ab5f4d0> File "/usr/local/lib/python3.11/site-packages/starlette/middleware/base.py", line 141, in coro await self.app(scope, receive_or_disconnect, send_no_error) │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0xffff096d4ea0> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0xffff0b7d0150> └ <open_webui.main.RedirectMiddleware object at 0xffff0b4adf90> File "/usr/local/lib/python3.11/site-packages/starlette/middleware/exceptions.py", line 62, in __call__ await wrap_app_handling_exceptions(self.app, conn)(scope, receive, send) │ │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.send_no_error at 0xffff096d4ea0> │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0> │ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ │ │ └ <starlette.requests.Request object at 0xffff098d8750> │ │ └ <fastapi.routing.APIRouter object at 0xffff48acca10> │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0xffff0b7d0150> └ <function wrap_app_handling_exceptions at 0xffff97c60720> File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d54e0> │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0> │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... └ <fastapi.routing.APIRouter object at 0xffff48acca10> File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 715, in __call__ await self.middleware_stack(scope, receive, send) │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d54e0> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0xffff48acca10>> └ <fastapi.routing.APIRouter object at 0xffff48acca10> File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 735, in app await route.handle(scope, receive, send) │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d54e0> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ └ <function Route.handle at 0xffff97c61d00> └ APIRoute(path='/api/v1/configs/tool_servers/verify', name='verify_tool_servers_config', methods=['POST']) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 288, in handle await self.app(scope, receive, send) │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d54e0> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ └ <function request_response.<locals>.app at 0xffff0b5b8040> └ APIRoute(path='/api/v1/configs/tool_servers/verify', name='verify_tool_servers_config', methods=['POST']) File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 76, in app await wrap_app_handling_exceptions(app, request)(scope, receive, send) │ │ │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d54e0> │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0> │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... │ │ └ <starlette.requests.Request object at 0xffff098daf10> │ └ <function request_response.<locals>.app.<locals>.app at 0xffff096d7380> └ <function wrap_app_handling_exceptions at 0xffff97c60720> File "/usr/local/lib/python3.11/site-packages/starlette/_exception_handler.py", line 42, in wrapped_app await app(scope, receive, sender) │ │ │ └ <function wrap_app_handling_exceptions.<locals>.wrapped_app.<locals>.sender at 0xffff096d5bc0> │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0xffff096d6ca0> │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.17.0.2', 8080), 'c... └ <function request_response.<locals>.app.<locals>.app at 0xffff096d7380> File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app response = await f(request) │ └ <starlette.requests.Request object at 0xffff098daf10> └ <function get_request_handler.<locals>.app at 0xffff0b5b8ea0> File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 301, in app raw_response = await run_endpoint_function( └ <function run_endpoint_function at 0xffff97c63b00> File "/usr/local/lib/python3.11/site-packages/fastapi/routing.py", line 212, in run_endpoint_function return await dependant.call(**values) │ │ └ {'user': UserModel(id='8590bf4c-19d2-44a1-9199-833e8590b9cc', name='Andrew Reed', email='andrew.reed@huggingface.co', role='a... │ └ <function verify_tool_servers_config at 0xffff48f5ac00> └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant... File "/app/backend/open_webui/routers/configs.py", line 132, in verify_tool_servers_config return await get_tool_server_data(token, url) │ │ └ 'http://0.0.0.0:8000/time/openapi.json' │ └ '' └ <function get_tool_server_data at 0xffff48fb85e0> > File "/app/backend/open_webui/utils/tools.py", line 435, in get_tool_server_data async with session.get(url, headers=headers) as response: │ │ │ └ {'Accept': 'application/json', 'Content-Type': 'application/json'} │ │ └ 'http://0.0.0.0:8000/time/openapi.json' │ └ <function ClientSession.get at 0xffff985359e0> └ <aiohttp.client.ClientSession object at 0xffff495ca4d0> File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 1425, in __aenter__ self._resp: _RetType = await self._coro │ │ │ └ <member '_coro' of '_BaseRequestContextManager' objects> │ │ └ <aiohttp.client._BaseRequestContextManager object at 0xffff09952ad0> │ └ <member '_resp' of '_BaseRequestContextManager' objects> └ <aiohttp.client._BaseRequestContextManager object at 0xffff09952ad0> File "/usr/local/lib/python3.11/site-packages/aiohttp/client.py", line 703, in _request conn = await self._connector.connect( │ └ None └ <aiohttp.client.ClientSession object at 0xffff495ca4d0> File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 548, in connect proto = await self._create_connection(req, traces, timeout) │ │ │ │ └ ClientTimeout(total=10, connect=None, sock_read=None, sock_connect=None, ceil_threshold=5) │ │ │ └ [] │ │ └ <aiohttp.client_reqrep.ClientRequest object at 0xffff0a2cab10> │ └ <function TCPConnector._create_connection at 0xffff984d77e0> └ <aiohttp.connector.TCPConnector object at 0xffff09946410> File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1056, in _create_connection _, proto = await self._create_direct_connection(req, traces, timeout) │ │ │ │ └ ClientTimeout(total=10, connect=None, sock_read=None, sock_connect=None, ceil_threshold=5) │ │ │ └ [] │ │ └ <aiohttp.client_reqrep.ClientRequest object at 0xffff0a2cab10> │ └ <function TCPConnector._create_direct_connection at 0xffff984d7f60> └ <aiohttp.connector.TCPConnector object at 0xffff09946410> File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1400, in _create_direct_connection raise last_exc └ ClientConnectorError(ConnectionKey(host='0.0.0.0', port=8000, is_ssl=False, ssl=True, proxy=None, proxy_auth=None, proxy_head... File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1369, in _create_direct_connection transp, proto = await self._wrap_create_connection( │ └ <function TCPConnector._wrap_create_connection at 0xffff984d79c0> └ <aiohttp.connector.TCPConnector object at 0xffff09946410> File "/usr/local/lib/python3.11/site-packages/aiohttp/connector.py", line 1130, in _wrap_create_connection raise client_error(req.connection_key, exc) from exc │ │ └ <property object at 0xffff984a81d0> │ └ <aiohttp.client_reqrep.ClientRequest object at 0xffff0a2cab10> └ <class 'aiohttp.client_exceptions.ClientConnectorError'> aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host 0.0.0.0:8000 ssl:default [Connect call failed ('0.0.0.0', 8000)] 2025-04-30 19:16:47.378 | INFO | uvicorn.protocols.http.httptools_impl:send:476 - 192.168.65.1:25786 - "POST /api/v1/configs/tool_servers/verify HTTP/1.1" 400 - {} ``` ### Additional Information Thanks for the awesome project you are building 🤗
GiteaMirror added the bug label 2026-04-19 22:43:22 -05:00
Author
Owner

@tjbck commented on GitHub (Apr 30, 2025):

Could you share a screenshot of your tool server config settings?

<!-- gh-comment-id:2843088069 --> @tjbck commented on GitHub (Apr 30, 2025): Could you share a screenshot of your tool server config settings?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#16896