Cannot start service traefik

Hi,

Long time user of Arduino and then spark brewpi, finally had some spare time over xmas and decided to update to BrewBlox.

Gone through the setup via the wiki, fresh install on a new SD on a Raspi 3A.

Everything goes fine, ‘brewblox-ctl update’ shows I have the latest version but when I run the ‘up’ command I get the following error.

Any ideas?

ERROR: for brewblox_traefik_1 Cannot start service traefik: driver failed programming external connectivity on endpoint brewblox_traefik_1 (d07d79b52d8ec499688b46b40f2e52e603e678ab016cd340f1d6c34f44aacdf5): Bind for 0.0.0.0:443 failed: port is already allocated

It’s complaining that something else is already using the HTTPS port (443).

Are you running something else with a web UI?
What is the output from sudo netstat -tulpn?

If you’re not running anything else, run:

brewblox-ctl down
sudo reboot

After reboot, run up again, and it should work.

nothing else with a web, was a fresh SD.

This is the output of net stat. seems to be Docker running on 443

Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      501/sshd            
tcp6       0      0 :::22                   :::*                    LISTEN      501/sshd            
tcp6       0      0 :::443                  :::*                    LISTEN      645/docker-proxy    
tcp6       0      0 :::80                   :::*                    LISTEN      659/docker-proxy    
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           343/avahi-daemon: r 
udp        0      0 0.0.0.0:68              0.0.0.0:*                           491/dhcpcd          
udp        0      0 0.0.0.0:53648           0.0.0.0:*                           343/avahi-daemon: r 
udp        0      0 0.0.0.0:59831           0.0.0.0:*                           343/avahi-daemon: r 
udp6       0      0 :::5353                 :::*                                343/avahi-daemon: r 
udp6       0      0 :::42519                :::*                                343/avahi-daemon: r 
udp6       0      0 :::57744                :::*                                343/avahi-daemon: r

Tried the down command then reboot but come back up to the same error.

Docker occasionally fails to clean up. You can run brewblox-ctl kill to force close everything. Then wait a minute, or reboot, and netstat should report 443 to be unused.

really odd, tried that and same error.

Have ejected the SD and followed the install again to the letter and again got the below

pi@raspberrypi:~ $ sudo netstat -tulpn
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address           Foreign Address         State       PID/Program name    
tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN      503/sshd            
tcp6       0      0 :::22                   :::*                    LISTEN      503/sshd            
udp        0      0 0.0.0.0:5353            0.0.0.0:*                           329/avahi-daemon: r 
udp        0      0 0.0.0.0:57877           0.0.0.0:*                           329/avahi-daemon: r 
udp        0      0 0.0.0.0:68              0.0.0.0:*                           493/dhcpcd          
udp        0      0 0.0.0.0:52683           0.0.0.0:*                           329/avahi-daemon: r 
udp6       0      0 :::5353                 :::*                                329/avahi-daemon: r 
udp6       0      0 :::47888                :::*                                329/avahi-daemon: r 
udp6       0      0 :::42915                :::*                                329/avahi-daemon: r 
pi@raspberrypi:~ $ cd ~/brewblox/
pi@raspberrypi:~/brewblox $ brewblox-ctl -v up
SHELL      docker-compose up -d --remove-orphans
Starting brewblox_influx_1 ... 
Starting brewblox_history_1 ... 
Starting brewblox_ui_1      ... 
Starting brewblox_redis_1   ... 
Starting brewblox_traefik_1 ... 
Starting brewblox_spark-one_1 ... 
Starting brewblox_eventbus_1  ... 
Killed

Seems like the bind problem is solved. You may need to retry the up - Killed typically is a memory error. I noticed it as well since last Docker update. We’ll look into doing some optimization to avoid startup problems.

Strange, it seems to be the same each time I launch it. I’ve stopped the swap file to see if that makes a difference but doesn’t seem to change.

I can make a log unfortunately as the pi locks up after the killed message

You could try starting in batches:

docker-compose up -d influx redis eventbus
docker-compose up -d history spark-one
docker-compose up -d

It’s rather annoying, and I’ll be sure to look into both issues. Something as basic as “start system” should consistently work.

Just tried that and it works fine.

How odd!

Good to hear! The cause seems to be that peak memory use when starting all services is more than what the Pi has available. Starting up a few services at a time spreads the load.