SUSE Support

Here When You Need Us

hp-snmp-agents keeps listening socket open when receiving HUP signal from logrotate

This document (7010686) is provided subject to the disclaimer at the end of this document.

Environment

SUSE Linux Enterprise Server 11 Service Pack 1
 

Situation

hp-snmp-agents-8.7.0.23-18
hp-snmp-agents-9.1.0.57-52.sles11

On SLES11SP1 logrotate send a kill -HUP to the net-snmpd daemon. If the HP support pack is installed, this will restart hp-snmp-agents but the Cmax module will keep its listening port open.
The following error message can be found in /var/log/net-snmpd.log:
 
cmaX: bind() failed: Address already in use (errno=98)

Checking /proc/<pid-of-snmpd>/fd the following can be seen:
 
# ls -l /proc/20380/fd
lrwx------ 1 root root 64 May 24 21:13 0 -> /dev/null
lrwx------ 1 root root 64 May 24 21:13 1 -> /dev/null
lrwx------ 1 root root 64 May 24 21:13 10 -> socket:[475794478]
lrwx------ 1 root root 64 May 24 21:26 12 -> socket:[476064548]
lrwx------ 1 root root 64 May 24 21:13 2 -> /dev/null
l-wx------ 1 root root 64 May 24 21:13 3 -> /var/log/net-snmpd.log
lr-x------ 1 root root 64 May 24 21:13 4 -> pipe:[475794401]
l-wx------ 1 root root 64 May 24 21:13 5 -> pipe:[475794401]
lr-x------ 1 root root 64 May 24 21:13 6 -> /etc/sensors.conf

For each received HUP signal, a new socket will get opened.

Resolution

Please contact the Hewlett-Packard support department for a fixed version of hp-snmp-agents.

Workaround for logrotate:

The HUP signal is send from /etc/logrotate.d/net-snmp. At the end of the file there is an entry:
 
/etc/init.d/net-snmpd try-reload

Please change this to:
 
/etc/init.d/net-snmpd try-restart

try-restart sends a TERM signal which reliably closes the port and socket.

Cause

This is an issue with the libcmaX64 module of the hp-snmp-agents package.

Disclaimer

This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.

  • Document ID:7010686
  • Creation Date: 27-Aug-2012
  • Modified Date:28-Sep-2022
    • SUSE Linux Enterprise Server

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.