LLocalSearch icon indicating copy to clipboard operation
LLocalSearch copied to clipboard

searxng.engines.wikidata: Fail to initialize

Open t-dsai opened this issue 1 year ago • 6 comments

Hi,

Thank you for sharing your work.

On a Debian 12 machine, with docker running, I already have Ollama, with all-minilm, nomic-embed-text, and spooknik/hermes-2-pro-mistral-7b models available. In my .env file, I've only one line OLLAMA_HOST=http://localhost:11434.

I can see from docker ps -a that following containers are present (in the exited state after ctrl+c)

0e363e666648 nilsherzig/llocalsearch-frontend:latest 2d415fe8d659 chromadb/chroma 40dfd8260b28 searxng/searxng:latest a49ae53eaf6f redis:alpine 7bb5fd2c08d1 nilsherzig/llocalsearch-backend:latest

I cloned the LLocalSearch repo. When I run docker compose up, I get the following errors (and many more similar ones after these). Can anyone help in successfully running LLocalSearch?

Please note that my system does not have anyio, httpcore, and httpx in the directory /usr/lib/python3.11. I do have a few Python environments, where these packages are installed.

If these packages are necessary to run LLocalSearch, can LLocalSearch use a custom Python environment to search these packages?

Thanks in advance.

2024-04-29 13:35:07,694 ERROR:searx.engines.wikidata: Fail to initialize
searxng-1   | Traceback (most recent call last):
searxng-1   |   File "/usr/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 192, in connect_tcp
searxng-1   |     addr_obj = ip_address(remote_host)
searxng-1   |                ^^^^^^^^^^^^^^^^^^^^^^^
searxng-1   |   File "/usr/lib/python3.11/ipaddress.py", line 54, in ip_address
searxng-1   |     raise ValueError(f'{address!r} does not appear to be an IPv4 or IPv6 address')
searxng-1   | ValueError: 'query.wikidata.org' does not appear to be an IPv4 or IPv6 address
searxng-1   | 
searxng-1   | During handling of the above exception, another exception occurred:
searxng-1   | 
searxng-1   | Traceback (most recent call last):
searxng-1   |   File "/usr/lib/python3.11/site-packages/anyio/_core/_tasks.py", line 115, in fail_after
searxng-1   |     yield cancel_scope
searxng-1   |   File "/usr/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 114, in connect_tcp
searxng-1   |     stream: anyio.abc.ByteStream = await anyio.connect_tcp(
searxng-1   |                                    ^^^^^^^^^^^^^^^^^^^^^^^^
searxng-1   |   File "/usr/lib/python3.11/site-packages/anyio/_core/_sockets.py", line 195, in connect_tcp
searxng-1   |     gai_res = await getaddrinfo(
searxng-1   |               ^^^^^^^^^^^^^^^^^^
searxng-1   | asyncio.exceptions.CancelledError: Cancelled by cancel scope 77c7427b4b10
searxng-1   | 
searxng-1   | During handling of the above exception, another exception occurred:
searxng-1   | 
searxng-1   | Traceback (most recent call last):
searxng-1   |   File "/usr/lib/python3.11/site-packages/httpcore/_exceptions.py", line 10, in map_exceptions
searxng-1   |     yield
searxng-1   |   File "/usr/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 113, in connect_tcp
searxng-1   |     with anyio.fail_after(timeout):
searxng-1   |   File "/usr/lib/python3.11/contextlib.py", line 158, in __exit__
searxng-1   |     self.gen.throw(typ, value, traceback)
searxng-1   |   File "/usr/lib/python3.11/site-packages/anyio/_core/_tasks.py", line 118, in fail_after
searxng-1   |     raise TimeoutError
searxng-1   | TimeoutError
searxng-1   | 
searxng-1   | The above exception was the direct cause of the following exception:
searxng-1   | 
searxng-1   | Traceback (most recent call last):
searxng-1   |   File "/usr/lib/python3.11/site-packages/httpx/_transports/default.py", line 60, in map_httpcore_exceptions
searxng-1   |     yield
searxng-1   |   File "/usr/lib/python3.11/site-packages/httpx/_transports/default.py", line 353, in handle_async_request
searxng-1   |     resp = await self._pool.handle_async_request(req)
searxng-1   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
searxng-1   |   File "/usr/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 262, in handle_async_request
searxng-1   |     raise exc
searxng-1   |   File "/usr/lib/python3.11/site-packages/httpcore/_async/connection_pool.py", line 245, in handle_async_request
searxng-1   |     response = await connection.handle_async_request(request)
searxng-1   |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
searxng-1   |   File "/usr/lib/python3.11/site-packages/httpcore/_async/connection.py", line 92, in handle_async_request
searxng-1   |     raise exc
searxng-1   |   File "/usr/lib/python3.11/site-packages/httpcore/_async/connection.py", line 69, in handle_async_request
searxng-1   |     stream = await self._connect(request)
searxng-1   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
searxng-1   |   File "/usr/lib/python3.11/site-packages/httpcore/_async/connection.py", line 117, in _connect
searxng-1   |     stream = await self._network_backend.connect_tcp(**kwargs)
searxng-1   |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
searxng-1   |   File "/usr/lib/python3.11/site-packages/httpcore/_backends/auto.py", line 31, in connect_tcp
searxng-1   |     return await self._backend.connect_tcp(
searxng-1   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
searxng-1   |   File "/usr/lib/python3.11/site-packages/httpcore/_backends/anyio.py", line 112, in connect_tcp
searxng-1   |     with map_exceptions(exc_map):
searxng-1   |   File "/usr/lib/python3.11/contextlib.py", line 158, in __exit__
searxng-1   |     self.gen.throw(typ, value, traceback)
searxng-1   |   File "/usr/lib/python3.11/site-packages/httpcore/_exceptions.py", line 14, in map_exceptions
searxng-1   |     raise to_exc(exc) from exc
searxng-1   | httpcore.ConnectTimeout

t-dsai avatar Apr 29 '24 14:04 t-dsai

@t-dsai, I'm having the same issue , please tell me how did you resolved it

mause-01 avatar Sep 01 '24 21:09 mause-01

Same issue here.

mighty-laolin avatar Sep 24 '24 07:09 mighty-laolin

me neither

JarynXu avatar Oct 02 '24 09:10 JarynXu

Same issue

NicholasGuerrero avatar Oct 18 '24 18:10 NicholasGuerrero

For me it was a proxy issue, I solved it by setting the proxy describes here in my settings.yml: https://docs.searxng.org/admin/settings/settings_outgoing.html

outgoing: proxies: all://: - http://yourproxy:80"

iraklishubitidze avatar Nov 04 '24 15:11 iraklishubitidze

For me it was a proxy issue, I solved it by setting the proxy describes here in my settings.yml: https://docs.searxng.org/admin/settings/settings_outgoing.html

outgoing: proxies: all://: - http://yourproxy:80"

Cool, excuse my ignorance but what proxy?

rightsaidfred99 avatar Dec 15 '24 03:12 rightsaidfred99