Configuring SNMP fails with the error: Agent not responding, connect uds socket failed
search cancel

Configuring SNMP fails with the error: Agent not responding, connect uds socket failed

book

Article ID: 305185

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

Symptoms:
  • Cannot configure SNMP using CLI or esxcli
  • Configuring SNMP using CLI or esxcli fails
  • You see the error:

    Agent not responding, connect uds socket(/var/run/snmp.ctl) failed 2, err= No such file or directory

  • In the strace of snmpd, you see an error similar to:

    open("/vmfs/volumes/4b8e7c33-0948b0dc-a04d-001b7857e5c2", O_RDONLY|O_NOCTTY) = 4
    trace: ptrace(PTRACE_SYSCALL, ...): No such file or directory


Environment

VMware vSphere ESXi 5.1

Cause

This issue occurs if the custom scratch location is missing in the ESXi host.

Resolution

To resolve this issue, either create the directory for the scratch according to the scratch config settings in advanced settings of the host or set the scratch location to a valid location and then reboot the host.

Sample commands to set up SNMP via esxcli

esxcli system snmp set -r
esxcli system snmp set -e false
esxcli system snmp set --communities public
esxcli system snmp set --targets 10.0.3.100@162/public
esxcli system snmp set -l debug
esxcli system snmp set -e true
snmpd start
esxcli system snmp test