nilsherzig / LLocalSearch

LLocalSearch is a completely locally running search aggregator using LLM Agents. The user can ask a question and the system will use a chain of LLMs to find the answer. The user can see the progress of the agents and the final answer. No OpenAI or Google API keys are needed.
Apache License 2.0
5.64k stars 358 forks source link

searxng.engines.wikidata: Fail to initialize #108

Open t-dsai opened 6 months ago

t-dsai commented 6 months ago

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
mause-01 commented 2 months ago

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

mighty-laolin commented 1 month ago

Same issue here.

JarynXu commented 1 month ago

me neither

NicholasGuerrero commented 2 weeks ago

Same issue

cybergazer commented 6 days ago

Please fix, multiple people are having this issue