[ZBX-9486] Remote port monitoring problem with net.tcp.port. Created: 2015 Apr 15  Updated: 2017 Oct 25  Resolved: 2017 Oct 25

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Agent (G)
Affects Version/s: 2.4.4
Fix Version/s: None

Type: Incident report Priority: Minor
Reporter: ufocek Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: tcp
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Debian 7.7 x64, zabbix-agent 1:2.4.4-1+wheezy

Zabbix-server Debian 7.7 x64, zabbix-server 2.4.4



 Description   

Hi,
I want to monitor one port of my remote box, so I crate a item zabbix using a net.tcp.port[192.168.101.1,443] then I create a trigger expression:

{RemoteBox:net.tcp.port[192.168.101.1,443].last()}

=0.
In the last step I create a action, then I change port from 443 to 444 but I still get result "1" not "0".
In zabbix agent log I have error:

666:20150415:084619.367 active checks #1 [idle 1 sec]
661:20150415:084619.367 collector [processing data]
661:20150415:084619.367 In update_cpustats()
661:20150415:084619.367 End of update_cpustats()
661:20150415:084619.367 collector [idle 1 sec]
663:20150415:084620.326 TCP expect network error: cannot connect to [[192.168.101.1]:443]: [4] Interrupted system call

zabbix-agent cannot connect to port 443, but result all the thime is "1".



 Comments   
Comment by Aleksandrs Saveljevs [ 2015 Apr 15 ]

Cannot reproduce currently. Could you please post a longer DebugLevel=4 log of the agent? Also, what Timeout settings do you have on the agent and the server?

Comment by richlv [ 2015 Apr 15 ]

I change port from 443 to 444

cannot connect to [[192.168.101.1]:443]

notice the port still being 443. did you wait for the configuration cache to update ? also, if the connection fails on 443, did the item really return 1 on this host ?

Comment by ufocek [ 2015 Apr 15 ]

Aleksandrs - ok I change to DebugLevel=4 and what exactly Timeout settings in zabbix-server ?

Richlv - I change port 443 to 444 on remove device to check the trigger and action notification.. When I changed port, zabbix should change status from 1 to 0 and send notification, when the port 443 is not available?

Comment by Aleksandrs Saveljevs [ 2015 Apr 15 ]

Aleksandrs - ok I change to DebugLevel=4 and what exactly Timeout settings in zabbix-server ?

In zabbix_agentd.conf and zabbix_server.conf, you should have Timeout configuration option (e.g., Timeout=3). What are the values of this setting in your installation?

Comment by ufocek [ 2015 Apr 15 ]

In zabbix-agent.conf and server I have set default value Timeout=3

Comment by ufocek [ 2015 Apr 15 ]

I check the same configuration with different box, and it's working very good. There I have zabbix-agent 2.4.3 version for Debian 7 x64.....

Comment by Dumitru Moldovan [ 2016 Mar 23 ]

I encountered the same problem with the official 2.2.9 and 2.2.11 LTS versions from your repo on Ubuntu 14.04. Interestingly, when adding a Timeout option to our Zabbix agent config, it started to work (no Timeout option present in our server config). However, after the checked remote port was opened and then closed (to verify that adding the Timeout option fixed this consistently), the item became "Not supported" when the remote host/port dissapeared.

The error in the debug logs of the agent:

8654:20160323:144438.552 Requested [net.tcp.port[nades-hmc.chevah.com,443]]
8653:20160323:144438.784 collector [processing data]
8653:20160323:144438.784 In update_cpustats()
8653:20160323:144438.784 End of update_cpustats()
8653:20160323:144438.784 collector [idle 1 sec]
8655:20160323:144439.569 listener #2 [processing request]
8655:20160323:144439.570 Requested [system.cpu.util[,interrupt]]
8655:20160323:144439.570 Sending back [0.000000]
8655:20160323:144439.570 listener #2 [waiting for connection]
8653:20160323:144439.784 collector [processing data]
8653:20160323:144439.784 In update_cpustats()
8653:20160323:144439.785 End of update_cpustats()
8653:20160323:144439.785 collector [idle 1 sec]
8656:20160323:144440.629 listener #3 [processing request]
8656:20160323:144440.630 Requested [system.cpu.util[,iowait]]
8656:20160323:144440.630 Sending back [5.550566]
8656:20160323:144440.630 listener #3 [waiting for connection]
8653:20160323:144440.785 collector [processing data]
8653:20160323:144440.785 In update_cpustats()
8653:20160323:144440.785 End of update_cpustats()
8653:20160323:144440.785 collector [idle 1 sec]
8654:20160323:144441.552 TCP expect network error: cannot connect to [[nades-hmc.chevah.com]:443]: [4] Interrupted system cal
l
8654:20160323:144441.553 Sending back [0]
8654:20160323:144441.553 Got signal [signal:13(SIGPIPE),sender_pid:8654]. Ignoring ...
8654:20160323:144441.553 Process listener error: ZBX_TCP_WRITE() failed: [32] Broken pipe

A similar (working) item/trigger combo where the checked host/port is up:

9647:20160323:145434.852 Requested [net.tcp.port[eliseni-hmc.chevah.com,443]]
9647:20160323:145434.853 Sending back [1]

I think the problem exhibits itself when the remote host is missing.

Unfortunately, this makes the net.tcp.port checks unreliable for us. Any solutions/workarounds for this?

Comment by richlv [ 2016 Jun 30 ]

dumol, that seems like a different problem (and i don't think adding the timeout param actually changed anything - if it's not specified, the default is 3 anyway).
note that zabbix 3.0 changed the default param in the config file from 3 to 4 - otherwise agent timeout after the server had already closed the connection and the item would simply turn unsupported, as you observed.

as for the original reporter, i slightly suspect that the problem might be similar - the item timed out, thus got no new values, and they missed the fact that the item is unsupported.

can anybody actually reproduce a problem where a port is closed or otherwise unreachable and zabbix agent returns 1 ?

Generated at Sat May 10 08:05:10 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.