I have been trying to run the Cardano node by systemd for about 3 days but not getting any luck

I can run startBlockProducingNode.sh manually without error, Cardano node run successfully

The systemd failed with (code=exited, status=127) but did not say any error Below is the systemd status

May 20 15:40:56 systemd[1]: Started Cardano node service.
May 20 15:40:56 systemd[1]: cardano-node.service: main process exited, code=exited, status=127/n/a
May 20 15:40:56 systemd[1]: Unit cardano-node.service entered failed state.
May 20 15:40:56 systemd[1]: cardano-node.service failed.
May 20 15:41:01 systemd[1]: cardano-node.service holdoff time over, scheduling restart.
May 20 15:41:01 systemd[1]: Stopped Cardano node service.

By the way, I'm using ec2 from aws

  • Can you post your systemd settings into your question for us to review. There is a good chance that more environment settings need to be set, when compared to your user that runs the script successfully. Also check your system logs for any extra details eg permissions issues May 23, 2022 at 0:42

2 Answers 2


I have solved the issue by myself, here is the solution: The solution for those who followed the Cardano developer portal to build the stake pool but failed to use systemd to start

  • move the file

    $ which cardano-node


    $ cd ~/.local/bin/

    $ sudo cp cardano-cli /usr/local/bin/

    $ sudo cp cardano-node /usr/local/bin/

  • Set the enviroment in systemd file

    Environment="LD_LIBRARY_PATH=/usr/local/lib" Environment="PKG_CONFIG_PATH=/usr/local/lib/pkgconfig" Environment="CARDANO_NODE_SOCKET_PATH="$HOME/cardano-src/db/node.socket"


it might be a permission-related issue. Make sure you are running the systemd service with the user you manually run ./startBlockProducingNode.sh

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.