[ZBX-18951] Zabbix server: TCP CLOSE_WAIT until forever with media type slack Created: 2021 Feb 01  Updated: 2021 Mar 29

Status: Confirmed
Project: ZABBIX BUGS AND ISSUES
Component/s: Server (S)
Affects Version/s: 5.0.8
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Steffen Scheib Assignee: Zabbix Development Team
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

Steps to reproduce:

 

root@zabbix:/home/steffen# ss -ano | grep CLOSE-WAIT
root@zabbix:/home/steffen# 
  • Create a new host with an unassigned IP address within your network and add the Template  Template Module ICMP Ping
  • Wait __ a few minutes, until you receive the alert in Slack
  • Check back for CLOSE_WAIT sockets on the Zabbix server:

 

root@zabbix:/home/steffen# ss -ano | grep CLOSE-WAIT
tcp   CLOSE-WAIT 40     0                                            10.10.20.8:47818                  3.123.248.34:443                                         
root@zabbix:/home/steffen# 
  • Create another host (same procedure as before, with another unassigned IP) - or provoke an error otherwise of course.
  • Wait again for the alert to show up in Slack
  • Check one more time for CLOSE_WAIT sockets

 

root@zabbix:/home/steffen# ss -ano | grep CLOSE-WAIT
tcp   CLOSE-WAIT 40     0                                            10.10.20.8:59914                  3.123.248.34:443                                         
tcp   CLOSE-WAIT 40     0                                            10.10.20.8:47818                  3.123.248.34:443                                         
root@zabbix:/home/steffen# 
  • Restart zabbix-server to verify, that CLOSE_WAIT sockets are gone, after the application exits

 

root@zabbix:/home/steffen# systemctl restart zabbix-server
root@zabbix:/home/steffen# ss -ano | grep CLOSE-WAIT
root@zabbix:/home/steffen# 

Result:

With every new alert a new CLOSE_WAIT socket will spawn and the server will eventually run out of open ports.
Expected:
No leaking sockets/CLOSE_WAIT sockets

 

Initially I "reported" the issue back in the beginning of 2020 [here|https://www.zabbix.com/forum/zabbix-troubleshooting-and-problems/394351-zabbix-4-4-5-slack-media-type-tcp-close-wait]and here.

I guess nobody is monitoring for CLOSE_WAIT sockets or is not making use of the webhooks.

BTW: The same can be reproduced with Discord as media type.

 



 Comments   
Comment by Steffen Scheib [ 2021 Feb 01 ]

Unfortunately, I am unable to edit the issue, so here the corrected link for the second "here":

https://support.zabbix.com/browse/ZBXNEXT-5562?focusedCommentId=402983&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-402983

Generated at Sat Jun 28 07:12:44 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.