Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FATAL node/node.go:257 failed to connect to bootstrap nodes. Node shutting down... #15

Open
isReset728 opened this issue Jun 19, 2023 · 3 comments

Comments

@isReset728
Copy link

How to solve it?

@PeaStew
Copy link

PeaStew commented Jul 21, 2023

Having the same issue, node is unable to connect to bootstrapping nodes and shuts itself down, removing the lines means it never connects to anyone

@timurgum
Copy link

timurgum commented Sep 5, 2023

it helped that I regenerated --bootstrap-ips= and --bootstrap-ids= as indicated in the documentation --bootstrap-ips="$(curl -m 10 -sX POST \ --data '{ "jsonrpc":"2.0", "id":1, "method":"info.getNodeIP" }' \ -H 'content-type:application/json;' https://flare.flare.network/ext/info \ | jq -r ".result.ip")" \ --bootstrap-ids="$(curl -m 10 -sX POST \ --data '{ "jsonrpc":"2.0", "id":1, "method":"info.getNodeID" }' \ -H 'content-type:application/json;' https://flare.flare.network/ext/info \ | jq -r ".result.nodeID")"

@hitchhooker
Copy link

resolved with helper script to be executed as pre-exec in .service file

root@flare01:/opt/flare# cat update-flare-config.sh

#!/bin/bash

# Define the path to your configuration file
CONFIG_FILE="/opt/flare/configs/node.json"

# Fetch bootstrap IPs and IDs
BOOTSTRAP_IPS=$(curl -m 10 -sX POST --data '{ "jsonrpc":"2.0", "id":1, "method":"info.getNodeIP" }' -H 'content-type:application/json;' https://flare.flare.network/ext/info | jq -r ".result.ip")
BOOTSTRAP_IDS=$(curl -m 10 -sX POST --data '{ "jsonrpc":"2.0", "id":1, "method":"info.getNodeID" }' -H 'content-type:application/json;' https://flare.flare.network/ext/info | jq -r ".result.nodeID")

# Update the JSON configuration file
jq '. + {"bootstrap-ips": $ips, "bootstrap-ids": $ids}' --arg ips "$BOOTSTRAP_IPS" --arg ids "$BOOTSTRAP_IDS" $CONFIG_FILE > temp.$$.json && mv temp.$$.json $CONFIG_FILE

root@flare01:/opt/flare# cat flarego.service

[Unit]
Description=FlareGo systemd service
StartLimitIntervalSec=0

[Service]
Type=simple
User=flare
LimitNOFILE=32768
WorkingDirectory=/opt/flare/flare-node
ExecStart=/opt/flare/flare-node/avalanchego --config-file=/opt/flare/configs/node.json
ExecStop=kill -9 $MAINPID
Restart=always
RestartSec=5s

[Install]
WantedBy=multi-user.target

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants