munin icon indicating copy to clipboard operation
munin copied to clipboard

munin-node broken with latest perl-net-server on ipv4 only node

Open solsticedhiver opened this issue 2 years ago • 8 comments

I have a node that is ipv4 only and does not have any ipv6.

It was working fine until today, where I updated/upgraded all packages (pacman -Syu)

The error in munin-node.log is:

Process Backgrounded
2022/12/09-14:31:21 Munin::Node::Server (type Net::Server::Fork) starting! pid(1114)
Resolved [*]:4949 to [::]:4949, IPv6
Not including resolved host [0.0.0.0] IPv4 because it will be handled by [::] IPv6
Binding to TCP port 4949 on host :: with IPv6
2022/12/09-14:31:21 Can't connect to TCP port 4949 on :: [Invalid argument]
  at line 66 in file /usr/share/perl5/vendor_perl/Net/Server/Proto/TCP.pm
2022/12/09-14:31:21 Server closing!

So seeing that perl-net-server package has been upgraded to 2.013-1. Then, I downgraded it to 2.010-3 (the latest version I had)

This is working now

for the record, this is what I got in munin-node.log, now

Process Backgrounded
2022/12/09-14:48:22 Munin::Node::Server (type Net::Server::Fork) starting! pid(5816)
Resolved [*]:4949 to [::]:4949, IPv6
Not including resolved host [0.0.0.0] IPv4 because it will be handled by [::] IPv6
Binding to TCP port 4949 on host :: with IPv6
Setting gid to "0 0"
2022/12/09-14:50:29 CONNECT TCP Peer: "[::ffff:192.168.44.106]:43812" Local: "[::ffff:192.168.44.117]:4949"

It is still insisting on using ipv6 for ipv4 somehow

solsticedhiver avatar Dec 09 '22 13:12 solsticedhiver

On Fri, Dec 09, 2022 at 05:53:11AM -0800, solsticedhiver wrote:

I have a node that is ipv4 only and does not have any ipv6. It was working fine until today, where I updated/upgraded all packages (pacman -Syu) So seeing that perl-net-server package has been upgraded to 2.013-1. Then, I downgraded it to 2.010-3 (the latest version I had)

what version of munin are you running?

-- cheers, Holger

⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ holger@(debian|reproducible-builds|layer-acht).org ⢿⡄⠘⠷⠚⠋⠀ OpenPGP: B8BF54137B09D35CF026FE9D 091AB856069AAA1C ⠈⠳⣄

It ain't no revolution, just because you can dance to it.

h01ger avatar Dec 09 '22 15:12 h01ger

oops munin-node 2.0.71-1

solsticedhiver avatar Dec 09 '22 15:12 solsticedhiver

On Fri, Dec 09, 2022 at 07:27:41AM -0800, solsticedhiver wrote:

oops munin-node 2.0.71-1

thanks. Debian testing and unstable have the same versions (also 2.013-1 for libnet-server-perl), so it should be possible to reproduce this bug on Debian.

-- cheers, Holger

⢀⣴⠾⠻⢶⣦⠀ ⣾⠁⢠⠒⠀⣿⡁ holger@(debian|reproducible-builds|layer-acht).org ⢿⡄⠘⠷⠚⠋⠀ OpenPGP: B8BF54137B09D35CF026FE9D 091AB856069AAA1C ⠈⠳⣄

A ship is always safe at shore, but that is not what it's built for. (Albert Einstein)

h01ger avatar Dec 09 '22 15:12 h01ger

Testing an Ansible role using molecule. (By the way, check it out https://github.com/sdarwin/Ansible-munin !)

The tests failed on Ubuntu 24.04 with the original poster's error. Can't connect to TCP port 4949 on :: [Invalid argument]

It seems that munin-node (or the latest perl-net-server) depends on ipv6, which docker has disabled. I fixed the molecule tests by enabling ipv6.

echo 0 > /proc/sys/net/ipv6/conf/all/disable_ipv6

sdarwin avatar May 03 '24 16:05 sdarwin

@sdarwin that seems like more of a bug in Docker that it disables IPv6.

kenyon avatar May 03 '24 19:05 kenyon

that seems like more of a bug in Docker that it disables IPv6.

Arguably yes. The problem is Docker instead of Munin. Not sure if anything should be done about it. Either way it can be interesting to know that happens.

sdarwin avatar May 03 '24 19:05 sdarwin

The ipv6 section is guarded by !$ENV{'NO_IPV6'}, running /usr/sbin/munin-node with that env var set works around the issue.

https://github.com/rhandom/perl-net-server/blob/fda98bac1a5fa63bd1f7b04762dafedb86cfad76/lib/Net/Server/Proto.pm#L119

eudoxos avatar Jun 04 '24 06:06 eudoxos