سؤال

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!

هل كانت مفيدة؟

المحلول

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.

نصائح أخرى

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.

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

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
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top