GETHサービスの起動中に問題が発生しました

GETHサービスの起動中に問題が発生しました

systemdサービスの起動に問題がありますgeth

サービス仕様ですgeth.service

[Unit]
Description=Geth

[Service]
Type=simple
User=eth
Restart=always
RestartSec=12
ExecStart=/home/eth/starteth.sh

[Install]
WantedBy=default.target

これはstarteth.shスクリプトです。

#!/usr/bin/env bash
geth --syncmode "fast" --rpc --rpcport "9820" --rpcaddr "127.0.0.1" --rpccorsdomain "*"

サービスの開始およびヘルスチェック中にエラーが発生しました。

root@server:~# sudo systemctl start geth
root@server:~# sudo systemctl status geth
● geth.service - Geth
   Loaded: loaded (/etc/systemd/system/geth.service; enabled; vendor preset: enabled)
   Active: activating (auto-restart) (Result: exit-code) since Wed 2021-06-16 22:02:51 CEST; 3s ago
  Process: 19295 ExecStart=/home/eth/starteth.sh (code=exited, status=203/EXEC)
 Main PID: 19295 (code=exited, status=203/EXEC)

編集:OSはUbuntu 18です。

ベストアンサー1

これはどこかに実行可能ファイルをstarteth.sh見つけることを期待するシェルスクリプトですが、systemdは非常に少ないファイルを使用しているため、見つからない可能性があります。そのような文書はどこにありますか?試してみてください。次に、inの前に正しい絶対パスを追加します。geth$PATH$PATHlocate gethfind / -name gethgethstarteth.sh

おすすめ記事