<p>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</p>
<ul>
<li><p>move the file</p>
<blockquote>
<p>$ which cardano-node</p>
</blockquote>
<blockquote>
<p>~/.local/bin/cardano-node</p>
</blockquote>
<blockquote>
<p>$ cd ~/.local/bin/</p>
</blockquote>
<blockquote>
<p>$ sudo cp cardano-cli /usr/local/bin/</p>
</blockquote>
<blockquote>
<p>$ sudo cp cardano-node /usr/local/bin/</p>
</blockquote>
</li>
<li><p>Set the enviroment in systemd file</p>
<blockquote>
<p>Environment=&quot;LD_LIBRARY_PATH=/usr/local/lib&quot;
Environment=&quot;PKG_CONFIG_PATH=/usr/local/lib/pkgconfig&quot;
Environment=&quot;CARDANO_NODE_SOCKET_PATH=&quot;$HOME/cardano-src/db/node.socket&quot;</p>
</blockquote>
</li>
</ul>

CC BY-SA 4.0
2022-05-23T16:47:24.813Z
2022-05-23T16:48:04.217Z
2022-05-23T16:48:04.217Z
Eric Tsai
<p>I have been trying to run the Cardano node by <strong>systemd</strong> for about 3 days but not getting any luck</p>
<p>I can run <code>startBlockProducingNode.sh</code> manually without error, Cardano node run successfully</p>
<p>The systemd failed with (code=exited, status=127) but did not say any error
Below is the systemd status</p>
<pre><code>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.
</code></pre>
<p>By the way, I'm using ec2 from aws</p>

CC BY-SA 4.0
2022-05-23T00:42:32.733Z
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
MC_Brisbane - JUST Pool
<cardano-node><stake-pool>
systemd auto run stake poll issue (code=exited, status=127)
# systemd auto run stake poll issue (code=exited, status=127)

(Asked by: username_0 on 2022-05-20)

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

**Tags:** cardano-node, stake-pool
> **Comments:**
> **username_1**: 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  

---

## 1 answers

### Answer by username_0 on 2022-05-23. Score: 1

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

  > ~/.local/bin/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"


---

