btcpayserver-docker
btcpayserver-docker copied to clipboard
With bitcoin.custom.yml, bitcoin container is crashing, but runs fine if started separately
Describe the problem/bug
I have a bitcoin.custom.yml which is set to use a local file folder with an already synched BTC mainnet, (attached).
bitcoin.custom.yml.txt
I've set to exclude the original and include the new:
export BTCPAYGEN_EXCLUDE_FRAGMENTS="bitcoin"
export BTCPAYGEN_ADDITIONAL_FRAGMENTS="bitcoin.custom"
. ./btcpay-setup.sh -i
When starting BTCPayServer the bitcoind container crashes and recycles about every minute, like this:
34199c5a7998 btcpayserver/bitcoin:0.19.0.1 "/entrypoint.sh bitc…" About an hour ago Restarting (1) 21 seconds ago btcpayserver_bitcoind
If I run the image directly, like below, the /data folder is mounted properly. I can then run bitcoind within the container, the chain starts validating. All seems fine.
docker run -v /mnt/bitcoin:/data -v bitcoin_wallet_datadir:/walletdata -it --entrypoint /bin/bash btcpayserver/bitcoin:0.19.0.1 -s
Can I get into the container before it is crashes, or get logs from it showing what is crashing?
Your environment
- Version of BTCPay Server: 1.0.5.4
- Deployment method: Container
- Other relevant environment details: Ubuntu 20.04.01
Logs (if applicable) Basic logs can be found in Server Settings > Logs.
Setup Parameters
. btcpay-setup.sh -i
Parameters passed:
BTCPAY_PROTOCOL:https
BTCPAY_HOST:aaa.zzz.lan
BTCPAY_ADDITIONAL_HOSTS:
REVERSEPROXY_HTTP_PORT:80
REVERSEPROXY_HTTPS_PORT:443
REVERSEPROXY_DEFAULT_HOST:none
LIBREPATRON_HOST:
WOOCOMMERCE_HOST:
BTCTRANSMUTER_HOST:
BTCPAY_ENABLE_SSH:true
BTCPAY_HOST_SSHKEYFILE:
LETSENCRYPT_EMAIL:
NBITCOIN_NETWORK:mainnet
LIGHTNING_ALIAS:
BTCPAYGEN_CRYPTO1:btc
BTCPAYGEN_CRYPTO2:
BTCPAYGEN_CRYPTO3:
BTCPAYGEN_CRYPTO4:
BTCPAYGEN_CRYPTO5:
BTCPAYGEN_CRYPTO6:
BTCPAYGEN_CRYPTO7:
BTCPAYGEN_CRYPTO8:
BTCPAYGEN_CRYPTO9:
BTCPAYGEN_REVERSEPROXY:nginx
BTCPAYGEN_LIGHTNING:clightning
BTCPAYGEN_ADDITIONAL_FRAGMENTS:bitcoin.custom
BTCPAYGEN_EXCLUDE_FRAGMENTS:bitcoin
BTCPAY_IMAGE:
ACME_CA_URI:production
TOR_RELAY_NICKNAME:
TOR_RELAY_EMAIL:
PIHOLE_SERVERIP:
----------------------
Additional exported variables:
BTCPAY_DOCKER_COMPOSE=/root/BTCPayServer/btcpayserver-docker/Generated/docker-compose.generated.yml
BTCPAY_BASE_DIRECTORY=/root/BTCPayServer
BTCPAY_ENV_FILE=/root/BTCPayServer/.env
BTCPAYGEN_OLD_PREGEN=false
BTCPAY_SSHKEYFILE=/datadir/host_id_rsa
BTCPAY_SSHAUTHORIZEDKEYS=/datadir/host_authorized_keys
BTCPAY_HOST_SSHAUTHORIZEDKEYS:/root/.ssh/authorized_keys
BTCPAY_SSHTRUSTEDFINGERPRINTS:
BTCPAY_CRYPTOS:btc
BTCPAY_ANNOUNCEABLE_HOST:
----------------------
BTCPay Server environment variables successfully saved in /etc/profile.d/btcpay-env.sh
BTCPay Server docker-compose parameters saved in /root/BTCPayServer/.env
Using default tag: latest
latest: Pulling from btcpayserver/docker-compose-generator
Digest: sha256:45fb6cdb5aab74d8db3c6942466ddc1430899a7426d87f7033b676e6b959c891
Status: Image is up to date for btcpayserver/docker-compose-generator:latest
docker.io/btcpayserver/docker-compose-generator:latest
Crypto: btc
Lightning: clightning
ReverseProxy: nginx
Generating /app/Generated/docker-compose.generated.yml
Selected fragments:
nginx
btcpayserver
bitcoin-clightning
bitcoin.custom
btcpayserver-nginx
postgres
nbxplorer
nginx-https
opt-add-tor
Generated /app/Generated/pull-images.sh
Generated /app/Generated/save-images.sh
Generated /app/Generated/docker-compose.generated.yml
Adding btcpayserver.service to systemd
BTCPay Server systemd configured in /etc/systemd/system/btcpayserver.service
BTCPay Server starting... this can take 5 to 10 minutes...
Failed to start btcpayserver.service: Unit docker.service not found.
BTCPay Server started
Creating network "generated_default" with the default driver
Creating generated_bitcoin_rtl_1 ... done
Creating nginx ... done
Creating generated_nbxplorer_1 ... done
Creating tor ... done
Creating generated_postgres_1 ... done
Creating tor-gen ... done
Creating btcpayserver_bitcoind ... done
Creating btcpayserver_clightning_bitcoin ... done
Creating generated_btcpayserver_1 ... done
Creating generated_clightning_bitcoin_spark_1 ... done
Creating generated_clightning_bitcoin_rest_1 ... done
Creating generated_clightning_bitcoin_charge_1 ... done
Creating nginx-gen ... done
Creating letsencrypt-nginx-proxy-companion ... done
Installed bitcoin-cli.sh to /usr/local/bin: Command line for your Bitcoin instance
Installed bitcoin-lightning-cli.sh to /usr/local/bin: Command line for your Bitcoin C-Lightning instance
Installed btcpay-clean.sh to /usr/local/bin: Command line for deleting old unused docker images
Installed btcpay-down.sh to /usr/local/bin: Command line for stopping all services related to BTCPay Server
Installed btcpay-restart.sh to /usr/local/bin: Command line for restarting all services related to BTCPay Server
Installed btcpay-setup.sh to /usr/local/bin: Command line for restarting all services related to BTCPay Server
Installed btcpay-up.sh to /usr/local/bin: Command line for starting all services related to BTCPay Server
Installed btcpay-admin.sh to /usr/local/bin: Command line for some administrative operation in BTCPay Server
Installed btcpay-update.sh to /usr/local/bin: Command line for updating your BTCPay Server to the latest commit of this repository
Installed changedomain.sh to /usr/local/bin: Command line for changing the external domain of your BTCPay Server
Additional context FWIW, this container seems to be recycling also: saubyk/c-lightning-rest:0.3.0
You can try and run docker logs -t btcpayserver_bitcoind to get the logs of the bitcoin container.
You should not replace the bitcoin_datadir volume with a local directory mapping in the container explictly.
You should do something along the lines of this: https://stackoverflow.com/questions/36387032/how-to-set-a-path-on-host-for-a-named-volume-in-docker-compose-yml#49920624