[ZBX-3395] socket() for [[-]:10050] failed with error 22: Invalid argument Created: 2011 Jan 08 Updated: 2017 May 30 Resolved: 2011 Jan 11 |
|
Status: | Closed |
Project: | ZABBIX BUGS AND ISSUES |
Component/s: | None |
Affects Version/s: | 1.8.4 |
Fix Version/s: | None |
Type: | Incident report | Priority: | Major |
Reporter: | Anton Dollmaier | Assignee: | Unassigned |
Resolution: | Won't fix | Votes: | 0 |
Labels: | None | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Debian Lenny 5.0.7 / Squeeze |
Attachments: |
![]() |
Description |
Zabbix agentd quits with following log message: === see forum for detailled information http://www.zabbix.com/forum/showthread.php?p=78303#post78303 |
Comments |
Comment by Anton Dollmaier [ 2011 Jan 10 ] |
Additional information: Building with "--disable-ipv6 --enable-agent" changes nothing, same errors. |
Comment by Alexander Vladishev [ 2011 Jan 11 ] |
This error arises at attempt to run Zabbix agent compiled on version 2.6.27 or above on a platform with a kernel 2.6.26 and lower. |
Comment by Aleksandrs Saveljevs [ 2011 Jan 11 ] |
Note that static linking will not help in this case because it is the socket() system call that does not support SOCK_CLOEXEC flag on earlier kernels. |
Comment by Anton Dollmaier [ 2011 Jan 11 ] |
Solved, indeed. Just bootet the squeeze-VM with 2.6.32-5, agent now works as expected: === Thanks for checking into this! |
Comment by Steve Allison [ 2011 Jan 29 ] |
Can this ticket be reopened? I'm having the same issue (same log lines) on a genuine ipv6 enabled machine, having compiled Zabbix 1.8.4 stable on a 2.6.26 kernel running debian squeeze. Is it just simply that Zabbix 1.8.4 now REQUIRES 2.6.27+ kernel? |
Comment by Steve Allison [ 2011 Jan 29 ] |
Just FYI: I have been through the same troubleshooting steps. a) enabled/disabled ipv6 at configure time b) with ipv4/ipv6 for IP, or blank |
Comment by Anton Dollmaier [ 2011 Jan 29 ] |
The problem is not ZABBIX, it's Debian Squeeze: You HAVE to run Squeeze with 2.6.32! Even compiling on Squeeze does not solve this issue, I assume that libc6 is compiled against 2.6.32 and therefor also ZABBIX agent requries 2.6.27+. If you also have a squeeze-VM running on a lenny XEN Dom0: install linux-image-2.6.32-xen-amd64 in the VM, copy /boot/vmlinuz-2.6.32*, /boot/initrd-2.6.32* and /lib/modules/2.6.32* to the Dom0, change your domU's config to use the new kernel on the dom0 and restart the VM. This works - resulting in Debian squeeze with 2.6.32 kernel, zabbix works. |
Comment by Anton Dollmaier [ 2011 Jan 29 ] |
The problem is not ZABBIX, it's Debian Squeeze: You HAVE to run Squeeze with 2.6.32! Even compiling on Squeeze does not solve this issue, I assume that libc6 is compiled against 2.6.32 and therefor also ZABBIX agent requries 2.6.27+. If you also have a squeeze-VM running on a lenny XEN Dom0: install linux-image-2.6.32-xen-amd64 in the VM, copy /boot/vmlinuz-2.6.32*, /boot/initrd-2.6.32* and /lib/modules/2.6.32* to the Dom0, change your domU's config to use the new kernel on the dom0 and restart the VM. This works - resulting in Debian squeeze with 2.6.32 kernel, zabbix works. |
Comment by Marcel Jäpel [ 2011 Feb 06 ] |
It's not always possible to use Debian Squeeze with kernel > 2.6.26. Many hosting providers use Virtuozzo/OpenVZ. The most of them use a kernel like 2.6.18, 2.6.24 or 2.6.26. Other applications are working in this environment. So I think, something must be done. |
Comment by Anton Dollmaier [ 2011 Feb 06 ] |
I maintain an host in a virtuozzo container with 2.6.18-028stab070.14 and Debian Squeeze - the zabbix agent works flawlessly, although I didn't expect that to happen. The reported bug does not show up here. |
Comment by Marcel Jäpel [ 2011 Feb 06 ] |
I have some systems with OpenVZ and Debian Lenny (2.6.26)/Ubuntu Hardy(2.6.24) on my site. The Debian Squeeze containers have the same problem that is described here. |
Comment by richlv [ 2011 Feb 07 ] |
marcel, have you tried compiling the agent on a platform with kernel 2.6.26 or lower (maybe the same you plan to run it on) ? |
Comment by Paul D. Walker [ 2011 Feb 07 ] |
same problem, compiled on a newer kernal, ran on a 2.6.26 kernel. problem resolved once I compiled on the 2.6.26 kernel. time to upgrade my kernels |
Comment by Marcel Jäpel [ 2011 Feb 07 ] |
I compiled it in a OpenVZ container on a Debian Lenny host (2.6.26 x86_64) and Debian Squeeze (x86_64) inside the container. Problem still exists. |
Comment by AG [ 2012 Jan 31 ] |
I compiled Zabbix 1.8.10 in a xen domU with Debian Squeeze amd64 and libc: 2.11.3-2 and the agentd fails to start in the exact same machine with the same socket error as above. The Zabbix 1.8.2 from the Debian Squeeze repositories run without problems though... |
Comment by Christoph Haas [ 2012 May 31 ] |
Why is this report set to "wont' fix"? The problem apparently still exists for Zabbix agents of version 1.8.11 at least. This is a very annoying issue and I can't figure out how to solve it other than install an ancient 1.8.2 agent on those systems. |
Comment by Christoph Haas [ 2012 May 31 ] |
I believe I found something. This problem happened on Debian GNU/Linux systems where I installed security updates. Apparently it involves kernel updates. A reboot fixes the problem. So perhaps some networking APIs are using parts of the wrong kernel. |
Comment by gescheit [ 2012 Sep 07 ] |
You can build zabbix with -DOLD_LIBC_MODE diff -ur zabbix-2.0.2_orig/src/libs/zbxcomms/comms.c zabbix-2.0.2/src/libs/zbxcomms/comms.c
-#if !defined(SOCK_CLOEXEC)
/****************************************************************************** |
Comment by Vyacheslav Kuznetsov [ 2012 Dec 22 ] |
Just applied gescheit's patch. Now Zabbix-server 2.0.4 runs on Linux kernel 2.6.21. |