0

When I start simply with bitcoind and stop with bitcoin-cli stop everything works fine.

But if I start bitcoind with sudo systemctl start bitcoind and I made this /etc/systemd/system/bitcoind.service:

[Unit]
Description=Bitcoin daemon
After=network.target
[Service]
ExecStart=/usr/local/bin/bitcoind -conf=/home/bitcoin/.bitcoin/bitcoin.conf -pid=/home/bitcoin/.bitcoin/bitcoind.pid
# Creates /run/bitcoind owned by bitcoin
RuntimeDirectory=bitcoind
User=bitcoin
Type=forking
PIDFile=/home/bitcoin/.bitcoin/bitcoind.pid
Restart=on-failure
# Hardening measures
####################
# Provide a private /tmp and /var/tmp.
PrivateTmp=true
# Mount /usr, /boot/ and /etc read-only for the process.
ProtectSystem=full
# Disallow the process and all of its children to gain
# new privileges through execve().
NoNewPrivileges=true
# Use a new /dev namespace only populated with API pseudo devices
# such as /dev/null, /dev/zero and /dev/random.
PrivateDevices=true
# Deny the creation of writable and executable memory mappings.
MemoryDenyWriteExecute=true
[Install]
WantedBy=multi-user.target

two things happen that I don't understand. First, despite having /home/bitcoin/.bitcoin/bitcoin.conf like this

printtoconsole=1
logips=1
maxconnections=40
maxuploadtarget=5000
dbcache=100
maxorphantx=10
maxmempool=50
txindex=1
rpcuser=bitcoinrpc
rpcpassword=Postfach24
rpcclienttimeout=300
server=1

there is no output to the console if started via systemctl.

Also, if I check for messages with tail -n 100 -f ~/.bitcoin/debug.log I see rewind blocks a lot and the process seems to loop.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.