/app/backend/open_webui/retrieval/web/duckduckgo.py:27: UserWarning: backend='api' is deprecated, using backend='auto'
ddgs_gen = ddgs.text(
ERROR [open_webui.routers.retrieval] 'SearchResult' object has no attribute 'get'
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 1318, in process_web_search
web_results = search_web(
^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1248, in search_web
return search_duckduckgo(
^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/duckduckgo.py", line 48, in search_duckduckgo
results = get_filtered_results(results, filter_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/main.py", line 14, in get_filtered_results
url = result.get("url") or result.get("link", "")
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 856, in __getattr__
raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}')
AttributeError: 'SearchResult' object has no attribute 'get'
ERROR [open_webui.utils.middleware] 400: 'SearchResult' object has no attribute 'get'
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 1318, in process_web_search
web_results = search_web(
^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1248, in search_web
return search_duckduckgo(
^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/duckduckgo.py", line 48, in search_duckduckgo
results = get_filtered_results(results, filter_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/main.py", line 14, in get_filtered_results
url = result.get("url") or result.get("link", "")
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 856, in __getattr__
raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}')
AttributeError: 'SearchResult' object has no attribute 'get'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/backend/open_webui/utils/middleware.py", line 340, 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 342, in <lambda>
lambda: process_web_search(
^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1324, in process_web_search
raise HTTPException(
fastapi.exceptions.HTTPException: 400: 'SearchResult' object has no attribute 'get'
Screenshots/Screen Recordings (if applicable):
[Attach any relevant screenshots to help illustrate the issue]
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!
Originally created by @EntropyYue on GitHub (Feb 15, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/10062
# Bug Report
## Installation Method
docker
## Environment
- **Open WebUI Version:** 0.5.12
- **Ollama (if applicable):** [e.g., v0.2.0, v0.1.32-rc1]
- **Operating System:** [e.g., Windows 10, macOS Big Sur, Ubuntu 20.04]
- **Browser (if applicable):** [e.g., Chrome 100.0, Firefox 98.0]
**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:
Normal search
## Actual Behavior:
Return Error searching 'xxx'
## Description
**Bug Summary:**
An error was returned while using Searxing and dockduck for web search
## Reproduction Details
**Steps to Reproduce:**
Use duck duck go or Searxing for web search
## Logs and Screenshots
**Browser Console Logs:**
[Include relevant browser console logs, if applicable]
**Docker Container Logs:**
```
/app/backend/open_webui/retrieval/web/duckduckgo.py:27: UserWarning: backend='api' is deprecated, using backend='auto'
ddgs_gen = ddgs.text(
ERROR [open_webui.routers.retrieval] 'SearchResult' object has no attribute 'get'
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 1318, in process_web_search
web_results = search_web(
^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1248, in search_web
return search_duckduckgo(
^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/duckduckgo.py", line 48, in search_duckduckgo
results = get_filtered_results(results, filter_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/main.py", line 14, in get_filtered_results
url = result.get("url") or result.get("link", "")
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 856, in __getattr__
raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}')
AttributeError: 'SearchResult' object has no attribute 'get'
ERROR [open_webui.utils.middleware] 400: 'SearchResult' object has no attribute 'get'
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 1318, in process_web_search
web_results = search_web(
^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1248, in search_web
return search_duckduckgo(
^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/duckduckgo.py", line 48, in search_duckduckgo
results = get_filtered_results(results, filter_list)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/main.py", line 14, in get_filtered_results
url = result.get("url") or result.get("link", "")
^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/pydantic/main.py", line 856, in __getattr__
raise AttributeError(f'{type(self).__name__!r} object has no attribute {item!r}')
AttributeError: 'SearchResult' object has no attribute 'get'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/backend/open_webui/utils/middleware.py", line 340, 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 342, in <lambda>
lambda: process_web_search(
^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1324, in process_web_search
raise HTTPException(
fastapi.exceptions.HTTPException: 400: 'SearchResult' object has no attribute 'get'
```
**Screenshots/Screen Recordings (if applicable):**
[Attach any relevant screenshots to help illustrate the issue]
## 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!
@jerell2isekai commented on GitHub (Feb 15, 2025):
same here.
I can confirm that SearXNG is up and running in another container, exposing a port on the host machine.
and I can access the SearXNG website and search functionality via http://localhost:4000.
However, when accessing through the open webui (running within a Docker container) with the web searching set to http://host.docker.internal:4000/search?q=<query>, I still encounter an 'error searching...' issue message.
INFO: 192.168.215.1:38836 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO [open_webui.routers.openai] get_all_models()
INFO [open_webui.routers.ollama] get_all_models()
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 1339, in process_web_search
loader = get_web_loader(
^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 101, in get_web_loader
safe_urls = safe_validate_urls([urls] if isinstance(urls, str) else urls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 50, in safe_validate_urls
if validate_url(u):
^^^^^^^^^^^^^^^
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 59, 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 1339, in process_web_search
loader = get_web_loader(
^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 101, in get_web_loader
safe_urls = safe_validate_urls([urls] if isinstance(urls, str) else urls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 50, in safe_validate_urls
if validate_url(u):
^^^^^^^^^^^^^^^
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 59, 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 340, 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 342, in
lambda: process_web_search(
^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1356, in process_web_search
raise HTTPException(
fastapi.exceptions.HTTPException: 400: [ERROR: [Errno -2] Name or service not known]
<!-- gh-comment-id:2660944244 -->
@jerell2isekai commented on GitHub (Feb 15, 2025):
same here.
I can confirm that SearXNG is up and running in another container, exposing a port on the host machine.
and I can access the SearXNG website and search functionality via `http://localhost:4000`.
However, when accessing through the open webui (running within a Docker container) with the web searching set to `http://host.docker.internal:4000/search?q=<query>`, I still encounter an 'error searching...' issue message.
> INFO: 192.168.215.1:38836 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO [open_webui.routers.openai] get_all_models()
INFO [open_webui.routers.ollama] get_all_models()
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 1339, in process_web_search
loader = get_web_loader(
^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 101, in get_web_loader
safe_urls = safe_validate_urls([urls] if isinstance(urls, str) else urls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 50, in safe_validate_urls
if validate_url(u):
^^^^^^^^^^^^^^^
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 59, 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 1339, in process_web_search
loader = get_web_loader(
^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 101, in get_web_loader
safe_urls = safe_validate_urls([urls] if isinstance(urls, str) else urls)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/utils.py", line 50, in safe_validate_urls
if validate_url(u):
^^^^^^^^^^^^^^^
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 59, 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 340, 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 342, in <lambda>
lambda: process_web_search(
^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1356, in process_web_search
raise HTTPException(
fastapi.exceptions.HTTPException: 400: [ERROR: [Errno -2] Name or service not known]
@jerell2isekai Have you enabled json as a format in your Searxng config. Its set in the settings.yml file in your searxng installation ?
<!-- gh-comment-id:2660976746 -->
@sumanth1989 commented on GitHub (Feb 15, 2025):
@jerell2isekai Have you enabled json as a format in your Searxng config. Its set in the settings.yml file in your searxng installation ?
ERROR [open_webui.routers.retrieval] The content provided is empty. Please ensure that there is text or data present before proceeding.
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 1345, in process_web_search
save_docs_to_vector_db(
File "/app/backend/open_webui/routers/retrieval.py", line 752, in save_docs_to_vector_db
raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT)
ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding.
ERROR [open_webui.utils.middleware] 400: [ERROR: The content provided is empty. Please ensure that there is text or data present before proceeding.]
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 1345, in process_web_search
save_docs_to_vector_db(
File "/app/backend/open_webui/routers/retrieval.py", line 752, in save_docs_to_vector_db
raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT)
ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/backend/open_webui/utils/middleware.py", line 340, 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 342, in <lambda>
lambda: process_web_search(
^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1356, in process_web_search
raise HTTPException(
fastapi.exceptions.HTTPException: 400: [ERROR: The content provided is empty. Please ensure that there is text or data present before proceeding.]
<!-- gh-comment-id:2660978686 -->
@EntropyYue commented on GitHub (Feb 15, 2025):
Below is the error message from Searxing
```
ERROR [open_webui.routers.retrieval] The content provided is empty. Please ensure that there is text or data present before proceeding.
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 1345, in process_web_search
save_docs_to_vector_db(
File "/app/backend/open_webui/routers/retrieval.py", line 752, in save_docs_to_vector_db
raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT)
ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding.
ERROR [open_webui.utils.middleware] 400: [ERROR: The content provided is empty. Please ensure that there is text or data present before proceeding.]
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 1345, in process_web_search
save_docs_to_vector_db(
File "/app/backend/open_webui/routers/retrieval.py", line 752, in save_docs_to_vector_db
raise ValueError(ERROR_MESSAGES.EMPTY_CONTENT)
ValueError: The content provided is empty. Please ensure that there is text or data present before proceeding.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/backend/open_webui/utils/middleware.py", line 340, 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 342, in <lambda>
lambda: process_web_search(
^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1356, in process_web_search
raise HTTPException(
fastapi.exceptions.HTTPException: 400: [ERROR: The content provided is empty. Please ensure that there is text or data present before proceeding.]
```
@jerell2isekai commented on GitHub (Feb 15, 2025):
@jerell2isekai Have you enabled json as a format in your Searxng config. Its set in the settings.yml file in your searxng installation ?
Yes.
<!-- gh-comment-id:2660991019 -->
@jerell2isekai commented on GitHub (Feb 15, 2025):
> @jerell2isekai Have you enabled json as a format in your Searxng config. Its set in the settings.yml file in your searxng installation ?
Yes.
curl "https://search.nube-gran.de/search?q=test&format=json" on the same server gives: {"query": "test", "number_of_results": 0, "results": [{"url": "https://www.speedtest.net/", "title": "Speedtest by Ookla - The Global Broadband Speed Test", "content": "Back to test results. Remove ads on Speedtest.net for life. $5.00 for ad-free internet testing. Remove Ads Back to test results Remove Speedtest.net Ads. Create an Account Results History Desktop Apps. Troubleshoot Your Wifi. Check for Outages. Prepare to Talk to Your ISP. How Much Speed Do You Need?", "publishedDate": null, "thumbnail": "", "engine": "brave", "template": "default.html", "parsed_url": ["https", "www.speedtest.net", "/", "", "", ""], "engines": ["duckduckgo", "brave"], "positions": [1, 1], "score": 4.0, "category": "general"}, {"url": "https://en.wikipedia.org/wiki/Test", "title": "Test - Wikipedia", "content": "Look up test, testing, Test, or TEST in Wiktionary, the free dictionary. ... Test (assessment), an educational assessment intended to measure the respondents' knowledge or other abilities ... Search for \"Test\" on Wikipedia. Tester (disambiguation...
The WebUI works fine with different models. Documents Embedding models is set to paraphrase-multilingual:latest.
Searches seem to start, but if I start chatting: How many world cups has Germany won?
profile
llama3.2:3b
Searching "Germany World Cup wins" Error searching "Germany World Cup wins"
Germany has won the FIFA World Cup four times:
1954 FIFA World Cup
1974 FIFA World Cup
1990 FIFA World Cup
2014 FIFA World Cup
Open WebUI Version
v0.5.12 (latest)
Ollama Version 0.5.7
I think the results have not been handled correctly since the search string was created. Would it be possible to make the process more verbose? However, I have no experience with RAG workflows, etc.
¿Any idea how we can track down and solve the issue?
<!-- gh-comment-id:2661135799 -->
@robert-winkler commented on GitHub (Feb 15, 2025):
Hi, I've also been trying to get the web search working for several days. Up now, I tried:
- Google PSE
- Brave API
- DuckDuckGo
I also tested searXNG, running in the same server and started by:
~~~
docker run --rm -d -p 8888:8080 \
-v "/usr/local/searxng-config:/etc/searxng" \
-e "BASE_URL=http://localhost:8888/" \
-e "INSTANCE_NAME=searxng" \
searxng/searxng
~~~
` curl "https://search.nube-gran.de/search?q=test&format=json"` on the same server gives:
`{"query": "test", "number_of_results": 0, "results": [{"url": "https://www.speedtest.net/", "title": "Speedtest by Ookla - The Global Broadband Speed Test", "content": "Back to test results. Remove ads on Speedtest.net for life. $5.00 for ad-free internet testing. Remove Ads Back to test results Remove Speedtest.net Ads. Create an Account Results History Desktop Apps. Troubleshoot Your Wifi. Check for Outages. Prepare to Talk to Your ISP. How Much Speed Do You Need?", "publishedDate": null, "thumbnail": "", "engine": "brave", "template": "default.html", "parsed_url": ["https", "www.speedtest.net", "/", "", "", ""], "engines": ["duckduckgo", "brave"], "positions": [1, 1], "score": 4.0, "category": "general"}, {"url": "https://en.wikipedia.org/wiki/Test", "title": "Test - Wikipedia", "content": "Look up test, testing, Test, or TEST in Wiktionary, the free dictionary. ... Test (assessment), an educational assessment intended to measure the respondents' knowledge or other abilities ... Search for \"Test\" on Wikipedia. Tester (disambiguation...`
I.e., JSON results do work.
my docker command for starting the WebUI is:
~~~
docker run -d \
-p 3000:8080 \
-v ollama:/root/.ollama \
-e ENABLE_RAG_WEB_SEARCH=True \
-e RAG_WEB_SEARCH_ENGINE="searxng" \
-e SEARXNG_BASE_URL=https://search.nube-gran.de \
--add-host=search.nube-gran.de:host-gateway \
-v open-webui:/app/backend/data \
--name open-webui \
--restart always \
ghcr.io/open-webui/open-webui:ollama`
~~~
The WebUI works fine with different models. Documents Embedding models is set to `paraphrase-multilingual:latest`.
Searches seem to start, but if I start chatting:
`How many world cups has Germany won?`
profile
llama3.2:3b
Searching "Germany World Cup wins"
**Error searching** "Germany World Cup wins"
Germany has won the FIFA World Cup four times:
1954 FIFA World Cup
1974 FIFA World Cup
1990 FIFA World Cup
2014 FIFA World Cup
Open WebUI Version
v0.5.12 [(latest)](https://github.com/open-webui/open-webui/releases/tag/v0.5.12)
Ollama Version 0.5.7
I think the results have not been handled correctly since the search string was created. Would it be possible to make the process more verbose? However, I have no experience with RAG workflows, etc.
¿Any idea how we can track down and solve the issue?
@s-konnex-engine commented on GitHub (Feb 16, 2025):
I hope this can be helpful to some. I was having this same issue when i first tried on 0.5.10.
I hadn't configured for json and after configuring for json i was still having the issue. also i hadn't set host to host.docker.internal either. but even after this i was still having the issue.
I may have restarted a couple of times or maybe only once afrter having configuration correct. However i can confirm that after getting configuration correct and restarting ALL containers (open-webui, ollama and searxng and all it's containers. my ollama is in separate container) and clearing browser cache, this problem that plagued me for hours was now gone.
There are many moving parts here and i don't know exactly what ws causing the issue once i had configured correctly but the issue persisted and this is how i ended up resolving it.
I'm about to update to .12 now. if anything changes i'll update here. I'm confident it'll be fine tho.
<!-- gh-comment-id:2661166510 -->
@s-konnex-engine commented on GitHub (Feb 16, 2025):
I hope this can be helpful to some. I was having this same issue when i first tried on 0.5.10.
I hadn't configured for json and after configuring for json i was still having the issue. also i hadn't set host to host.docker.internal either. but even after this i was still having the issue.
I may have restarted a couple of times or maybe only once afrter having configuration correct. However i can confirm that after getting configuration correct and restarting ALL containers (open-webui, ollama and searxng and all it's containers. my ollama is in separate container) and clearing browser cache, this problem that plagued me for hours was now gone.
There are many moving parts here and i don't know exactly what ws causing the issue once i had configured correctly but the issue persisted and this is how i ended up resolving it.
I'm about to update to .12 now. if anything changes i'll update here. I'm confident it'll be fine tho.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @EntropyYue on GitHub (Feb 15, 2025).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/10062
Bug Report
Installation Method
docker
Environment
Confirmation:
Expected Behavior:
Normal search
Actual Behavior:
Return Error searching 'xxx'
Description
Bug Summary:
An error was returned while using Searxing and dockduck for web search
Reproduction Details
Steps to Reproduce:
Use duck duck go or Searxing for web search
Logs and Screenshots
Browser Console Logs:
[Include relevant browser console logs, if applicable]
Docker Container Logs:
Screenshots/Screen Recordings (if applicable):
[Attach any relevant screenshots to help illustrate the issue]
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!
@jerell2isekai commented on GitHub (Feb 15, 2025):
same here.
I can confirm that SearXNG is up and running in another container, exposing a port on the host machine.
and I can access the SearXNG website and search functionality via
http://localhost:4000.However, when accessing through the open webui (running within a Docker container) with the web searching set to
http://host.docker.internal:4000/search?q=<query>, I still encounter an 'error searching...' issue message.@sumanth1989 commented on GitHub (Feb 15, 2025):
@jerell2isekai Have you enabled json as a format in your Searxng config. Its set in the settings.yml file in your searxng installation ?
@EntropyYue commented on GitHub (Feb 15, 2025):
Below is the error message from Searxing
@jerell2isekai commented on GitHub (Feb 15, 2025):
Yes.
@scenolor commented on GitHub (Feb 15, 2025):
[v0.5.12]
help!Thank u
windows 11
cpu: e5 2680
gpu:gtx1080
rvm:32g
---docker-compose.yml----
version: '3.8'
services:
ollama:
image: ollama/ollama
container_name: ollama
runtime: nvidia # 如果使用 GPU
environment:
- NVIDIA_VISIBLE_DEVICES=0
- NVIDIA_DRIVER_CAPABILITIES=compute,utility
openwebui:
image: ghcr.io/open-webui/open-webui:main
container_name: open-webui
depends_on:
- ollama
ports:
- "8080:8080"
---error log---
C:\Users\Administrator\chatbot> docker logs open-webui --tail 50
File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://google.serper.dev/search
ERROR [open_webui.utils.middleware] 400: 403 Client Error: Forbidden for url: https://google.serper.dev/search
Traceback (most recent call last):
File "/app/backend/open_webui/routers/retrieval.py", line 1318, in process_web_search
web_results = search_web(
^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1229, in search_web
return search_serper(
^^^^^^^^^^^^^^
File "/app/backend/open_webui/retrieval/web/serper.py", line 28, in search_serper
response.raise_for_status()
File "/usr/local/lib/python3.11/site-packages/requests/models.py", line 1024, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 403 Client Error: Forbidden for url: https://google.serper.dev/search
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/app/backend/open_webui/utils/middleware.py", line 340, 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 342, in
lambda: process_web_search(
^^^^^^^^^^^^^^^^^^^
File "/app/backend/open_webui/routers/retrieval.py", line 1324, in process_web_search
raise HTTPException(
fastapi.exceptions.HTTPException: 400: 403 Client Error: Forbidden for url: https://google.serper.dev/search
INFO: 172.18.0.1:53262 - "POST /api/chat/completions HTTP/1.1" 200 OK
INFO: 172.18.0.1:53262 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO: 172.18.0.1:43350 - "GET /static/favicon.png HTTP/1.1" 200 OK
INFO: 172.18.0.1:48222 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO: 172.18.0.1:36532 - "POST /api/chat/completed HTTP/1.1" 200 OK
INFO: 172.18.0.1:36532 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO: 172.18.0.1:36546 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
INFO: 172.18.0.1:36532 - "GET /audio/notification.mp3 HTTP/1.1" 206 Partial Content
INFO: 172.18.0.1:36532 - "GET /audio/notification.mp3 HTTP/1.1" 206 Partial Content
INFO: 172.18.0.1:36546 - "POST /api/v1/chats/55f22114-0544-4c68-92fa-33c9be290867 HTTP/1.1" 200 OK
INFO: 172.18.0.1:36532 - "GET /api/v1/chats/?page=1 HTTP/1.1" 200 OK
Count of chats for tag 'product_listing_platforms': 0
Count of chats for tag 'internet': 0
Count of chats for tag 'social_media_marketing': 1
INFO: 172.18.0.1:36532 - "GET /api/v1/chats/all/tags HTTP/1.1" 200 OK
INFO: 172.18.0.1:36546 - "GET /api/v1/chats/all/tags HTTP/1.1" 200 OK
INFO: 172.18.0.1:60440 - "GET /api/v1/chats/55f22114-0544-4c68-92fa-33c9be290867 HTTP/1.1" 200 OK
INFO: 172.18.0.1:36532 - "GET /api/v1/chats/all/tags HTTP/1.1" 200 OK
@robert-winkler commented on GitHub (Feb 15, 2025):
Hi, I've also been trying to get the web search working for several days. Up now, I tried:
I also tested searXNG, running in the same server and started by:
curl "https://search.nube-gran.de/search?q=test&format=json"on the same server gives:{"query": "test", "number_of_results": 0, "results": [{"url": "https://www.speedtest.net/", "title": "Speedtest by Ookla - The Global Broadband Speed Test", "content": "Back to test results. Remove ads on Speedtest.net for life. $5.00 for ad-free internet testing. Remove Ads Back to test results Remove Speedtest.net Ads. Create an Account Results History Desktop Apps. Troubleshoot Your Wifi. Check for Outages. Prepare to Talk to Your ISP. How Much Speed Do You Need?", "publishedDate": null, "thumbnail": "", "engine": "brave", "template": "default.html", "parsed_url": ["https", "www.speedtest.net", "/", "", "", ""], "engines": ["duckduckgo", "brave"], "positions": [1, 1], "score": 4.0, "category": "general"}, {"url": "https://en.wikipedia.org/wiki/Test", "title": "Test - Wikipedia", "content": "Look up test, testing, Test, or TEST in Wiktionary, the free dictionary. ... Test (assessment), an educational assessment intended to measure the respondents' knowledge or other abilities ... Search for \"Test\" on Wikipedia. Tester (disambiguation...I.e., JSON results do work.
my docker command for starting the WebUI is:
The WebUI works fine with different models. Documents Embedding models is set to
paraphrase-multilingual:latest.Searches seem to start, but if I start chatting:
How many world cups has Germany won?profile
llama3.2:3b
Searching "Germany World Cup wins"
Error searching "Germany World Cup wins"
Germany has won the FIFA World Cup four times:
1954 FIFA World Cup
1974 FIFA World Cup
1990 FIFA World Cup
2014 FIFA World Cup
Open WebUI Version
v0.5.12 (latest)
Ollama Version 0.5.7
I think the results have not been handled correctly since the search string was created. Would it be possible to make the process more verbose? However, I have no experience with RAG workflows, etc.
¿Any idea how we can track down and solve the issue?
@s-konnex-engine commented on GitHub (Feb 16, 2025):
I hope this can be helpful to some. I was having this same issue when i first tried on 0.5.10.
I hadn't configured for json and after configuring for json i was still having the issue. also i hadn't set host to host.docker.internal either. but even after this i was still having the issue.
I may have restarted a couple of times or maybe only once afrter having configuration correct. However i can confirm that after getting configuration correct and restarting ALL containers (open-webui, ollama and searxng and all it's containers. my ollama is in separate container) and clearing browser cache, this problem that plagued me for hours was now gone.
There are many moving parts here and i don't know exactly what ws causing the issue once i had configured correctly but the issue persisted and this is how i ended up resolving it.
I'm about to update to .12 now. if anything changes i'll update here. I'm confident it'll be fine tho.