Tkd-Alex / dvpn-node-spawner

Dashboard for manage and spawn dvpn-node
GNU General Public License v3.0
11 stars 2 forks source link

Newly Created Node stuck in Continual Restart Loop with Node Status Error: "Connection refused" #5

Closed andylenzwx closed 1 year ago

andylenzwx commented 1 year ago

The truncated output from log is attached below. It appears the node gets stuck each restart due to a missing database file at /root/.sentinelnode/data.db, which you can see first appear on line 9 of the log output attached.

2023-10-26T20:26:10Z INF Starting the Handshake process...
2023-10-26T20:26:10Z INF Starting the VPN service type=1
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.8.0.1/24 dev wg0
[#] ip -6 address add fd86:ea04:1115::1/120 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;
2023-10-26T20:26:10Z INF Opening the database path=/root/.sentinelnode/data.db
Error: unable to open database file: no such file or directory
2023-10-26T20:26:12Z INF Reading the configuration file path=/root/.sentinelnode/config.toml
2023-10-26T20:26:12Z INF Validating the configuration data={"chain":{"gas":200000,"gas_adjustment":1.05,"gas_prices":"0.1udvpn","id":"sentinelhub-2","rpc_addresses":"https://rpc.sentinel.co:443,https://rpc.mathnodes.com:443,https://rpc.sentinel.quokkastake.io:443","rpc_query_timeout":10,"rpc_tx_timeout":30,"simulate_and_execute":true},"handshake":{"enable":true,"peers":8},"keyring":{"backend":"test","from":"operator"},"node":{"gigabyte_prices":"105000ibc/31FEE1A2A9F9C01113F90BD0BBCCE8FD6BBB8585FAF109A2101827DD1D5B95B8,8016ibc/A8C2D23A1E6F95DA4E48BA349667E322BD7A6C996D8A4AAE8BA72E190F3D1477,1068800ibc/B1C0DDB14F25279A2026BC8794E12B259F8BDA546A3C5132CCAEE4431CE36783,106880ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518,14696000udvpn","hourly_prices":"198000ibc/31FEE1A2A9F9C01113F90BD0BBCCE8FD6BBB8585FAF109A2101827DD1D5B95B8,700ibc/A8C2D23A1E6F95DA4E48BA349667E322BD7A6C996D8A4AAE8BA72E190F3D1477,1630000ibc/B1C0DDB14F25279A2026BC8794E12B259F8BDA546A3C5132CCAEE4431CE36783,15000ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518,13000000udvpn","interval_set_sessions":10000000000,"interval_update_sessions":6900000000000,"interval_update_status":3300000000000,"ipv4_address":"","listen_on":"0.0.0.0:7862","moniker":"LittleRocketMan420-WG","remote_url":"https://166.70.14.132:7862","type":"wireguard"},"qos":{"max_peers":250}}
2023-10-26T20:26:12Z INF Creating the IPv4 pool CIDR=10.8.0.2/24
2023-10-26T20:26:12Z INF Creating the IPv6 pool CIDR=fd86:ea04:1115::2/120
2023-10-26T20:26:12Z INF Initializing the keyring backend=test name=sentinel
2023-10-26T20:26:12Z INF Querying the account address=sent1n78e3v8zmzum3c7trxt57l6wl82lqa239jfn88
2023-10-26T20:26:12Z INF Fetching the GeoIP location info...
2023-10-26T20:26:12Z INF GeoIP location info city=Lindon country="United States"
2023-10-26T20:26:12Z INF Performing the internet speed test...
2023-10-26T20:26:35Z INF Internet speed test result data={"download":"29883637","upload":"34167800"}
2023-10-26T20:26:35Z INF Initializing the VPN service type=1
2023-10-26T20:26:35Z INF Starting the Handshake process...
2023-10-26T20:26:35Z INF Starting the VPN service type=1
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.8.0.1/24 dev wg0
[#] ip -6 address add fd86:ea04:1115::1/120 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;
2023-10-26T20:26:36Z INF Opening the database path=/root/.sentinelnode/data.db
Error: unable to open database file: no such file or directory
2023-10-26T20:26:37Z INF Reading the configuration file path=/root/.sentinelnode/config.toml
2023-10-26T20:26:37Z INF Validating the configuration data={"chain":{"gas":200000,"gas_adjustment":1.05,"gas_prices":"0.1udvpn","id":"sentinelhub-2","rpc_addresses":"https://rpc.sentinel.co:443,https://rpc.mathnodes.com:443,https://rpc.sentinel.quokkastake.io:443","rpc_query_timeout":10,"rpc_tx_timeout":30,"simulate_and_execute":true},"handshake":{"enable":true,"peers":8},"keyring":{"backend":"test","from":"operator"},"node":{"gigabyte_prices":"105000ibc/31FEE1A2A9F9C01113F90BD0BBCCE8FD6BBB8585FAF109A2101827DD1D5B95B8,8016ibc/A8C2D23A1E6F95DA4E48BA349667E322BD7A6C996D8A4AAE8BA72E190F3D1477,1068800ibc/B1C0DDB14F25279A2026BC8794E12B259F8BDA546A3C5132CCAEE4431CE36783,106880ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518,14696000udvpn","hourly_prices":"198000ibc/31FEE1A2A9F9C01113F90BD0BBCCE8FD6BBB8585FAF109A2101827DD1D5B95B8,700ibc/A8C2D23A1E6F95DA4E48BA349667E322BD7A6C996D8A4AAE8BA72E190F3D1477,1630000ibc/B1C0DDB14F25279A2026BC8794E12B259F8BDA546A3C5132CCAEE4431CE36783,15000ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518,13000000udvpn","interval_set_sessions":10000000000,"interval_update_sessions":6900000000000,"interval_update_status":3300000000000,"ipv4_address":"","listen_on":"0.0.0.0:7862","moniker":"LittleRocketMan420-WG","remote_url":"https://166.70.14.132:7862","type":"wireguard"},"qos":{"max_peers":250}}
2023-10-26T20:26:37Z INF Creating the IPv4 pool CIDR=10.8.0.2/24
2023-10-26T20:26:37Z INF Creating the IPv6 pool CIDR=fd86:ea04:1115::2/120
2023-10-26T20:26:37Z INF Initializing the keyring backend=test name=sentinel
2023-10-26T20:26:37Z INF Querying the account address=sent1n78e3v8zmzum3c7trxt57l6wl82lqa239jfn88
2023-10-26T20:26:38Z INF Fetching the GeoIP location info...
2023-10-26T20:26:38Z INF GeoIP location info city=Lindon country="United States"
2023-10-26T20:26:38Z INF Performing the internet speed test...
2023-10-26T20:27:01Z INF Internet speed test result data={"download":"85288500","upload":"44478925"}
2023-10-26T20:27:01Z INF Starting the Handshake process...
2023-10-26T20:27:01Z INF Initializing the VPN service type=1
2023-10-26T20:27:01Z INF Starting the VPN service type=1
[#] ip link add wg0 type wireguard
[#] wg setconf wg0 /dev/fd/63
[#] ip -4 address add 10.8.0.1/24 dev wg0
[#] ip -6 address add fd86:ea04:1115::1/120 dev wg0
[#] ip link set mtu 1420 up dev wg0
[#] iptables -A FORWARD -i wg0 -j ACCEPT; iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE; ip6tables -A FORWARD -i wg0 -j ACCEPT; ip6tables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;
2023-10-26T20:27:01Z INF Opening the database path=/root/.sentinelnode/data.db
Error: unable to open database file: no such file or directory
2023-10-26T20:27:02Z INF Reading the configuration file path=/root/.sentinelnode/config.toml
2023-10-26T20:27:02Z INF Validating the configuration data={"chain":{"gas":200000,"gas_adjustment":1.05,"gas_prices":"0.1udvpn","id":"sentinelhub-2","rpc_addresses":"https://rpc.sentinel.co:443,https://rpc.mathnodes.com:443,https://rpc.sentinel.quokkastake.io:443","rpc_query_timeout":10,"rpc_tx_timeout":30,"simulate_and_execute":true},"handshake":{"enable":true,"peers":8},"keyring":{"backend":"test","from":"operator"},"node":{"gigabyte_prices":"105000ibc/31FEE1A2A9F9C01113F90BD0BBCCE8FD6BBB8585FAF109A2101827DD1D5B95B8,8016ibc/A8C2D23A1E6F95DA4E48BA349667E322BD7A6C996D8A4AAE8BA72E190F3D1477,1068800ibc/B1C0DDB14F25279A2026BC8794E12B259F8BDA546A3C5132CCAEE4431CE36783,106880ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518,14696000udvpn","hourly_prices":"198000ibc/31FEE1A2A9F9C01113F90BD0BBCCE8FD6BBB8585FAF109A2101827DD1D5B95B8,700ibc/A8C2D23A1E6F95DA4E48BA349667E322BD7A6C996D8A4AAE8BA72E190F3D1477,1630000ibc/B1C0DDB14F25279A2026BC8794E12B259F8BDA546A3C5132CCAEE4431CE36783,15000ibc/ED07A3391A112B175915CD8FAF43A2DA8E4790EDE12566649D0C2F97716B8518,13000000udvpn","interval_set_sessions":10000000000,"interval_update_sessions":6900000000000,"interval_update_status":3300000000000,"ipv4_address":"","listen_on":"0.0.0.0:7862","moniker":"LittleRocketMan420-WG","remote_url":"https://166.70.14.132:7862","type":"wireguard"},"qos":{"max_peers":250}}
Tkd-Alex commented 1 year ago

This is probably is due folder/permission issue. Docker is unable to write the database file.

Could you please share the output of getfacl -R <sentinel-folder-with-config> ?

Tkd-Alex commented 1 year ago

I've notice that some distro doesn't have acl installed by default. With the latest commit dvpn-node-spawner handle also this as required package.

Please pull the latest version, destroy the container and start a new one.

andylenzwx commented 1 year ago

I've notice that some distro doesn't have acl installed by default. With the latest commit dvpn-node-spawner handle also this as required package.

Please pull the latest version, destroy the container and start a new one.

Hey, sorry about the late follow-up --- I have confirmed your suspicions about acl and confirmed that latest versions have solved the issue. Thanks!