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

Can't start container #167

Closed ghost closed 11 months ago

ghost commented 11 months ago

Hello. I didn't change anything other than:

user@host> sed -i "s|ultrasecretkey|$(openssl rand -hex 32)|g" searxng/settings.yml

But it fails to run:

user@host> docker-compose up                                                                                                     /tmp/searxng-docker
[+] Running 20/20
 ✔ caddy 4 layers [⣿⣿⣿⣿]      0B/0B      Pulled                                                                                                18.0s 
   ✔ c1d6d1b2d5a3 Pull complete                                                                                                                11.3s 
   ✔ 0539a1f43a18 Pull complete                                                                                                                11.7s 
   ✔ 0c63ab8ea55e Pull complete                                                                                                                11.7s 
   ✔ aa47e7f53b26 Pull complete                                                                                                                14.9s 
 ✔ redis 6 layers [⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                               7.3s 
   ✔ 31e352740f53 Pull complete                                                                                                                 2.0s 
   ✔ 029a81f05585 Pull complete                                                                                                                 2.0s 
   ✔ 7aaf69037d81 Pull complete                                                                                                                 2.4s 
   ✔ 2bfe6b931134 Pull complete                                                                                                                 4.2s 
   ✔ 9528a9e21ebd Pull complete                                                                                                                 4.3s 
   ✔ d9b99dbdfe9d Pull complete                                                                                                                 4.3s 
 ✔ searxng 7 layers [⣿⣿⣿⣿⣿⣿⣿]      0B/0B      Pulled                                                                                           23.4s 
   ✔ 18a2182d08f3 Pull complete                                                                                                                 3.1s 
   ✔ 4f4fb700ef54 Pull complete                                                                                                                 3.7s 
   ✔ 3ebfe4b773ca Pull complete                                                                                                                 3.9s 
   ✔ 3087e1d2732b Pull complete                                                                                                                19.5s 
   ✔ fd0a5f5bb54c Pull complete                                                                                                                19.5s 
   ✔ 2d4a5db523c7 Pull complete                                                                                                                20.1s 
   ✔ 8ec87a3cea1e Pull complete                                                                                                                20.3s 
[+] Running 4/1
 ✔ Network searxng-docker_searxng  Created                                                                                                      0.1s 
 ✔ Container searxng               Created                                                                                                      0.0s 
 ✔ Container caddy                 Created                                                                                                      0.0s 
 ✔ Container redis                 Created                                                                                                      0.0s 
Attaching to caddy, redis, searxng
caddy    | Error: reading config file: open /etc/caddy/Caddyfile: permission denied
caddy exited with code 1
redis    | 1:C 26 Jul 2023 02:06:52.527 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
redis    | 1:C 26 Jul 2023 02:06:52.527 # Redis version=7.0.12, bits=64, commit=00000000, modified=0, pid=1, just started
redis    | 1:C 26 Jul 2023 02:06:52.527 # Configuration loaded
redis    | 1:M 26 Jul 2023 02:06:52.529 # You requested maxclients of 10000 requiring at least 10032 max file descriptors.
redis    | 1:M 26 Jul 2023 02:06:52.529 # Server can't set maximum open files to 10032 because of OS error: Operation not permitted.
redis    | 1:M 26 Jul 2023 02:06:52.529 # Current maximum open files is 4096. maxclients has been reduced to 4064 to compensate for low ulimit. If you need higher maxclients increase 'ulimit -n'.
redis    | 1:M 26 Jul 2023 02:06:52.529 * monotonic clock: POSIX clock_gettime
redis    | 1:M 26 Jul 2023 02:06:52.532 # Warning: Could not create server TCP listening socket ::*:6379: unable to bind socket, errno: 97
redis    | 1:M 26 Jul 2023 02:06:52.533 * Running mode=standalone, port=6379.
redis    | 1:M 26 Jul 2023 02:06:52.533 # Server initialized
redis    | 1:M 26 Jul 2023 02:06:52.533 # WARNING Memory overcommit must be enabled! Without it, a background save or replication may fail under low memory condition. Being disabled, it can can also cause failures without low memory condition, see https://github.com/jemalloc/jemalloc/issues/1328. To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the command 'sysctl vm.overcommit_memory=1' for this to take effect.
redis    | 1:M 26 Jul 2023 02:06:52.534 * Ready to accept connections
searxng  | SearXNG version 2023.7.22+65d8b1a31
searxng  | Create /etc/searxng/uwsgi.ini
searxng  | cp: can't stat '/etc/searxng/uwsgi.ini': Permission denied
searxng  | sed: /etc/searxng/uwsgi.ini: Permission denied
searxng  | Create /etc/searxng/settings.yml
searxng  | cp: can't stat '/etc/searxng/settings.yml': Permission denied
searxng  | sed: /etc/searxng/settings.yml: Permission denied
searxng  | Listen on 0.0.0.0:8080
searxng  | realpath() of /etc/searxng/uwsgi.ini failed: Permission denied [core/utils.c line 3662]
searxng exited with code 1

Found this comment here, but I'm either doing something wrong or it just doesn't work for me.

I'm using artix linux with the latest updates, but I also tried running searxng-docker on garuga linux and the result is the same.

br4nnigan commented 10 months ago

the 977 trick didn't help for me either

I guess it plays a role if you start docker with sudo or not

chmod o+w searxng helps though

cameronj86 commented 6 months ago

This helped me get it up and running today: https://lemmy.world/post/2884841

Also, I have it running using my IP address locally and need to use http to connect instead of https since I didn't buy a hosting site.

On a related/unrelated, I set searxng as the default search w/i Chromium via 'manage search engines', but one quirk is that Chromium automatically removed the port reference in my address string and turned it into 'https' so I had to manually revert those two pieces before things worked.

lhhel9l3 commented 1 month ago

This helped me get it up and running today: https://lemmy.world/post/2884841

solved my issue as well. Thanks.