mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-07 11:28:35 -05:00
[GH-ISSUE #5339] Searxng web-search error in Kubernetes #29475
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @alesha-pro on GitHub (Sep 11, 2024).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/5339
Bug Report
Installation Method
I installed openwebui with helm chart - https://github.com/open-webui/helm-charts
Environment
Open WebUI Version:
v0.3.21
Operating System:
Ubuntu 20.04
Confirmation:
Expected Behavior:
Searching with searxng has been successful
Actual Behavior:
I got error
Something went wrong :/ [Errno -2] Name or service not known
Description
Bug Summary:
ERROR [open_webui.apps.rag.main] [Errno -2] Name or service not known
Traceback (most recent call last):
File "/app/backend/open_webui/apps/rag/main.py", line 933, in store_web_search
loader = get_web_loader(urls)
^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/apps/rag/main.py", line 753, in get_web_loader
if not validate_url(url):
^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/apps/rag/main.py", line 782, in validate_url
return all(validate_url(u) for u in url)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/apps/rag/main.py", line 782, in
return all(validate_url(u) for u in url)
^^^^^^^^^^^^^^^
File "/app/backend/open_webui/apps/rag/main.py", line 771, in validate_url
ipv4_addresses, ipv6_addresses = resolve_hostname(parsed_url.hostname)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/apps/rag/main.py", line 789, 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
Reproduction Details
Steps to Reproduce:
I deployed my searxng service in k8s and it is successfully accessible via https.
Add
https://search.domain.pro/search?q=<query>I activated web search and when I try to search I get this error.
I tried specifying both the domain name of the k8s service and an external domain via https. It's the same everywhere.
UPD I have deployed openwebui locally, with env environment and python. In which case there is no error. What could this be related to? Why in pod k8s can't resolve the search domain?
@alesha-pro commented on GitHub (Sep 11, 2024):
This error occurs when a function string contains an address with http or https.
If you do not specify https in the web-ui itself, you will get another error - lack of scheme
Invalid URL 'search.domain.pro/search': No scheme supplied. Perhaps you meant https://search.domain.pro/search?
@alesha-pro commented on GitHub (Sep 11, 2024):
Does this method validate_url check the urls of those sites that are returned as a response?
I don't understand what can be done here.