Zabbix can't get value from Agent (Interrupted system call)
Asked Answered
P

4

8

I have problem with the setup of zabbix agent on my Ubuntu 10.04 (lucid) server. I have zabbix server on other server and I configured hosts in server and agent how it should be (used zabbix manual), but Zabbix server cannot connect to agent and gives error:

Get value from agent failed: cannot connect to [[{server IP where is agent}]:10050]: [4] Interrupted system call

Server doesn't have a firewall that can create this problem and port is opened.

I very apreciate any help!

Permit answered 3/2, 2014 at 16:21 Comment(0)
A
10

Interrupted system call - I've seen these in zabbix when connections are timed out. tcpdump is your best friend in this case. On the agent host, tcpdump -i any -n tcp port 10050 and see if you get incoming packets, if not, then there is something between the boxes or you don't have proper routing between the boxes or the host configuration in server has wrong IP. If instead you see incoming packets but not outgoing, then you do have a local firewall (iptables). Finally, if you see both incoming and outgoing, then you have to check on the server side if the response from agent gets there. If it does, then, finally, it is a strange situation.

Amyl answered 4/2, 2014 at 8:52 Comment(0)
R
6

I have had a few of these problems. Follow this checklist to help solve your problem:

  1. The hostname in zabbix must match the system host name.

  2. Check if the zabbix agent running

    # ps aux | grep zabbix
    

    You should see something like:

    zabbix   13151  0.0  0.0  80792  1072 ?        S    18:35   0:00 /usr/sbin/zabbix_agentd -c /etc/zabbix/zabbix_agentd.conf
    zabbix   13152  0.0  0.0  80792  1036 ?        S    18:35   0:00 /usr/sbin/zabbix_agentd: collector [idle 1 sec]
    zabbix   13153  0.0  0.0  80792   844 ?        S    18:35   0:00 /usr/sbin/zabbix_agentd: listener #1 [waiting for connection]
    zabbix   13154  0.0  0.0  80792   840 ?        S    18:35   0:00 /usr/sbin/zabbix_agentd: listener #2 [waiting for connection]
    zabbix   13155  0.0  0.0  80792   840 ?        S    18:35   0:00 /usr/sbin/zabbix_agentd: listener #3 [waiting for connection]
    zabbix   13156  0.0  0.0  80792   840 ?        S    18:35   0:00 /usr/sbin/zabbix_agentd: active checks #1 [idle 1 sec]
    root     13159  0.0  0.0  10464   916 pts/0    S+   18:35   0:00 grep --color=auto zabbix
    

If you only see one line, then you have a problem with the agent.

  1. From zabbix, check the connection to target:

    # nc -v -z yourtartget_ip_or_fqdn 10050
    

    You should see:

    Connection to yourtartget_ip_or_fqdn 10050 port [tcp/zabbix-agent] succeeded!

  2. Check if the target can connect to zabbix:

    # nc -v -z  yourtargetzabbix_ip_or_fqdn 10051
    

    You should see:

    Connection to yourtargetzabbix 10050 port [tcp/zabbix-agent] succeeded!

If this all checks out, you have found that restarting the agent solved the problem.

Remember the hostname you put in zabbix must match the host name of the target.

Romonaromonda answered 2/2, 2015 at 21:19 Comment(0)
U
1

change the value of /etc/zabbix/zabbix_agentd.conf and put the ip adress of the zabbix instead of 127.0.0.1 it worked for me

Urbannai answered 27/3, 2018 at 9:54 Comment(0)
V
-2

If you are using linux servers then run the following commands:

systemctl status zabbix-agent

if it is dead

systemctl reload zabbix-agent

systemctl enable zabbix-agent
Varico answered 5/4, 2016 at 11:55 Comment(1)
Traditional versions of Zabbix do not support "reload". Moreover, "reload" would not start a stopped service. Moreover, the "enable" does not start the service (until next reboot). So, this does nothing. A useful command is "restart" instead, since it will also start the service if it's stopped.Hawkweed

© 2022 - 2024 — McMap. All rights reserved.