searxng / searxng-docker

The docker-compose files for setting up a SearXNG instance with docker.
GNU Affero General Public License v3.0
1.01k stars 247 forks source link

Running in localhost doesn't work #236

Closed Project579 closed 1 month ago

Project579 commented 1 month ago

I'm trying to get the searxng docker compose setup to just work locally to do some tests but it doesn't even work with the default configuration.

The steps I followed: 1) Clone the repo 2) Generate random secret_key 3) Run docker compose up

Results:

wget localhost
--2024-05-25 22:32:47--  http://localhost/
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:80... connected.
HTTP request sent, awaiting response... 502 Bad Gateway
2024-05-25 22:32:47 ERROR 502: Bad Gateway.

wget https://localhost
--2024-05-25 22:32:51--  https://localhost/
Loaded CA certificate '/etc/ssl/certs/ca-certificates.crt'
Resolving localhost (localhost)... ::1, 127.0.0.1
Connecting to localhost (localhost)|::1|:443... failed: Connection refused.
Connecting to localhost (localhost)|127.0.0.1|:443... failed: Connection refused.

Logs:

docker compose up
WARN[0000] ./searxng-docker/docker-compose.yaml: `version` is obsolete 
[+] Running 3/0
 ✔ Container redis    Created                                                                                                         0.0s 
 ✔ Container searxng  Created                                                                                                         0.0s 
 ✔ Container caddy    Created                                                                                                         0.0s 
