user2257: i'm trying to run a node as a service using systemctl start node-relay.service
i get this error, can anyone advise what i'm doing wrong.
/home/ec2-user/.local/bin/cardano-node: error while loading shared libraries: libsodium.so.23: cannot open shared object file: No such file or directory
my node-relay.service file looks like this
Description= relay node
After=multi-user.target

[Service]
Type=simple
EnvironmentFile=/home/ec2-user/relay/node.environment
ExecStart=/home/ec2-user/.local/bin/cardano-node run --config $CONFIG --topology $TOPOLOGY --database-path $DBPATH --socket-path $SOCKETPATH --host-addr $HOSTADDR --port $PORT
KillSignal = SIGINT
RestartKillSignal = SIGINT
StandardOutput=journal
StandardError=journal
SyslogIdentifier=cardano-node

LimitNOFILE=32768

Restart=on-failure
RestartSec=15s
WorkingDirectory=~
User=ec2-user
Group=ec2-user

[Install]
WantedBy=multi-user.target

my .bashrc file contains
export LD_LIBRARY_PATH="/usr/local/lib:$LD_LIBRARY_PATH"
export PKG_CONFIG_PATH="/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"
export PATH="~/.local/bin:$PATH"

the node starts fine if it run it like this;
cardano-node run --config ~/relay/testnet-config.json --database-path ~/relay/db --socket-path ~/relay/db/node.socket --host-addr 0.0.0.0 --port 3000

user2434: The environment variables need to be added to the /home/ec2-user/relay/node.environment file. Or you can specify them directly in node-relay.service file.
[Service]
Type=simple
Environment="LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH"
Environment="PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH"

...



2257: <p>i'm trying to run a node as a service using <code>systemctl start node-relay.service</code></p>
<p>i get this error, can anyone advise what i'm doing wrong.</p>
<p><code>/home/ec2-user/.local/bin/cardano-node: error while loading shared libraries: libsodium.so.23: cannot open shared object file: No such file or directory</code></p>
<p>my node-relay.service file looks like this</p>
<pre><code>Description= relay node
After=multi-user.target

[Service]
Type=simple
EnvironmentFile=/home/ec2-user/relay/node.environment
ExecStart=/home/ec2-user/.local/bin/cardano-node run --config $CONFIG --topology $TOPOLOGY --database-path $DBPATH --socket-path $SOCKETPATH --host-addr $HOSTADDR --port $PORT
KillSignal = SIGINT
RestartKillSignal = SIGINT
StandardOutput=journal
StandardError=journal
SyslogIdentifier=cardano-node

LimitNOFILE=32768

Restart=on-failure
RestartSec=15s
WorkingDirectory=~
User=ec2-user
Group=ec2-user

[Install]
WantedBy=multi-user.target
</code></pre>
<p>my .bashrc file contains</p>
<pre><code>export LD_LIBRARY_PATH=&quot;/usr/local/lib:$LD_LIBRARY_PATH&quot;
export PKG_CONFIG_PATH=&quot;/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH&quot;
export PATH=&quot;~/.local/bin:$PATH&quot;
</code></pre>
<p>the node starts fine if it run it like this;</p>
<p><code>cardano-node run --config ~/relay/testnet-config.json --database-path ~/relay/db --socket-path ~/relay/db/node.socket --host-addr 0.0.0.0 --port 3000</code></p>
 2434: <p>The environment variables need to be added to the <code>/home/ec2-user/relay/node.environment</code> file. Or you can specify them directly in <code>node-relay.service</code> file.</p>
<pre><code>[Service]
Type=simple
Environment=&quot;LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH&quot;
Environment=&quot;PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH&quot;

...

</code></pre>
