0

我有一个运行 Hyperledger Besu 节点的 Ubuntu 服务器,但如果我与服务器断开连接,我最好的节点将停止工作,我必须重新启动所有节点。

我怎样才能让我的 Besu 节点始终保持运行?即使我与 ssh 断开连接

4

1 回答 1

1

启用 Bezu 节点作为服务。

例子:

  1. 创建服务/vol/hbesu/node2/besu-node2.service:

    [Unit]
     Description=Besu client
     DefaultDependencies=no
     After=syslog.target network.target
     [Service]
     User=admin-besu
     Group=admin-besu
     Type=simple
     ExecStart=/usr/local/besu-21.1.0-RC1/bin/besu --data-path=/vol/hbesu/node2/data --bootnodes=enode://ae70183
     KillMode=process
     KillSignal=SIGINT
     TimeoutStopSec=90
     Restart=on-failure
     RestartSec=5s
     [Install]
     WantedBy=multi-user.target
    

sudo cp /vol/hbesu/node2/besu-node2.service /usr/lib/systemd/system/

  1. 启动服务:

    sudo systemctl daemon-reload

    sudo systemctl enable besu-node2.service

    sudo systemctl start besu-node2.service

    sudo systemctl status -l besu-node2.service

于 2022-01-11T06:08:45.080 回答