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

Massa node crash if IPV6 is disabled on server. #3650

Closed
AN09111976 opened this issue Mar 6, 2023 · 9 comments · Fixed by #3653
Closed

Massa node crash if IPV6 is disabled on server. #3650

AN09111976 opened this issue Mar 6, 2023 · 9 comments · Fixed by #3653

Comments

@AN09111976
Copy link

Hi,

2023-03-06T14:36:43.442323Z INFO massa_bootstrap::client: Bootstrap from server 158.69.120.215:31245 failed. Your node will try to bootstrap from another server in 1m.
2023-03-06T14:37:43.442960Z INFO massa_bootstrap::client: Start bootstrapping from [2001:41d0:1004:67::]:31245
2023-03-06T14:37:43.445509Z WARN massa_bootstrap::client: Error while connecting to bootstrap server: io error: Address family not supported by protocol (os error 97)
2023-03-06T14:37:43.445649Z INFO massa_bootstrap::client: Bootstrap from server [2001:41d0:1004:67::]:31245 failed. Your node will try to bootstrap from another server in 1m.
2023-03-06T14:38:43.446929Z INFO massa_bootstrap::client: Start bootstrapping from 149.202.89.125:31245
2023-03-06T14:38:50.912205Z INFO massa_bootstrap::client: State bootstrap complete
2023-03-06T14:38:50.945931Z INFO massa_bootstrap::client: Successful bootstrap
2023-03-06T14:38:50.947159Z INFO massa_network_worker: The node_id of this node is: [REMOVED]
thread 'main' panicked at 'could not start network controller: IOError(Os { code: 97, kind: Uncategorized, message: "Address family not supported by protocol" })', massa-node/src/main.rs:301:10
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

On the server IPV6 is disabled globally, but in the massa-node config set IPV4 address explicitly:

[network]
bind = "0.0.0.0:31244"
routable_ip="A.B.C.D"

[bootstrap]
bind = "0.0.0.0:31245"

@AurelienFT
Copy link
Contributor

@Leo-Besancon this is related to the changes you made here : https://github.com/massalabs/massa/blob/main/massa-network-exports/src/establisher.rs#L87 ? How can use only ipv4 now ?

@AN09111976
Copy link
Author

Thanks for the answer. So now is it mandatory to have IPV6 enabled ? For some reasons, I don't need IPV6 running on the server, what should I do ?

@Leo-Besancon
Copy link
Collaborator

Leo-Besancon commented Mar 6, 2023

Hello @AN09111976, can you please tell me your OS and what happens if you keep the default config values for the network and bootstrap bind? ( bind = "[::]:31244" and bind = "[::]:31245")

@AN09111976
Copy link
Author

AN09111976 commented Mar 6, 2023

Linux [hostname] 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Now I've changed config:

[network]
bind = "[::]:31244"
routable_ip="A.B.C.D"

[bootstrap]
bind = "[::]:31245"

Let's see what results it will bring to. Next step, I will remove everything and leave only routable_ip=... clause.

@AN09111976
Copy link
Author

AN09111976 commented Mar 6, 2023

2023-03-06T18:14:55.443713Z INFO massa_bootstrap::client: State bootstrap complete
2023-03-06T18:14:55.774915Z INFO massa_bootstrap::client: Successful bootstrap
2023-03-06T18:14:55.776270Z INFO massa_network_worker: The node_id of this node is: REMOVED
thread 'main' panicked at 'could not start network controller: IOError(Os { code: 97, kind: Uncategorized, message: "Address family not supported by protocol" })', massa-node/src/main.rs:301:10
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

In config:

[network]
routable_ip="A.B.C.D"

There is STILL problem with IPV6 disabled servers.

@Leo-Besancon
Copy link
Collaborator

Thank you, I will try to reproduce on WSL (it works great on my windows with IPv6 disabled) and I will come back to you.

@AN09111976
Copy link
Author

It may helps, IPV6 is disabled GLOBALLY on server:

Here is snip from dmesg:

[ 0.000000] Command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-29-generic root=UUID=04de2bdd-6962-4cb0-92f1-2f70600cc8a9 ro ipv6.disable=1 quiet elevator=noop fsck.repair=yes ipv6.disable=1 crashkernel=512M-:192M

[ 0.060815] Kernel command line: BOOT_IMAGE=/boot/vmlinuz-5.4.0-29-generic root=UUID=04de2bdd-6962-4cb0-92f1-2f70600cc8a9 ro ipv6.disable=1 quiet elevator=noop fsck.repair=yes ipv6.disable=1 crashkernel=512M-:192M

[ 1.241202] IPv6: Loaded, but administratively disabled, reboot required to enable

@Leo-Besancon
Copy link
Collaborator

Indeed, just disabling the ipv6 interface was not enough, killing the ipv6 at the system level reproduced the issue.

@Leo-Besancon Leo-Besancon linked a pull request Mar 6, 2023 that will close this issue
7 tasks
@Leo-Besancon
Copy link
Collaborator

Leo-Besancon commented Mar 7, 2023

A fix for this issue will be included in the next testnet, and you will need to use the config you initialy used:

bind = "0.0.0.0:31244"
routable_ip="A.B.C.D"

[bootstrap]
bind = "0.0.0.0:31245"

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

Successfully merging a pull request may close this issue.

3 participants