munin-monitoring / munin

Main repository for munin master / node / plugins
http://munin-monitoring.org
Other
1.95k stars 469 forks source link

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

Open solsticedhiver opened 1 year ago

solsticedhiver commented 1 year ago

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

h01ger commented 1 year ago

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.

solsticedhiver commented 1 year ago

oops munin-node 2.0.71-1

h01ger commented 1 year ago

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)

sdarwin commented 2 months ago

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
kenyon commented 2 months ago

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

sdarwin commented 2 months ago

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.

eudoxos commented 1 month ago

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