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

check_gearman is unable to parse IPv6 addresses #177

Open
lamaral opened this issue Oct 5, 2024 · 1 comment
Open

check_gearman is unable to parse IPv6 addresses #177

lamaral opened this issue Oct 5, 2024 · 1 comment

Comments

@lamaral
Copy link

lamaral commented Oct 5, 2024

I tried using check_gearman against a server running with IPv6 only but I have been unsuccessful when using an IPv6 literal:

luiz@box:~$ /usr/lib/nagios/plugins/check_gearman -H ::1 -w 100 -c 200 -W 10 -C 20 -t 10
check_gearman CRITICAL - failed to connect to address 0.0.0.0 and port 0: Connection refused

luiz@box:~$ /usr/lib/nagios/plugins/check_gearman -H [::1] -w 100 -c 200 -W 10 -C 20 -t 10
check_gearman CRITICAL - Name or service not known

When I use a hostname, it works fine:

luiz@box:~$ /usr/lib/nagios/plugins/check_gearman -H localhost -w 100 -c 200 -W 10 -C 20 -t 10
check_gearman CRITICAL - Queue hostgroup_....

This last case is working over IPv6, as gearmand is listening on IPv6 only.

I dug a little bit and it seems like the issue originates during the address/port splitting in add_server() in common/utils.c.

My question now is: Would you accept a patch where the function is extended to properly parse IPv6 addresses specified within square brackets (i.e [::1]:4730)?

@sni
Copy link
Owner

sni commented Oct 7, 2024

Sure, a PR is always welcome. But we are in the process of migrating
the tools around the neb module to go, so there is a check_gearman included over here:

You can give it a try, maybe it works with ipv6 already

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

No branches or pull requests

2 participants