Attaching to caddy, redis, searxng
caddy    | {"level":"info","ts":1716669408.6721826,"msg":"using provided configuration","config_file":"/etc/caddy/Caddyfile","config_adapter":"caddyfile"}
caddy    | {"level":"warn","ts":1716669408.6728356,"logger":"caddyfile","msg":"Unnecessary header_up X-Forwarded-Proto: the reverse proxy's default behavior is to pass headers to the upstream"}
caddy    | {"level":"warn","ts":1716669408.6735008,"msg":"Caddyfile input is not formatted; run 'caddy fmt --overwrite' to fix inconsistencies","adapter":"caddyfile","file":"/etc/caddy/Caddyfile","line":2}
caddy    | {"level":"warn","ts":1716669408.6738014,"logger":"admin","msg":"admin endpoint disabled"}
caddy    | {"level":"warn","ts":1716669408.6738877,"logger":"http.auto_https","msg":"server is listening only on the HTTP port, so no automatic HTTPS will be applied to this server","server_name":"srv0","http_port":80}
caddy    | {"level":"info","ts":1716669408.6739907,"logger":"tls.cache.maintenance","msg":"started background certificate maintenance","cache":"0xc00061eb00"}
caddy    | {"level":"info","ts":1716669408.6745496,"logger":"http.log","msg":"server running","name":"srv0","protocols":["h1","h2","h3"]}
caddy    | {"level":"info","ts":1716669408.6747787,"msg":"autosaved config (load with --resume flag)","file":"/config/caddy/autosave.json"}
caddy    | {"level":"info","ts":1716669408.6747878,"msg":"serving initial configuration"}
caddy    | {"level":"warn","ts":1716669408.6762183,"logger":"tls","msg":"storage cleaning happened too recently; skipping for now","storage":"FileStorage:/data/caddy","instance":"c0749cee-271a-42c9-965c-53a726dede16","try_again":1716755808.676216,"try_again_in":86399.999999429}
caddy    | {"level":"info","ts":1716669408.676311,"logger":"tls","msg":"finished cleaning storage units"}
searxng  | SearXNG version 2024.5.24+75e4b6512
searxng  | Use existing /etc/searxng/uwsgi.ini
searxng  | Use existing /etc/searxng/settings.yml
searxng  | Listen on 0.0.0.0:8080
searxng  | [uWSGI] getting INI configuration from /etc/searxng/uwsgi.ini
searxng  | [uwsgi-static] added mapping for /static => /usr/local/searxng/searx/static
searxng  | *** Starting uWSGI 2.0.23 (64bit) on [Sat May 25 20:36:48 2024] ***
searxng  | compiled with version: 13.2.1 20231014 on 30 November 2023 14:34:33
searxng  | os: Linux-6.9.1-arch1-2.1 #1 SMP PREEMPT_DYNAMIC Thu, 23 May 2024 14:31:56 +0000
searxng  | nodename: 30a7f1e4b0d0
searxng  | machine: x86_64
searxng  | clock source: unix
searxng  | pcre jit disabled
searxng  | detected number of CPU cores: 16
searxng  | current working directory: /usr/local/searxng
searxng  | detected binary path: /usr/sbin/uwsgi
searxng  | chdir() to /usr/local/searxng/searx/
searxng  | your memory page size is 4096 bytes
searxng  | detected max file descriptor number: 1073741816
searxng  | building mime-types dictionary from file /etc/mime.types...1390 entry found
searxng  | lock engine: pthread robust mutexes
searxng  | thunder lock: disabled (you can enable it with --thunder-lock)
searxng  | uwsgi socket 0 bound to TCP address 0.0.0.0:8080 fd 3
searxng  | Python version: 3.11.9 (main, Apr 14 2024, 13:40:00) [GCC 13.2.1 20231014]
searxng  | Python main interpreter initialized at 0x78bdc7c8c718
searxng  | python threads support enabled
searxng  | your server socket listen backlog is limited to 100 connections
searxng  | your mercy for graceful operations on workers is 60 seconds
searxng  | mapped 2051424 bytes (2003 KB) for 64 cores
searxng  | *** Operational MODE: preforking+threaded ***
searxng  | added /usr/local/searxng/ to pythonpath.
searxng  | spawned uWSGI master process (pid: 7)
searxng  | spawned uWSGI worker 1 (pid: 10, cores: 4)
searxng  | spawned uWSGI worker 2 (pid: 12, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 1
searxng  | spawned uWSGI worker 3 (pid: 17, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 2
searxng  | spawned uWSGI worker 4 (pid: 22, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 3
searxng  | spawned uWSGI worker 5 (pid: 28, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 4
searxng  | spawned uWSGI worker 6 (pid: 34, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 5
searxng  | spawned uWSGI worker 7 (pid: 39, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 6
searxng  | spawned 4 offload threads for uWSGI worker 7
searxng  | spawned uWSGI worker 8 (pid: 45, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 8
searxng  | spawned uWSGI worker 9 (pid: 50, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 9
searxng  | spawned uWSGI worker 10 (pid: 55, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 10
searxng  | spawned uWSGI worker 11 (pid: 60, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 11
searxng  | spawned uWSGI worker 12 (pid: 65, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 12
searxng  | spawned uWSGI worker 13 (pid: 70, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 13
searxng  | spawned uWSGI worker 14 (pid: 75, cores: 4)
searxng  | spawned uWSGI worker 15 (pid: 76, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 14
searxng  | spawned 4 offload threads for uWSGI worker 15
searxng  | spawned uWSGI worker 16 (pid: 80, cores: 4)
searxng  | spawned 4 offload threads for uWSGI worker 16
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 60 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 17 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 50 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 28 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 55 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 22 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 70 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 10 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 65 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 39 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 75 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 45 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 80 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 12 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 76 (default app)
searxng  | WSGI app 0 (mountpoint='') ready in 1 seconds on interpreter 0x78bdc7c8c718 pid: 34 (default app)
caddy    | {"level":"error","ts":1716669415.4427848,"logger":"http.log.error.log0","msg":"read tcp 127.0.0.1:38224->127.0.0.1:8080: read: connection reset by peer","request":{"remote_ip":"::1","remote_port":"59388","client_ip":"::1","proto":"HTTP/1.1","method":"GET","host":"localhost","uri":"/","headers":{"User-Agent":["Wget/1.24.5"],"Accept":["*/*"],"Accept-Encoding":["identity"],"Connection":["Keep-Alive"]}},"duration":0.001616975,"status":502,"err_id":"b2kq3e1yx","err_trace":"reverseproxy.statusError (reverseproxy.go:1267)"}