我在启动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
发布于 2023-04-26 13:33:23
正如上面提到的定位geth的答案,所以是的,文件geth存在/usr/bin/geth
但是这个错误开始了
已加载(/etc/systemd/system/ geth.service;启用;供应商预置:已启用) Active:(结果:退出代码)自Wed 2023-04-26 13:17:37 UTC;2分钟46秒前进程: 2862 ExecStart=/usr/bin/geth -networkid 9988 -datadir/opt/ethpoa2 2/code 1/data-port 30303 --ipcdisable >主PID: 2862 (状态=217/CPU):1ms
4月26日13:17:37 ip-172-31-87-252系统1:geth.service: Failed和结果'exit-code‘。程序26 13:17:37 ip-172-31-87-252系统1:geth.service:计划重新启动作业,重新启动计数器位于5。4月26日13:17:37 ip-172-31-87-252 systemd1:Stopped go client。4月26日13:17:37 ip-172-31-87-252系统1:geth.service:启动请求重复过快。4月26日13:17:37 ip-172-31-87-252系统1:geth.service: Failed和结果'exit-code‘。4月26日13:17:37 ip-172-31-87-252系统1:未能启动systemd客户端。
https://unix.stackexchange.com/questions/654556
复制相似问题