bitembassy / home-node

Instructions for setting up a Bitcoin+Lightning node on Ubuntu 18.04
61 stars 10 forks source link

Startup services: Job for bitcoind.service failed because the control process exited with error code. #4

Open ghost opened 5 years ago

ghost commented 5 years ago

I struggled for a few hours to figure this out and it wasn't immediatly clear from the tutorial (for me atleast).

When cloning 'home-node' and running 'sudo cp init/{x,y,z} ... ' , I got the following error:

bitcoind.service - Bitcoin daemon Loaded: loaded (/etc/systemd/system/bitcoind.service; disabled; vendor preset: enabled) Active: failed (Result: exit-code) since Thu 2019-03-21 20:35:41 CET; 10s ago Process: 6701 ExecStart=/usr/bin/bitcoind -daemon -conf=/home/satoshi/.bitcoin/bitcoin.conf -pid=/run/bitcoind/bitcoind.pid (code=exited, status=217/USER)

I eventually fixed the issue by changing the bitcoind.service file in the repository to fix the pointers and username in ExecStart.

In hindsight, this should have been pretty obvious for most users. I would suggest to add this to the tutorial for the inexperienced linux users (like me)

Great guide btw ! thanks for doing this Best,

shesek commented 5 years ago

Thanks for reporting this!

The slides we used during the workshop instructed people to use "satoshi" as their username so that it would match the systemd service files, but this indeed isn't mentioned anywhere on the github readme...

We can either mention using "satoshi" as the username (under "Preparing the environment"?), or add instructions for changing the username in the service files under "Startup services" (something like sed -i s/satoshi/$USER/g init/*.service should do the trick).

@sha-265 @yoss1x thoughts?

sha-265 commented 5 years ago

I think the second solution is more elegant, not limiting the username to specific one.