ItzCrazyKns / Perplexica

Perplexica is an AI-powered search engine. It is an Open source alternative to Perplexity AI
MIT License
10.76k stars 948 forks source link

Error in perplexica-searxng-1 docker #148

Open Verfinix opened 1 month ago

Verfinix commented 1 month ago

Describe the bug Cannot start perplexica-searxng-1

To Reproduce Steps to reproduce the behavior:

Create new conda environment, activate conda

Just follow docker installation.

Expected behavior Browse to http://localhost:3000/ Page loaded the side menu, but the center page it keep circling

Screenshots If applicable, add screenshots to help explain your problem.

image

Additional context Add any other context about the problem here.

When check docker log Frontend and Backend started ok.

But the SearXNG docker cannot start

2024-05-28 22:35:25 SearXNG version 2024.3.29+f5bb64cca 2024-05-28 22:35:25 Create /etc/searxng/uwsgi.ini 2024-05-28 22:35:25 Create /etc/searxng/settings.yml 2024-05-28 22:35:25 Listen on 0.0.0.0:8080 2024-05-28 22:39:35 SearXNG version 2024.3.29+f5bb64cca 2024-05-28 22:39:35 Create /etc/searxng/uwsgi.ini 2024-05-28 22:39:35 Create /etc/searxng/settings.yml 2024-05-28 22:39:35 Listen on 0.0.0.0:8080 2024-05-28 22:35:25 cp: can't create '/etc/searxng/uwsgi.ini': No such file or directory 2024-05-28 22:35:25 sed: /etc/searxng/uwsgi.ini: No such file or directory 2024-05-28 22:35:25 cp: can't create '/etc/searxng/settings.yml': No such file or directory 2024-05-28 22:35:25 sed: /etc/searxng/settings.yml: No such file or directory 2024-05-28 22:35:25 realpath() of /etc/searxng/uwsgi.ini failed: No such file or directory [core/utils.c line 3662] 2024-05-28 22:39:35 cp: can't create '/etc/searxng/uwsgi.ini': No such file or directory 2024-05-28 22:39:35 sed: /etc/searxng/uwsgi.ini: No such file or directory 2024-05-28 22:39:35 cp: can't create '/etc/searxng/settings.yml': No such file or directory 2024-05-28 22:39:35 sed: /etc/searxng/settings.yml: No such file or directory 2024-05-28 22:39:35 realpath() of /etc/searxng/uwsgi.ini failed: No such file or directory [core/utils.c line 3662]

ItzCrazyKns commented 1 month ago

Why have you created a conda environment? this project doesn't make use of python.

Verfinix commented 1 month ago

Even without conda environment also having same problem.

ItzCrazyKns commented 1 month ago

Even without conda environment also having same problem.

Seems like you've installed it incorrectly, have you followed all the steps? I would recommend you to do a fresh install.

Verfinix commented 1 month ago

Done fresh install, now can start Searxng, but having error in log

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

ItzCrazyKns commented 1 month ago

Done fresh install, now can start Searxng, but having error in log

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

Does the searches work? if they do then you don't need to worry about the logs.

Verfinix commented 1 month ago

No, it just show circling icon

ItzCrazyKns commented 1 month ago

No, it just show circling icon

Can you attach a screenshot, what are the logs from the backend container and the browser console.

Niskeletor commented 1 month ago

I have the same problem here, following the steps wind docker compose installation , Here is the logs on the backend and serrchengine

SearXNG version 2024.5.31+18fb701be
Use existing /etc/searxng/uwsgi.ini
Use existing /etc/searxng/settings.yml
Listen on 0.0.0.0:8080
[uWSGI] getting INI configuration from /etc/searxng/uwsgi.ini
[uwsgi-static] added mapping for /static => /usr/local/searxng/searx/static
*** Starting uWSGI 2.0.23 (64bit) on [Mon Jun  3 15:28:40 2024] ***
compiled with version: 13.2.1 20231014 on 30 November 2023 14:34:33
os: Linux-6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03)
nodename: ff74c0337168
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 4
current working directory: /usr/local/searxng
detected binary path: /usr/sbin/uwsgi
chdir() to /usr/local/searxng/searx/
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
building mime-types dictionary from file /etc/mime.types...1390 entry found
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 0.0.0.0:8080 fd 3
Python version: 3.11.9 (main, Apr 14 2024, 13:40:00) [GCC 13.2.1 20231014]
Python main interpreter initialized at 0x7f22750a1718
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 603360 bytes (589 KB) for 16 cores
*** Operational MODE: preforking+threaded ***
added /usr/local/searxng/ to pythonpath.
spawned uWSGI master process (pid: 7)
spawned uWSGI worker 1 (pid: 10, cores: 4)
spawned uWSGI worker 2 (pid: 11, cores: 4)
spawned 4 offload threads for uWSGI worker 1
spawned uWSGI worker 3 (pid: 17, cores: 4)
spawned 4 offload threads for uWSGI worker 2
spawned uWSGI worker 4 (pid: 21, cores: 4)
spawned 4 offload threads for uWSGI worker 3
spawned 4 offload threads for uWSGI worker 4
WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x7f22750a1718 pid: 21 (default app)
WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x7f22750a1718 pid: 11 (default app)
WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x7f22750a1718 pid: 17 (default app)
WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x7f22750a1718 pid: 10 (default app)

SearXNG version 2024.5.31+18fb701be
Use existing /etc/searxng/uwsgi.ini
Use existing /etc/searxng/settings.yml
Listen on 0.0.0.0:8080
[uWSGI] getting INI configuration from /etc/searxng/uwsgi.ini
[uwsgi-static] added mapping for /static => /usr/local/searxng/searx/static
*** Starting uWSGI 2.0.23 (64bit) on [Mon Jun  3 15:28:40 2024] ***
compiled with version: 13.2.1 20231014 on 30 November 2023 14:34:33
os: Linux-6.1.0-21-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.90-1 (2024-05-03)
nodename: ff74c0337168
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 4
current working directory: /usr/local/searxng
detected binary path: /usr/sbin/uwsgi
chdir() to /usr/local/searxng/searx/
your memory page size is 4096 bytes
detected max file descriptor number: 1048576
building mime-types dictionary from file /etc/mime.types...1390 entry found
lock engine: pthread robust mutexes
thunder lock: disabled (you can enable it with --thunder-lock)
uwsgi socket 0 bound to TCP address 0.0.0.0:8080 fd 3
Python version: 3.11.9 (main, Apr 14 2024, 13:40:00) [GCC 13.2.1 20231014]
Python main interpreter initialized at 0x7f22750a1718
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
mapped 603360 bytes (589 KB) for 16 cores
*** Operational MODE: preforking+threaded ***
added /usr/local/searxng/ to pythonpath.
spawned uWSGI master process (pid: 7)
spawned uWSGI worker 1 (pid: 10, cores: 4)
spawned uWSGI worker 2 (pid: 11, cores: 4)
spawned 4 offload threads for uWSGI worker 1
spawned uWSGI worker 3 (pid: 17, cores: 4)
spawned 4 offload threads for uWSGI worker 2
spawned uWSGI worker 4 (pid: 21, cores: 4)
spawned 4 offload threads for uWSGI worker 3
spawned 4 offload threads for uWSGI worker 4
WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x7f22750a1718 pid: 21 (default app)
WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x7f22750a1718 pid: 11 (default app)
WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x7f22750a1718 pid: 17 (default app)
WSGI app 0 (mountpoint='') ready in 2 seconds on interpreter 0x7f22750a1718 pid: 10 (default app)