paulgoio / searxng

SearXNG image with changed simple theme, settings.yml
https://paulgo.io
GNU Affero General Public License v3.0
100 stars 23 forks source link

After deploying new image, container no longer functions. no-workers. #57

Closed q20 closed 11 months ago

q20 commented 11 months ago

Hi there

My instance of searxng was working perfectly until deploying the current (as of an hour ago) build. I now have no web interface and the container is no longer functional.

image

Logs here:

sed: can't move 'searx/settings.ymlJoMmPD' to 'searx/settings.yml': Resource busy
sed: can't move 'searx/settings.ymlGkCleD' to 'searx/settings.yml': Resource busy
sed: can't move 'searx/settings.ymllemJlD' to 'searx/settings.yml': Resource busy
sed: can't move 'searx/settings.ymlFnEjpD' to 'searx/settings.yml': Resource busy
sed: can't move 'searx/settings.ymlAhEKFm' to 'searx/settings.yml': Resource busy
[uWSGI] getting INI configuration from /etc/uwsgi/uwsgi.ini
[uwsgi-static] added mapping for /static => /usr/local/searxng/searx/static
*** Starting uWSGI 2.0.21 (64bit) on [Tue Nov 14 16:43:12 2023] ***
compiled with version: 12.2.1 20220924 on 28 April 2023 21:13:09
os: Linux-4.4.302+ #69057 SMP Fri Oct 6 11:28:18 CST 2023
nodename: be4af621c99f
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
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.6 (main, Oct  4 2023, 06:22:18) [GCC 12.2.1 20220924]
Python main interpreter initialized at 0x7fe903edff78
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
*** Operational MODE: no-workers ***
added /usr/local/searxng/ to pythonpath.
spawned uWSGI master process (pid: 6)

Any ideas?

q20 commented 11 months ago

Wondering if something in the settings.yml file borked the container, I have tried deploying without the file mapped (thinking this would simply imply stock/default setup). Same no-workerserror.

mrpaulblack commented 11 months ago

Hi, Hmm so looking at your log, the settings.yml file in your SearXNG container seems to be used by another process... Do you have that file mounted to the outside of the container and open in an editor or something?

The latest commit only added a few commits from upstream seearxng. There are basically only dependency updates and this commit, but I don't see how this broke your setup: https://github.com/searxng/searxng/commit/bd3f526859449abe7409ebdb15ba5a5ae20b346a

What is your error exactly? I would recommend restarting your server removing and spawning a new container with docker-compose down as well as docker-compose up -d, otherwise I am not sure what the error is here...

q20 commented 11 months ago

I have deleted the container, then run the following:

sudo docker run -d \
--name=searxng \
--restart always \
-e IMAGE_PROXY=true \
-p 8733:8080 \
paulgoio/searxng:production

Here is the log:

[uwsgi-static] added mapping for /static => /usr/local/searxng/searx/static
*** Starting uWSGI 2.0.21 (64bit) on [Tue Nov 14 20:25:07 2023] ***
compiled with version: 12.2.1 20220924 on 28 April 2023 21:13:09
os: Linux-4.4.302+ #69057 SMP Fri Oct 6 11:28:18 CST 2023
nodename: b188011c2bfc
machine: x86_64
clock source: unix
pcre jit disabled
detected number of CPU cores: 8
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.6 (main, Oct  4 2023, 06:22:18) [GCC 12.2.1 20220924]
Python main interpreter initialized at 0x7f06009e9f78
python threads support enabled
your server socket listen backlog is limited to 100 connections
your mercy for graceful operations on workers is 60 seconds
*** Operational MODE: no-workers ***
added /usr/local/searxng/ to pythonpath.
spawned uWSGI master process (pid: 7)

So, no yml file locked, nothing complicated. Service still unavailable.

mrpaulblack commented 11 months ago

Ok I can recreate your issue; I tried your command and even docker run -it --rm -p 8080:8080 paulgoio/searxng:production without any env vars ends in a loading screen with a timeout in the browser. I will check what is hapenning here and reach back :+1:

mrpaulblack commented 11 months ago

Ah ok I think I found it. This file changed: https://github.com/searxng/searxng/commit/bd3f526859449abe7409ebdb15ba5a5ae20b346a#diff-33b4e0e92e17b415305864bce09313fc6a91fe957ed059042f90bebe7fb92db3R8 . Since I am setting these values on my public instance it works there, but locally without those values it does not work. Will push a fix :+1:

fore example what works: docker run -it --rm -p 8080:8080 -e UWSGI_WORKERS=8 -e UWSGI_THREADS=4 paulgoio/searxng:production

q20 commented 11 months ago

Ok I can recreate your issue; I tried your command and even docker run -it --rm -p 8080:8080 paulgoio/searxng:production without any env vars ends in a loading screen with a timeout in the browser. I will check what is hapenning here and reach back 👍

Thanks, champ. 👍

mrpaulblack commented 11 months ago

Ok I deployed a fix for this issue to the production tag. You can now run docker run -it --rm -p 8080:8080 paulgoio/searxng:staging and the instance will be reachable on http:127.0.0.1:8080.

Sorry for not testing upstream more before moving changes to the prod tag; Closing.

q20 commented 11 months ago

Ok I deployed a fix for this issue to the production tag. You can now run docker run -it --rm -p 8080:8080 paulgoio/searxng:staging and the instance will be reachable on http:127.0.0.1:8080.

Sorry for not testing upstream more before moving changes to the prod tag; Closing.

Container and service deploy successfully now. Thank you for responding so damn quickly. Stellar support. 👍