lemariva / haproxy-certbot

A Dockerized service that adds SSL layer (reverse proxy) and automatically renews the SSL certificate when needed.
https://lemariva.com/blog/2022/01/home-assistant-help-tips-tricks-diy-smart-home
Apache License 2.0
3 stars 0 forks source link

Container keeps restarting #1

Closed raelbsd closed 2 years ago

raelbsd commented 2 years ago

Hi, my container keeps crashing and restarting, in the Portanier logs I see the following line: Command not found: /start.sh

I've only changed the SERVICE_IP line in the docker-compose.yml and bring it up with docker-compose up -d. Maybe something else is missing? Thanks in advance

lemariva commented 2 years ago

I've cloned the repository 10 min ago on a clean installed Raspberry Pi, started the services docker-compose up -d and I got this as the logs:

Adding qdisc plug dev lo id 40: parent 1:4
  refcnt 0no options
Adding qdisc plug dev lo id 40: parent 1:4
  refcnt 0no options
2022-01-18 17:10:57,307 CRIT Supervisor is running as root.  Privileges were not dropped because no user is specified in the config file.  If you intend to run as root, you can set user=root in the config file to avoid this message.
2022-01-18 17:10:57,316 INFO supervisord started with pid 1
2022-01-18 17:10:58,326 INFO spawned: 'crond' with pid 35
2022-01-18 17:10:58,342 INFO spawned: 'haproxy' with pid 36
2022-01-18 17:10:58,378 INFO success: haproxy entered RUNNING state, process has stayed up for > than 0 seconds (startsecs)
2022-01-18 17:10:58,524 INFO exited: haproxy (exit status 0; expected)
2022-01-18 17:10:59,526 INFO success: crond entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)

and the proxy is working. Can you tell me more about the architecture/software that you are using? I have following on my RPi 4GB:

pi@raspberrypi:~/Documents/haproxy-certbot/orchestration $ docker --version
Docker version 20.10.12, build e91ed57
pi@raspberrypi:~/Documents/haproxy-certbot/orchestration $ docker-compose --version
docker-compose version 1.29.2, build unknown
pi@raspberrypi:~/Documents/haproxy-certbot/orchestration $ uname -a
Linux raspberrypi 5.10.63-v7l+ #1459 SMP Wed Oct 6 16:41:57 BST 2021 armv7l GNU/Linux
pi@raspberrypi:~/Documents/haproxy-certbot/orchestration $ cat /etc/os-release 
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"
raelbsd commented 2 years ago

This one is also a RPi 4, Model B, 4Gb. pi@cronos:~ $ docker --version Docker version 20.10.12, build e91ed57 pi@cronos:~ $ docker-compose --version docker-compose version 1.29.2, build unknown pi@cronos:~ $ uname -a Linux cronos 5.10.17-v7l+ #2 SMP Thu May 27 10:48:57 -03 2021 armv7l GNU/Linux pi@cronos:~ $ cat /etc/os-release PRETTY_NAME="Raspbian GNU/Linux 10 (buster)" NAME="Raspbian GNU/Linux" VERSION_ID="10" VERSION="10 (buster)" VERSION_CODENAME=buster ID=raspbian ID_LIKE=debian HOME_URL="http://www.raspbian.org/" SUPPORT_URL="http://www.raspbian.org/RaspbianForums" BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

raelbsd commented 2 years ago

I've noticed you are running Bullseye, so I upgrade mine (it was a pending job) and now it's running:

Try iptables -h' or 'iptables --help' for more information. iptables v1.8.7 (legacy): unknown option "--set-mark" Tryiptables -h' or 'iptables --help' for more information. iptables v1.8.7 (legacy): unknown option "--set-mark" Try iptables -h' or 'iptables --help' for more information. iptables v1.8.7 (legacy): unknown option "--set-mark" Tryiptables -h' or 'iptables --help' for more information. iptables v1.8.7 (legacy): unknown option "--set-mark" Try `iptables -h' or 'iptables --help' for more information. Adding qdisc plug dev lo id 40: parent 1:4 refcnt 0no options Adding qdisc plug dev lo id 40: parent 1:4 refcnt 0no options 2022-01-18 21:25:20,853 CRIT Supervisor is running as root. Privileges were not dropped because no user is specified in the config file. If you intend to run as root, you can set user=root in the config file to avoid this message. 2022-01-18 21:25:20,882 INFO supervisord started with pid 1 2022-01-18 21:25:21,888 INFO spawned: 'crond' with pid 29 2022-01-18 21:25:21,899 INFO spawned: 'haproxy' with pid 30 2022-01-18 21:25:21,920 INFO success: haproxy entered RUNNING state, process has stayed up for > than 0 seconds (startsecs) 2022-01-18 21:25:22,154 INFO exited: haproxy (exit status 0; expected)

I'll test it to see if it's ok, Thanks!

lemariva commented 2 years ago

Yes, I am using Bullseye as OS. The base Docker image is also Bullseye as you can see in the Dockerfile. I thought that Docker images are independent of the version of the running OS in the Raspberry Pi. I would expected some driver errors (e.g. Network etc.), but not a command not found error. That's strange. Both were 32bits OS too. Anyways thanks for reporting that.