bgp-dashboard
bgp-dashboard copied to clipboard
gobgp docker doesn't start
When starting the docker images with either:
# docker-compose up
# docker-compose up -d
The gobgp image doesn't stay running.
There is a race condition I haven't figured out yet. Just keep running the docker-compose up command over and over until it starts. You can check if it is running using the docker ps command.
You should see all three containers when things are working correctly:
# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
ab4ac0d3bc46 bgpdash_flask "/usr/bin/supervisord" 22 seconds ago Up 18 seconds 0.0.0.0:80->80/tcp bgpdash_flask_1
ec2546ce400b bgpdash_gobgp "/bin/sh -c /root/gob" 22 seconds ago Up 6 seconds 0.0.0.0:179->179/tcp bgpdash_gobgp_1
e520b32708a4 bgpdash_mongo "/entrypoint.sh mongo" 24 seconds ago Up 22 seconds 27017/tcp bgpdash_mongo_1
Have you figured out the race condition yet?
~/bgp-dashboard# docker-compose up | grep -i "exited with code 0"
Starting bgpdashboard_data_1
Starting bgpdashboard_mongo_1
Starting bgpdashboard_flask_1
Starting bgpdashboard_gobgp_1
bgpdashboard_data_1 exited with code 0
bgpdashboard_gobgp_1 exited with code 0
Stopping bgpdashboard_gobgp_1 ... done
Stopping bgpdashboard_flask_1 ... done
Stopping bgpdashboard_mongo_1 ... done
Workaround for the race condition:
gobgp: build: ./gobgp/ ports: - 179:179 links: - mongo volumes_from: - data restart: always
However the container isn't peering, I see a BGP OPEN message from my router followed by an ACK & FIN from my MacBook. This tells me that the router is attempting to peer and either my Mac or the goBGP container is closing the connection.