[GH-ISSUE #5339] Searxng web-search error in Kubernetes #29475

Closed
opened 2026-04-25 03:52:44 -05:00 by GiteaMirror · 2 comments
Owner

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:

  • I have read and followed all the instructions provided in the README.md.
  • I am on 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 provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below.

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?

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:** - [x] I have read and followed all the instructions provided in the README.md. - [x] I am on 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 provided the exact steps to reproduce the bug in the "Steps to Reproduce" section below. ## 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 <genexpr> 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?**
Author
Owner

@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?

resolve_hostname("search.domain.pro")
(['ip, 'ip', 'ip], [])

resolve_hostname("https://search.domain.pro")
Traceback (most recent call last):
File "", line 1, in
File "", line 2, in resolve_hostname
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

<!-- gh-comment-id:2343329448 --> @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? >>> resolve_hostname("search.domain.pro") (['ip, 'ip', 'ip], []) >>> resolve_hostname("https://search.domain.pro") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 2, in resolve_hostname 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
Author
Owner

@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.

<!-- gh-comment-id:2343708497 --> @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.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#29475