EC2 AWS cardano-node.service failed

Hello Cardano Crew,
I am facing some issues with my
AWS EC2 “Amazon Linux 2 AMI (HVM) - Kernel 5.10, SSD Volume Type” node with


cardano-node.service - Cardano node service
   Loaded: loaded (/etc/systemd/system/cardano-node.service; enabled; vendor preset: disabled)
   Active: activating (auto-restart) (Result: exit-code) since Son 2022-01-09 22:04:17 UTC; 3s ago
  Process: 4510 ExecStart=/bin/bash -c /home/ec2-user/relay2/ (code=exited, status=127)
 Main PID: 4510 (code=exited, status=127)

Jän 09 22:04:17 systemd[1]: cardano-node.service: main process exited, code=exited, status=127/n/a
Jän 09 22:04:17 systemd[1]: Unit cardano-node.service entered failed state.
Jän 09 22:04:17 systemd[1]: cardano-node.service failed.

journalctl -e -f -u cardano-node.service -->
 /usr/local/bin/cardano-node: error while loading shared libraries: cannot open shared object file: No such file or directory

I have set the follwing path in my .bashrc

export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"

and in ~/.bash_profile I have added:

export PATH
test -f ~/.bashrc && source ~/.bashrc # --> only this line was added

if I run:

/bin/bash -c /home/ec2-user/relay2/

it works and tips get extended.

I am really at the end of my ideas.

I would kindly ask for some support.


BTW: I think I have produced my first block today :slight_smile:

How did you build your node? cntools? coincashew guide?

build with Installing cardano-node and cardano-cli from source | Cardano Developer Portal

“coincashew guide” for

You probably need to add the LD_LIBRARY_PATH environment variable containing the path where libsodium is in the startup file for your cardano-node service (/home/ec2-user/relay2/
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
I remember doing this on at least one server, and also recommending it to some other people and this solved their issue, but I cannot find it on my servers now. But recommend you to try this, if you still have the issue.

1 Like

That’s it - thanks you so much.

1 Like