issue: The searxng search is not working #4580

Closed
opened 2025-11-11 15:57:21 -06:00 by GiteaMirror · 4 comments
Owner

Originally created by @EntropyYue on GitHub (Mar 26, 2025).

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

0.5.20

Ollama Version (if applicable)

No response

Operating System

ubuntu 22.04

Browser (if applicable)

No response

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

Normal search

Actual Behavior

Error searching "xxx"

Steps to Reproduce

Using a local searxng server for web search

Logs & Screenshots

2025-03-26 22:24:16.440 | ERROR    | open_webui.routers.retrieval:process_web_search:1480 - [Errno -2] Name or service not known - {}
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 0x7f87a2815da0>
           └ <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 0x7f87a34e0310>
         │    └ <function Command.invoke at 0x7f87a2816980>
         └ <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': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'...
           │   │      │    │           └ <click.core.Context object at 0x7f87a34e0310>
           │   │      │    └ <function main at 0x7f87a23e2f20>
           │   │      └ <Command main>
           │   └ <function Context.invoke at 0x7f87a2815300>
           └ <click.core.Context object at 0x7f87a34e0310>
  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': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'...
                       └ ()
  File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main
    run(
    └ <function run at 0x7f87a2823e20>
  File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run
    server.run()
    │      └ <function Server.run at 0x7f87a2681260>
    └ <uvicorn.server.Server object at 0x7f87a274fdd0>
  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 0x7f87a2681300>
           │       │   └ <uvicorn.server.Server object at 0x7f87a274fdd0>
           │       └ <function run at 0x7f87a2b8cb80>
           └ <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 0x7f87a25add50>
           │      └ <function Runner.run at 0x7f87a2a00720>
           └ <asyncio.runners.Runner object at 0x7f87a23eb710>
  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 0x7f87a2424380>
           │    └ <uvloop.Loop running=True closed=False debug=False>
           └ <asyncio.runners.Runner object at 0x7f87a23eb710>
  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 0x7f8712d46de0>
          │    │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │    │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          │    └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f871329e750>
          └ <open_webui.main.RedirectMiddleware object at 0x7f87201f3d10>
  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 0x7f8712d46de0>
          │                            │    │    │     │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │                            │    │    │     └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          │                            │    │    └ <starlette.requests.Request object at 0x7f8704338450>
          │                            │    └ <fastapi.routing.APIRouter object at 0x7f875fb881d0>
          │                            └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f871329e750>
          └ <function wrap_app_handling_exceptions at 0x7f879fa9ef20>
  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 0x7f8712d46b60>
          │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          └ <fastapi.routing.APIRouter object at 0x7f875fb881d0>
  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 0x7f8712d46b60>
          │    │                │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │    │                └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          │    └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x7f875fb881d0>>
          └ <fastapi.routing.APIRouter object at 0x7f875fb881d0>
  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 0x7f8712d46b60>
          │     │      │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │     │      └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          │     └ <function Route.handle at 0x7f879fb585e0>
          └ APIRoute(path='/api/chat/completions', name='chat_completion', 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 0x7f8712d46b60>
          │    │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │    │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          │    └ <function request_response.<locals>.app at 0x7f871326e5c0>
          └ APIRoute(path='/api/chat/completions', name='chat_completion', 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 0x7f8712d46b60>
          │                            │    │        │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │                            │    │        └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          │                            │    └ <starlette.requests.Request object at 0x7f8704338410>
          │                            └ <function request_response.<locals>.app.<locals>.app at 0x7f8712d44400>
          └ <function wrap_app_handling_exceptions at 0x7f879fa9ef20>
  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 0x7f8712d325c0>
          │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          └ <function request_response.<locals>.app.<locals>.app at 0x7f8712d44400>
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
                     │ └ <starlette.requests.Request object at 0x7f8704338410>
                     └ <function get_request_handler.<locals>.app at 0x7f871326e480>
  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 0x7f879fb5a3e0>
  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='b996c233-c9f1-4088-b20c-ef8a28b12baf', name='EntropyYue', email='xiaopa233@qq.com', role='admin', prof...
                 │         └ <function chat_completion at 0x7f871326ca40>
                 └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...

  File "/app/backend/open_webui/main.py", line 1043, in chat_completion
    form_data, metadata, events = await process_chat_payload(
    │          │                        └ <function process_chat_payload at 0x7f875ff90040>
    │          └ {'user_id': 'b996c233-c9f1-4088-b20c-ef8a28b12baf', 'chat_id': '80eac470-a73f-4a4e-8f52-1a672b001ce0', 'message_id': '816931c...
    └ {'stream': True, 'model': 'deepseek-r1:14b', 'messages': [{'role': 'user', 'content': '搜索openai的新 闻'}], 'metadata': {'user_id'...

  File "/app/backend/open_webui/utils/middleware.py", line 736, in process_chat_payload
    form_data = await chat_web_search_handler(
                      └ <function chat_web_search_handler at 0x7f875ff90680>

  File "/app/backend/open_webui/utils/middleware.py", line 341, in chat_web_search_handler
    results = await process_web_search(
                    └ <function process_web_search at 0x7f8763525bc0>

> File "/app/backend/open_webui/routers/retrieval.py", line 1441, in process_web_search
    loader = get_web_loader(
             └ <function get_web_loader at 0x7f8768533560>

  File "/app/backend/open_webui/retrieval/web/utils.py", line 511, in get_web_loader
    safe_urls = safe_validate_urls([urls] if isinstance(urls, str) else urls)
                │                   │                   │               └ ['https://openai.com/news', 'https://openai.com/newsroom', 'https://openai.com/news/product-releases', 'https://openai.com/in...
                │                   │                   └ ['https://openai.com/news', 'https://openai.com/newsroom', 'https://openai.com/news/product-releases', 'https://openai.com/in...
                │                   └ ['https://openai.com/news', 'https://openai.com/newsroom', 'https://openai.com/news/product-releases', 'https://openai.com/in...
                └ <function safe_validate_urls at 0x7f87685309a0>

  File "/app/backend/open_webui/retrieval/web/utils.py", line 69, in safe_validate_urls
    if validate_url(u):
       │            └ 'http://zew.hr/eri'
       └ <function validate_url at 0x7f8768531300>

  File "/app/backend/open_webui/retrieval/web/utils.py", line 49, in validate_url
    ipv4_addresses, ipv6_addresses = resolve_hostname(parsed_url.hostname)
                                     │                │          └ <property object at 0x7f87a293a8e0>
                                     │                └ ParseResult(scheme='http', netloc='zew.hr', path='/eri', params='', query='', fragment='')
                                     └ <function resolve_hostname at 0x7f8768531620>

  File "/app/backend/open_webui/retrieval/web/utils.py", line 78, in resolve_hostname
    addr_info = socket.getaddrinfo(hostname, None)
                │      │           └ 'zew.hr'
                │      └ <function getaddrinfo at 0x7f87a31f6340>
                └ <module 'socket' from '/usr/local/lib/python3.11/socket.py'>

  File "/usr/local/lib/python3.11/socket.py", line 974, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               │       │           │     │     │       │     │      └ 0
               │       │           │     │     │       │     └ 0
               │       │           │     │     │       └ 0
               │       │           │     │     └ 0
               │       │           │     └ None
               │       │           └ 'zew.hr'
               │       └ <built-in function getaddrinfo>
               └ <module '_socket' from '/usr/local/lib/python3.11/lib-dynload/_socket.cpython-311-x86_64-linux-gnu.so'>

socket.gaierror: [Errno -2] Name or service not known
2025-03-26 22:24:16.443 | ERROR    | open_webui.utils.middleware:chat_web_search_handler:376 - 400: [ERROR: [Errno -2] Name or service not known] - {}
Traceback (most recent call last):

  File "/app/backend/open_webui/routers/retrieval.py", line 1441, in process_web_search
    loader = get_web_loader(
             └ <function get_web_loader at 0x7f8768533560>

  File "/app/backend/open_webui/retrieval/web/utils.py", line 511, in get_web_loader
    safe_urls = safe_validate_urls([urls] if isinstance(urls, str) else urls)
                │                   │                   │               └ ['https://openai.com/news', 'https://openai.com/newsroom', 'https://openai.com/news/product-releases', 'https://openai.com/in...
                │                   │                   └ ['https://openai.com/news', 'https://openai.com/newsroom', 'https://openai.com/news/product-releases', 'https://openai.com/in...
                │                   └ ['https://openai.com/news', 'https://openai.com/newsroom', 'https://openai.com/news/product-releases', 'https://openai.com/in...
                └ <function safe_validate_urls at 0x7f87685309a0>

  File "/app/backend/open_webui/retrieval/web/utils.py", line 69, in safe_validate_urls
    if validate_url(u):
       │            └ 'http://zew.hr/eri'
       └ <function validate_url at 0x7f8768531300>

  File "/app/backend/open_webui/retrieval/web/utils.py", line 49, in validate_url
    ipv4_addresses, ipv6_addresses = resolve_hostname(parsed_url.hostname)
                                     │                │          └ <property object at 0x7f87a293a8e0>
                                     │                └ ParseResult(scheme='http', netloc='zew.hr', path='/eri', params='', query='', fragment='')
                                     └ <function resolve_hostname at 0x7f8768531620>

  File "/app/backend/open_webui/retrieval/web/utils.py", line 78, in resolve_hostname
    addr_info = socket.getaddrinfo(hostname, None)
                │      │           └ 'zew.hr'
                │      └ <function getaddrinfo at 0x7f87a31f6340>
                └ <module 'socket' from '/usr/local/lib/python3.11/socket.py'>

  File "/usr/local/lib/python3.11/socket.py", line 974, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
               │       │           │     │     │       │     │      └ 0
               │       │           │     │     │       │     └ 0
               │       │           │     │     │       └ 0
               │       │           │     │     └ 0
               │       │           │     └ None
               │       │           └ 'zew.hr'
               │       └ <built-in function getaddrinfo>
               └ <module '_socket' from '/usr/local/lib/python3.11/lib-dynload/_socket.cpython-311-x86_64-linux-gnu.so'>

socket.gaierror: [Errno -2] Name or service not known


During handling of the above exception, another exception occurred:


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 0x7f87a2815da0>
           └ <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 0x7f87a34e0310>
         │    └ <function Command.invoke at 0x7f87a2816980>
         └ <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': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'...
           │   │      │    │           └ <click.core.Context object at 0x7f87a34e0310>
           │   │      │    └ <function main at 0x7f87a23e2f20>
           │   │      └ <Command main>
           │   └ <function Context.invoke at 0x7f87a2815300>
           └ <click.core.Context object at 0x7f87a34e0310>
  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': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'...
                       └ ()
  File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main
    run(
    └ <function run at 0x7f87a2823e20>
  File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run
    server.run()
    │      └ <function Server.run at 0x7f87a2681260>
    └ <uvicorn.server.Server object at 0x7f87a274fdd0>
  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 0x7f87a2681300>
           │       │   └ <uvicorn.server.Server object at 0x7f87a274fdd0>
           │       └ <function run at 0x7f87a2b8cb80>
           └ <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 0x7f87a25add50>
           │      └ <function Runner.run at 0x7f87a2a00720>
           └ <asyncio.runners.Runner object at 0x7f87a23eb710>
  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 0x7f87a2424380>
           │    └ <uvloop.Loop running=True closed=False debug=False>
           └ <asyncio.runners.Runner object at 0x7f87a23eb710>
  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 0x7f8712d46de0>
          │    │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │    │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          │    └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f871329e750>
          └ <open_webui.main.RedirectMiddleware object at 0x7f87201f3d10>
  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 0x7f8712d46de0>
          │                            │    │    │     │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │                            │    │    │     └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          │                            │    │    └ <starlette.requests.Request object at 0x7f8704338450>
          │                            │    └ <fastapi.routing.APIRouter object at 0x7f875fb881d0>
          │                            └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f871329e750>
          └ <function wrap_app_handling_exceptions at 0x7f879fa9ef20>
  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 0x7f8712d46b60>
          │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          └ <fastapi.routing.APIRouter object at 0x7f875fb881d0>
  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 0x7f8712d46b60>
          │    │                │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │    │                └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          │    └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x7f875fb881d0>>
          └ <fastapi.routing.APIRouter object at 0x7f875fb881d0>
  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 0x7f8712d46b60>
          │     │      │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │     │      └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          │     └ <function Route.handle at 0x7f879fb585e0>
          └ APIRoute(path='/api/chat/completions', name='chat_completion', 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 0x7f8712d46b60>
          │    │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │    │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          │    └ <function request_response.<locals>.app at 0x7f871326e5c0>
          └ APIRoute(path='/api/chat/completions', name='chat_completion', 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 0x7f8712d46b60>
          │                            │    │        │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │                            │    │        └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          │                            │    └ <starlette.requests.Request object at 0x7f8704338410>
          │                            └ <function request_response.<locals>.app.<locals>.app at 0x7f8712d44400>
          └ <function wrap_app_handling_exceptions at 0x7f879fa9ef20>
  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 0x7f8712d325c0>
          │   │      └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060>
          │   └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c...
          └ <function request_response.<locals>.app.<locals>.app at 0x7f8712d44400>
  File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app
    response = await f(request)
                     │ └ <starlette.requests.Request object at 0x7f8704338410>
                     └ <function get_request_handler.<locals>.app at 0x7f871326e480>
  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 0x7f879fb5a3e0>
  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='b996c233-c9f1-4088-b20c-ef8a28b12baf', name='EntropyYue', email='xiaopa233@qq.com', role='admin', prof...
                 │         └ <function chat_completion at 0x7f871326ca40>
                 └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant...

  File "/app/backend/open_webui/main.py", line 1043, in chat_completion
    form_data, metadata, events = await process_chat_payload(
    │          │                        └ <function process_chat_payload at 0x7f875ff90040>
    │          └ {'user_id': 'b996c233-c9f1-4088-b20c-ef8a28b12baf', 'chat_id': '80eac470-a73f-4a4e-8f52-1a672b001ce0', 'message_id': '816931c...
    └ {'stream': True, 'model': 'deepseek-r1:14b', 'messages': [{'role': 'user', 'content': '搜索openai的新 闻'}], 'metadata': {'user_id'...

  File "/app/backend/open_webui/utils/middleware.py", line 736, in process_chat_payload
    form_data = await chat_web_search_handler(
                      └ <function chat_web_search_handler at 0x7f875ff90680>

> File "/app/backend/open_webui/utils/middleware.py", line 341, in chat_web_search_handler
    results = await process_web_search(
                    └ <function process_web_search at 0x7f8763525bc0>

  File "/app/backend/open_webui/routers/retrieval.py", line 1481, in process_web_search
    raise HTTPException(
          └ <class 'fastapi.exceptions.HTTPException'>

fastapi.exceptions.HTTPException: 400: [ERROR: [Errno -2] Name or service not known]

Additional Information

No response

Originally created by @EntropyYue on GitHub (Mar 26, 2025). ### 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 0.5.20 ### Ollama Version (if applicable) _No response_ ### Operating System ubuntu 22.04 ### Browser (if applicable) _No response_ ### 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 Normal search ### Actual Behavior Error searching "xxx" ### Steps to Reproduce Using a local searxng server for web search ### Logs & Screenshots ``` 2025-03-26 22:24:16.440 | ERROR | open_webui.routers.retrieval:process_web_search:1480 - [Errno -2] Name or service not known - {} 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 0x7f87a2815da0> └ <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 0x7f87a34e0310> │ └ <function Command.invoke at 0x7f87a2816980> └ <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': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'... │ │ │ │ └ <click.core.Context object at 0x7f87a34e0310> │ │ │ └ <function main at 0x7f87a23e2f20> │ │ └ <Command main> │ └ <function Context.invoke at 0x7f87a2815300> └ <click.core.Context object at 0x7f87a34e0310> 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': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'... └ () File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main run( └ <function run at 0x7f87a2823e20> File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run server.run() │ └ <function Server.run at 0x7f87a2681260> └ <uvicorn.server.Server object at 0x7f87a274fdd0> 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 0x7f87a2681300> │ │ └ <uvicorn.server.Server object at 0x7f87a274fdd0> │ └ <function run at 0x7f87a2b8cb80> └ <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 0x7f87a25add50> │ └ <function Runner.run at 0x7f87a2a00720> └ <asyncio.runners.Runner object at 0x7f87a23eb710> 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 0x7f87a2424380> │ └ <uvloop.Loop running=True closed=False debug=False> └ <asyncio.runners.Runner object at 0x7f87a23eb710> 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 0x7f8712d46de0> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f871329e750> └ <open_webui.main.RedirectMiddleware object at 0x7f87201f3d10> 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 0x7f8712d46de0> │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... │ │ │ └ <starlette.requests.Request object at 0x7f8704338450> │ │ └ <fastapi.routing.APIRouter object at 0x7f875fb881d0> │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f871329e750> └ <function wrap_app_handling_exceptions at 0x7f879fa9ef20> 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 0x7f8712d46b60> │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... └ <fastapi.routing.APIRouter object at 0x7f875fb881d0> 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 0x7f8712d46b60> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... │ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x7f875fb881d0>> └ <fastapi.routing.APIRouter object at 0x7f875fb881d0> 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 0x7f8712d46b60> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... │ └ <function Route.handle at 0x7f879fb585e0> └ APIRoute(path='/api/chat/completions', name='chat_completion', 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 0x7f8712d46b60> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... │ └ <function request_response.<locals>.app at 0x7f871326e5c0> └ APIRoute(path='/api/chat/completions', name='chat_completion', 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 0x7f8712d46b60> │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... │ │ └ <starlette.requests.Request object at 0x7f8704338410> │ └ <function request_response.<locals>.app.<locals>.app at 0x7f8712d44400> └ <function wrap_app_handling_exceptions at 0x7f879fa9ef20> 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 0x7f8712d325c0> │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... └ <function request_response.<locals>.app.<locals>.app at 0x7f8712d44400> File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app response = await f(request) │ └ <starlette.requests.Request object at 0x7f8704338410> └ <function get_request_handler.<locals>.app at 0x7f871326e480> 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 0x7f879fb5a3e0> 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='b996c233-c9f1-4088-b20c-ef8a28b12baf', name='EntropyYue', email='xiaopa233@qq.com', role='admin', prof... │ └ <function chat_completion at 0x7f871326ca40> └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant... File "/app/backend/open_webui/main.py", line 1043, in chat_completion form_data, metadata, events = await process_chat_payload( │ │ └ <function process_chat_payload at 0x7f875ff90040> │ └ {'user_id': 'b996c233-c9f1-4088-b20c-ef8a28b12baf', 'chat_id': '80eac470-a73f-4a4e-8f52-1a672b001ce0', 'message_id': '816931c... └ {'stream': True, 'model': 'deepseek-r1:14b', 'messages': [{'role': 'user', 'content': '搜索openai的新 闻'}], 'metadata': {'user_id'... File "/app/backend/open_webui/utils/middleware.py", line 736, in process_chat_payload form_data = await chat_web_search_handler( └ <function chat_web_search_handler at 0x7f875ff90680> File "/app/backend/open_webui/utils/middleware.py", line 341, in chat_web_search_handler results = await process_web_search( └ <function process_web_search at 0x7f8763525bc0> > File "/app/backend/open_webui/routers/retrieval.py", line 1441, in process_web_search loader = get_web_loader( └ <function get_web_loader at 0x7f8768533560> File "/app/backend/open_webui/retrieval/web/utils.py", line 511, in get_web_loader safe_urls = safe_validate_urls([urls] if isinstance(urls, str) else urls) │ │ │ └ ['https://openai.com/news', 'https://openai.com/newsroom', 'https://openai.com/news/product-releases', 'https://openai.com/in... │ │ └ ['https://openai.com/news', 'https://openai.com/newsroom', 'https://openai.com/news/product-releases', 'https://openai.com/in... │ └ ['https://openai.com/news', 'https://openai.com/newsroom', 'https://openai.com/news/product-releases', 'https://openai.com/in... └ <function safe_validate_urls at 0x7f87685309a0> File "/app/backend/open_webui/retrieval/web/utils.py", line 69, in safe_validate_urls if validate_url(u): │ └ 'http://zew.hr/eri' └ <function validate_url at 0x7f8768531300> File "/app/backend/open_webui/retrieval/web/utils.py", line 49, in validate_url ipv4_addresses, ipv6_addresses = resolve_hostname(parsed_url.hostname) │ │ └ <property object at 0x7f87a293a8e0> │ └ ParseResult(scheme='http', netloc='zew.hr', path='/eri', params='', query='', fragment='') └ <function resolve_hostname at 0x7f8768531620> File "/app/backend/open_webui/retrieval/web/utils.py", line 78, in resolve_hostname addr_info = socket.getaddrinfo(hostname, None) │ │ └ 'zew.hr' │ └ <function getaddrinfo at 0x7f87a31f6340> └ <module 'socket' from '/usr/local/lib/python3.11/socket.py'> File "/usr/local/lib/python3.11/socket.py", line 974, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): │ │ │ │ │ │ │ └ 0 │ │ │ │ │ │ └ 0 │ │ │ │ │ └ 0 │ │ │ │ └ 0 │ │ │ └ None │ │ └ 'zew.hr' │ └ <built-in function getaddrinfo> └ <module '_socket' from '/usr/local/lib/python3.11/lib-dynload/_socket.cpython-311-x86_64-linux-gnu.so'> socket.gaierror: [Errno -2] Name or service not known 2025-03-26 22:24:16.443 | ERROR | open_webui.utils.middleware:chat_web_search_handler:376 - 400: [ERROR: [Errno -2] Name or service not known] - {} Traceback (most recent call last): File "/app/backend/open_webui/routers/retrieval.py", line 1441, in process_web_search loader = get_web_loader( └ <function get_web_loader at 0x7f8768533560> File "/app/backend/open_webui/retrieval/web/utils.py", line 511, in get_web_loader safe_urls = safe_validate_urls([urls] if isinstance(urls, str) else urls) │ │ │ └ ['https://openai.com/news', 'https://openai.com/newsroom', 'https://openai.com/news/product-releases', 'https://openai.com/in... │ │ └ ['https://openai.com/news', 'https://openai.com/newsroom', 'https://openai.com/news/product-releases', 'https://openai.com/in... │ └ ['https://openai.com/news', 'https://openai.com/newsroom', 'https://openai.com/news/product-releases', 'https://openai.com/in... └ <function safe_validate_urls at 0x7f87685309a0> File "/app/backend/open_webui/retrieval/web/utils.py", line 69, in safe_validate_urls if validate_url(u): │ └ 'http://zew.hr/eri' └ <function validate_url at 0x7f8768531300> File "/app/backend/open_webui/retrieval/web/utils.py", line 49, in validate_url ipv4_addresses, ipv6_addresses = resolve_hostname(parsed_url.hostname) │ │ └ <property object at 0x7f87a293a8e0> │ └ ParseResult(scheme='http', netloc='zew.hr', path='/eri', params='', query='', fragment='') └ <function resolve_hostname at 0x7f8768531620> File "/app/backend/open_webui/retrieval/web/utils.py", line 78, in resolve_hostname addr_info = socket.getaddrinfo(hostname, None) │ │ └ 'zew.hr' │ └ <function getaddrinfo at 0x7f87a31f6340> └ <module 'socket' from '/usr/local/lib/python3.11/socket.py'> File "/usr/local/lib/python3.11/socket.py", line 974, in getaddrinfo for res in _socket.getaddrinfo(host, port, family, type, proto, flags): │ │ │ │ │ │ │ └ 0 │ │ │ │ │ │ └ 0 │ │ │ │ │ └ 0 │ │ │ │ └ 0 │ │ │ └ None │ │ └ 'zew.hr' │ └ <built-in function getaddrinfo> └ <module '_socket' from '/usr/local/lib/python3.11/lib-dynload/_socket.cpython-311-x86_64-linux-gnu.so'> socket.gaierror: [Errno -2] Name or service not known During handling of the above exception, another exception occurred: 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 0x7f87a2815da0> └ <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 0x7f87a34e0310> │ └ <function Command.invoke at 0x7f87a2816980> └ <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': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'... │ │ │ │ └ <click.core.Context object at 0x7f87a34e0310> │ │ │ └ <function main at 0x7f87a23e2f20> │ │ └ <Command main> │ └ <function Context.invoke at 0x7f87a2815300> └ <click.core.Context object at 0x7f87a34e0310> 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': '*', 'app': 'open_webui.main:app', 'uds': None, 'fd': None, 'reload'... └ () File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 412, in main run( └ <function run at 0x7f87a2823e20> File "/usr/local/lib/python3.11/site-packages/uvicorn/main.py", line 579, in run server.run() │ └ <function Server.run at 0x7f87a2681260> └ <uvicorn.server.Server object at 0x7f87a274fdd0> 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 0x7f87a2681300> │ │ └ <uvicorn.server.Server object at 0x7f87a274fdd0> │ └ <function run at 0x7f87a2b8cb80> └ <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 0x7f87a25add50> │ └ <function Runner.run at 0x7f87a2a00720> └ <asyncio.runners.Runner object at 0x7f87a23eb710> 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 0x7f87a2424380> │ └ <uvloop.Loop running=True closed=False debug=False> └ <asyncio.runners.Runner object at 0x7f87a23eb710> 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 0x7f8712d46de0> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f871329e750> └ <open_webui.main.RedirectMiddleware object at 0x7f87201f3d10> 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 0x7f8712d46de0> │ │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... │ │ │ └ <starlette.requests.Request object at 0x7f8704338450> │ │ └ <fastapi.routing.APIRouter object at 0x7f875fb881d0> │ └ <starlette.middleware.exceptions.ExceptionMiddleware object at 0x7f871329e750> └ <function wrap_app_handling_exceptions at 0x7f879fa9ef20> 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 0x7f8712d46b60> │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... └ <fastapi.routing.APIRouter object at 0x7f875fb881d0> 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 0x7f8712d46b60> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... │ └ <bound method Router.app of <fastapi.routing.APIRouter object at 0x7f875fb881d0>> └ <fastapi.routing.APIRouter object at 0x7f875fb881d0> 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 0x7f8712d46b60> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... │ └ <function Route.handle at 0x7f879fb585e0> └ APIRoute(path='/api/chat/completions', name='chat_completion', 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 0x7f8712d46b60> │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... │ └ <function request_response.<locals>.app at 0x7f871326e5c0> └ APIRoute(path='/api/chat/completions', name='chat_completion', 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 0x7f8712d46b60> │ │ │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ │ │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... │ │ └ <starlette.requests.Request object at 0x7f8704338410> │ └ <function request_response.<locals>.app.<locals>.app at 0x7f8712d44400> └ <function wrap_app_handling_exceptions at 0x7f879fa9ef20> 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 0x7f8712d325c0> │ │ └ <function BaseHTTPMiddleware.__call__.<locals>.call_next.<locals>.receive_or_disconnect at 0x7f8712d47060> │ └ {'type': 'http', 'asgi': {'version': '3.0', 'spec_version': '2.3'}, 'http_version': '1.1', 'server': ('172.18.0.6', 8080), 'c... └ <function request_response.<locals>.app.<locals>.app at 0x7f8712d44400> File "/usr/local/lib/python3.11/site-packages/starlette/routing.py", line 73, in app response = await f(request) │ └ <starlette.requests.Request object at 0x7f8704338410> └ <function get_request_handler.<locals>.app at 0x7f871326e480> 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 0x7f879fb5a3e0> 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='b996c233-c9f1-4088-b20c-ef8a28b12baf', name='EntropyYue', email='xiaopa233@qq.com', role='admin', prof... │ └ <function chat_completion at 0x7f871326ca40> └ Dependant(path_params=[], query_params=[], header_params=[], cookie_params=[], body_params=[ModelField(field_info=Body(Pydant... File "/app/backend/open_webui/main.py", line 1043, in chat_completion form_data, metadata, events = await process_chat_payload( │ │ └ <function process_chat_payload at 0x7f875ff90040> │ └ {'user_id': 'b996c233-c9f1-4088-b20c-ef8a28b12baf', 'chat_id': '80eac470-a73f-4a4e-8f52-1a672b001ce0', 'message_id': '816931c... └ {'stream': True, 'model': 'deepseek-r1:14b', 'messages': [{'role': 'user', 'content': '搜索openai的新 闻'}], 'metadata': {'user_id'... File "/app/backend/open_webui/utils/middleware.py", line 736, in process_chat_payload form_data = await chat_web_search_handler( └ <function chat_web_search_handler at 0x7f875ff90680> > File "/app/backend/open_webui/utils/middleware.py", line 341, in chat_web_search_handler results = await process_web_search( └ <function process_web_search at 0x7f8763525bc0> File "/app/backend/open_webui/routers/retrieval.py", line 1481, in process_web_search raise HTTPException( └ <class 'fastapi.exceptions.HTTPException'> fastapi.exceptions.HTTPException: 400: [ERROR: [Errno -2] Name or service not known] ``` ### Additional Information _No response_
GiteaMirror added the bug label 2025-11-11 15:57:21 -06:00
Author
Owner

@EntropyYue commented on GitHub (Mar 26, 2025):

When using the web search tool, the search can be performed normally, but it will fail when using the built-in web search

@EntropyYue commented on GitHub (Mar 26, 2025): When using the web search tool, the search can be performed normally, but it will fail when using the built-in web search
Author
Owner

@EntropyYue commented on GitHub (Mar 26, 2025):

Closed, as the problem mysteriously disappeared

@EntropyYue commented on GitHub (Mar 26, 2025): Closed, as the problem mysteriously disappeared
Author
Owner

@piwawa commented on GitHub (Apr 1, 2025):

Closed, as the problem mysteriously disappeared

怎么解决的?我配置了代理整半天也不行,是不是网络问题啊??

@piwawa commented on GitHub (Apr 1, 2025): > Closed, as the problem mysteriously disappeared 怎么解决的?我配置了代理整半天也不行,是不是网络问题啊??
Author
Owner

@EntropyYue commented on GitHub (Apr 1, 2025):

If you need help, please provide your backend console log, and this is an English community, please Try to use English to request help as much as possible

@EntropyYue commented on GitHub (Apr 1, 2025): If you need help, please provide your backend console log, and this is an English community, please Try to use English to request help as much as possible
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#4580