所以我特别想问一下如何自己调试这个问题。我发现我在这方面的知识不足,所以如果能提供文章链接就更好了。
我正在尝试使用 docker 在服务器上安装 SearXNG(我已经成功完成了十几次,但一直在修修补补,直到它崩溃或我把自己锁在外面)。所以我创建了自己的分步指南,以便我可以更轻松地重新创建服务器。这次我遇到了一个我以前从未遇到过的错误。它是一个退出代码:
● searxng-docker.service - SearXNG service
Loaded: loaded (/usr/local/searxng-docker/searxng-docker.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2023-06-26 14:32:59 UTC; 22min ago
Process: 966 ExecStart=/usr/local/bin/docker-compose -f ${SEARXNG_DOCKERCOMPOSEFILE} up --remove-orphans (code=exited, status=203/EXEC)
Main PID: 966 (code=exited, status=203/EXEC)
CPU: 633us
Jun 26 14:32:59 SearXNG-Debian systemd[966]: searxng-docker.service: Failed at step EXEC spawning /usr/local/bin/docker-compose: No such file or directory
Jun 26 14:32:59 SearXNG-Debian systemd[1]: searxng-docker.service: Main process exited, code=exited, status=203/EXEC
Jun 26 14:32:59 SearXNG-Debian systemd[1]: searxng-docker.service: Failed with result 'exit-code'.
Jun 26 14:32:59 SearXNG-Debian systemd[1]: searxng-docker.service: Scheduled restart job, restart counter is at 5.
Jun 26 14:32:59 SearXNG-Debian systemd[1]: Stopped SearXNG service.
Jun 26 14:32:59 SearXNG-Debian systemd[1]: searxng-docker.service: Start request repeated too quickly.
Jun 26 14:32:59 SearXNG-Debian systemd[1]: searxng-docker.service: Failed with result 'exit-code'.
Jun 26 14:32:59 SearXNG-Debian systemd[1]: Failed to start SearXNG service.
我以为我理解了这一点,因为 /usr/local/bin/ 目录是空的。因此,我编辑了 searxng-docker.service 并将其指向:/usr/local/searxng-docker/,但那没有用,我得到了一个新的错误。因此,我对照正在运行的 SearXNG 服务器检查了该文件,它指向空的 /usr/local/bin/ 目录。
所以我删除了我的 searxng-docker 文件夹并从 github 重新克隆了它。
现在它不工作了,但在调用后也没有出现在服务中docker-compose up -d:
searxngadmin@SearXNG-Debian:/usr/local/searxng-docker$ sudo service --status-all
[ - ] apparmor
[ - ] cgroupfs-mount
[ + ] chrony
[ + ] cloud-config
[ + ] cloud-final
[ + ] cloud-init
[ + ] cloud-init-local
[ + ] cron
[ + ] dbus
[ + ] docker
[ + ] fail2ban
[ - ] hwclock.sh
[ + ] kmod
[ + ] networking
[ + ] procps
[ + ] resolvconf
[ + ] rsyslog
[ - ] screen-cleanup
[ + ] ssh
[ - ] sudo
[ + ] udev
[ + ] ufw
[ + ] unattended-upgrades
[ - ] uuidd
如果您能给我提供任何可以填补我知识空白的链接,那将非常有帮助。我在谷歌上搜索没有找到任何有用的东西,而且我不知道如何调试这个问题。
谢谢。