mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-27 17:04:57 -05:00
[GH-ISSUE #8618] SearXNG search results result in error "Name or service not known" #118509
Reference in New Issue
Block a user
Originally created by @MikeNatC on GitHub (Jan 16, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/8618
Bug Report
Installation Method
Installed Openweb UI on Unraid via docker. SearXNG was installed separately as a stack with Perplexica but I tested and it works as a search engine and is able to output json results.
Environment
Open WebUI Version:v0.5.4
Ollama (if applicable):N.A.
**Running OpenAI and Anthrophic API keys"
Operating System: Unraid
Browser (if applicable):Chrome Version 131.0.6778.265 (Official Build) (64-bit)
Confirmation:
Expected Behavior:
A search should be performed a chat completion based on the results of the websearch using searXNG. Web searches with Google PSE works fine.
Actual Behavior:
[Describe what actually happened.]
Description
Bug Summary:
[Provide a brief but clear summary of the bug]
When I toggle a websearch using SearXNG, A search appears to be performed but after a while I get an error message that there was no search results.
Reproduction Details
Steps to Reproduce:
[Outline the steps to reproduce the bug. Be as detailed as possible.]
Logs and Screenshots
Browser Console Logs:
[Include relevant browser console logs, if applicable]
Docker Container Logs:
[Include relevant Docker container logs, if applicable]
<ERROR [open_webui.routers.retrieval] [Errno -2] Name or service not known
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 1269, in process_web_search
loader = get_web_loader(
^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 90, in get_web_loader
if not validate_url(urls):
^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 41, in validate_url
return all(validate_url(u) for u in url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 41, in
return all(validate_url(u) for u in url)
^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 30, in validate_url
ipv4_addresses, ipv6_addresses = resolve_hostname(parsed_url.hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 48, in resolve_hostname
addr_info = socket.getaddrinfo(hostname, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/socket.py", line 974, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -2] Name or service not known
ERROR [open_webui.utils.middleware] 400: [ERROR: [Errno -2] Name or service not known]
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 1269, in process_web_search
loader = get_web_loader(
^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 90, in get_web_loader
if not validate_url(urls):
^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 41, in validate_url
return all(validate_url(u) for u in url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 41, in
return all(validate_url(u) for u in url)
^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 30, in validate_url
ipv4_addresses, ipv6_addresses = resolve_hostname(parsed_url.hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 48, in resolve_hostname
addr_info = socket.getaddrinfo(hostname, None)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/socket.py", line 974, in getaddrinfo
for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/backend/open_webui/utils/middleware.py", line 421, in chat_web_search_handler
results = await loop.run_in_executor(
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
result = self.fn(*self.args, **self.kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/utils/middleware.py", line 423, in
lambda: process_web_search(
^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1284, in process_web_search
raise HTTPException(
fastapi.exceptions.HTTPException: 400: [ERROR: [Errno -2] Name or service not known]>
Screenshots/Screen Recordings (if applicable):
[Attach any relevant screenshots to help illustrate the issue]
See above.
Additional Information
[Include any additional details that may help in understanding and reproducing the issue. This could include specific configurations, error messages, or anything else relevant to the bug.]
Note
If the bug report is incomplete or does not follow the provided instructions, it may not be addressed. Please ensure that you have followed the steps outlined in the README.md and troubleshooting.md documents, and provide all necessary information for us to reproduce and address the issue. Thank you!