You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[servers.udp] UDP server initialization fails when IPv6 is disabled in kernel #1064
When debugging certain networks, I may want to explicitly prefer IPv4 or IPv6 depending on what I am debugging. When I do this, my toolset typically supports -4 and -6 CLI flags to force what family of socket I wish to make.
The machine I was reproducing the error on had IPv6 dissbled.
It does not have any UDP probes configured though, just some HTTPS proves to test internet egress and a TCP/22 probe to the machines I am chasing intermittent issues with
Sorry, I said UDP probe, but the snippet I shared is only in the UDP server code. Did you have UDP server configured by any chance? We don't call SetControlMessage(ipv6.FlagDst, true) anywhere else.
Apologies, you're right. I'm juggling too many things
In addition to the configured probesets, my cloudprober config includes a cloudprober_common.cfg, which has the per protocol server configuration and other common settings. Although they're not being used, the UDP server is in fact getting initialised.
No worries. I'll change the title to reflect the actual issue.
This is happening in the UDP server code because there we are using IPv6 connection wrapper to set the control message, regardless of the IP version that user configures, or system detects. But when IPv6 is disabled at the kernel level like what you were trying (not that IPv6 address is not available), kernel doesn't have data structures to support our system call.
Change that introduced this behavior: 8ff8366, earlier we were using appropriate connection based on the destination's IP address, which would have worked correctly.
changed the title [-]Provide CLI flags to explicitly select IPv4 or IPv6 Sockets[/-][+][servers.udp] UDP server initialization fails when IPv6 is disabled in kernel[/+]on Apr 16, 2025
Activity
manugarg commentedon Apr 15, 2025
I think CLI flag itself is an enhancement, but this log message seems to be a bug, where IPv6 connection wrapper for UDP conn is not working:
cloudprober/internal/servers/udp/udp.go
Line 88 in efaad1a
Is that correct? Did you get this message while running on an ipv6 disabled machine?
Also, can you please confirm if you encountered it for UDP probes?
conallob commentedon Apr 15, 2025
The machine I was reproducing the error on had IPv6 dissbled.
It does not have any UDP probes configured though, just some HTTPS proves to test internet egress and a TCP/22 probe to the machines I am chasing intermittent issues with
manugarg commentedon Apr 15, 2025
Sorry, I said
UDP probe, but the snippet I shared is only in the UDP server code. Did you have UDP server configured by any chance? We don't callSetControlMessage(ipv6.FlagDst, true)anywhere else.conallob commentedon Apr 15, 2025
I'm wondering if it's actually
net.Dialer()being called with the default value forDualStackmanugarg commentedon Apr 15, 2025
No, this error message is 100% coming from UDP server initialization code:
cloudprober/internal/servers/udp/udp.go
Line 89 in efaad1a
The whole error message corresponds to that.
conallob commentedon Apr 15, 2025
Apologies, you're right. I'm juggling too many things
In addition to the configured probesets, my cloudprober config includes a cloudprober_common.cfg, which has the per protocol server configuration and other common settings. Although they're not being used, the UDP server is in fact getting initialised.
manugarg commentedon Apr 16, 2025
No worries. I'll change the title to reflect the actual issue.
This is happening in the UDP server code because there we are using IPv6 connection wrapper to set the control message, regardless of the IP version that user configures, or system detects. But when IPv6 is disabled at the kernel level like what you were trying (not that IPv6 address is not available), kernel doesn't have data structures to support our system call.
Change that introduced this behavior: 8ff8366, earlier we were using appropriate connection based on the destination's IP address, which would have worked correctly.
[-]Provide CLI flags to explicitly select IPv4 or IPv6 Sockets[/-][+][servers.udp] UDP server initialization fails when IPv6 is disabled in kernel[/+]manugarg commentedon Apr 16, 2025
Also, I want to call out that with the new image this error message would have been much more clear:
cccd9cd#diff-4dfce68395d663d108da2c51422411841382848ea551bf8b2f0eae7b8da1a52b
[servers.udp] Don't use batched read write if IPv6 is not available.
conallob commentedon Apr 16, 2025
Thank you for the quick fix. I've filed #1068 to track the CLI flag feature
Pity #1067 didn't make it into v0.14.0 though. :-/
[servers.udp] Don't use batched read write if IPv6 is not available. (#…
manugarg commentedon Apr 16, 2025
Yeah, since this bug has a work around and disabling ipv6 at kernel level is a less likely scenario, I'll prefer waiting for the next release.