btcpayserver-docker icon indicating copy to clipboard operation
btcpayserver-docker copied to clipboard

nginx container sometimes stops after btcpay_up

Open achow101 opened this issue 2 years ago • 0 comments

I've noticed recently that sometimes the nginx container sometimes ends up being stopped shortly after btcpay_up is run, with the following in the logs:

2022/10/09 07:00:30 [emerg] 1#1: host not found in upstream "clightning_bitcoin_charge" in /etc/nginx/conf.d/default.conf:95
nginx: [emerg] host not found in upstream "clightning_bitcoin_charge" in /etc/nginx/conf.d/default.conf:95
2022/10/09 07:00:31 [emerg] 1#1: host not found in upstream "clightning_bitcoin_charge" in /etc/nginx/conf.d/default.conf:95
nginx: [emerg] host not found in upstream "clightning_bitcoin_charge" in /etc/nginx/conf.d/default.conf:95

Looking at the startup, it seems like a couple of the c-lightning containers are restarting themselves several times, particularly generated_clightning_bitcoin_rest_1 and generated_clightning_bitcoin_charge_1. Eventually they do come up (stop restarting), but by that point, nginx has already stopped itself rendering the web interface unavailable. I can then use btcpay-up.sh again to start it, and everything works fine.

This is particularly annoying for a deployment that does regular automated backups as I would find that nginx is stopped after every single automated backup. My workaround is to run btcpay-up.sh a minute after the backup finishes, but it seems like the nginx container should be able to restart itself like the c-lightning containers do.

achow101 avatar Oct 09 '22 13:10 achow101