Sunday, December 22, 2024

bitcoind – Failed to start out bitcoin daemon utilizing Ubuntu 20.04

Hey I maintain getting this error everytime I run sudo systemctl allow –now bitcoind

Job for bitcoind.service failed as a result of the management course of exited with error code.
See “systemctl standing bitcoind.service” and “journalctl -xe” for particulars.

Once I enter sudo journalctl -xe –unit bitcoind I get this:

bitcoind.service - Bitcoin daemon
     Loaded: loaded (/and many others/systemd/system/bitcoind.service; enabled; vendor pres>
     Energetic: failed (Consequence: exit-code) since Wed 2020-12-30 15:12:05 UTC; 23s >
    Course of: 2411 ExecStartPre=/bin/chgrp admin /and many others/bitcoin (code=exited, stat>

Right here is how my bitcoind.service seems to be. I modified the consumer and group from bitcoin to admin.

[Unit]
Description=Bitcoin daemon
After=community.goal

[Service]
ExecStart=/usr/bin/bitcoind -daemon 
                            -pid=/run/bitcoind/bitcoind.pid 
                            -conf=/and many others/bitcoin/bitcoin.conf 
                            -datadir=/var/lib/bitcoind

# Make sure that the config listing is readable by the service consumer
PermissionsStartOnly=true
ExecStartPre=/bin/chgrp admin /and many others/bitcoin

# Course of administration
####################

Kind=forking
PIDFile=/run/bitcoind/bitcoind.pid
Restart=on-failure
TimeoutStopSec=600

# Run as admin:admin
Person=admin
Group=admin

# /run/bitcoind
RuntimeDirectory=bitcoind
RuntimeDirectoryMode=0710

# /and many others/bitcoin
ConfigurationDirectory=bitcoin
ConfigurationDirectoryMode=0710

# /var/lib/bitcoind
StateDirectory=bitcoind
StateDirectoryMode=0710

# Hardening measures
####################
# Present a personal /tmp and /var/tmp.
PrivateTmp=true

# Deny entry to /house, /root and /run/consumer
ProtectHome=true

# Mount /usr, /boot/ and /and many others read-only for the method.
ProtectSystem=full

# Disallow the method and all of its kids to achieve
# new privileges via execve().
NoNewPrivileges=true

# Use a brand new /dev namespace solely populated with API pseudo units
# corresponding to /dev/null, /dev/zero and /dev/random.
PrivateDevices=true

# Deny the creation of writable and executable reminiscence mappings.
MemoryDenyWriteExecute=true

[Install]
WantedBy=multi-user.goal

Listed here are the steps I made earlier than:

~$ cd src
~/src$ git clone --depth 1 --branch v0.20.1 https://github.com/bitcoin/bitcoin.git
~/src$ cd bitcoin
~/src/bitcoin$ ./contrib/install_db4.sh `pwd`
~/src/bitcoin$ ./autogen.sh
~/src/bitcoin$ export BDB_PREFIX='/house/ubuntu/src/bitcoin/db4'
~/src/bitcoin$ ./configure BDB_LIBS="-L${BDB_PREFIX}/lib -ldb_cxx-4.8" BDB_CFLAGS="-I${BDB_PREFIX}/embrace"
~/src/bitcoin$ make
~/src/bitcoin$ sudo make set up 
~/src/bitcoin$ bitcoind -version
vi bitcoin.conf
server=1                              
rpcbind=127.0.0.1                     
whitelist=127.0.0.1                   
rpcallowip=127.0.0.1/32               
zmqpubrawblock=tcp://127.0.0.1:28332  
zmqpubrawtx=tcp://127.0.0.1:28333 

~$ sudo mkdir -p /and many others/bitcoin
~$ sudo cp bitcoin.conf /and many others/bitcoin
~$ sudo chmod 644 /and many others/bitcoin/bitcoin.conf

Utimately I received

ubuntu systemd[1]: Failed to start out Bitcoin daemon.

Related Articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Latest Articles