VMware Cloud Community
bazzab
Contributor
Contributor

esxi 5.1 snmp error

Hi

I have many 5.1 esxi servers licenced in a vcenter, some work with snmp some dont, the error I get is:

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

I start the agent and after a few seconds it stops again with out of memory error

260GB ram 64 cores

Any ideas?

0 Kudos
10 Replies
admin
Immortal
Immortal

What to check?

How to check /fix?

  • SNMP agent status
  • From vSphere command-line (vCLI) run following command:

vicfg-snmp.pl --server <server name> --show

  • View configuration of snmp.xml (from ESXi console prompt)

# cat /etc/vmware/snmp.xml

  • On ESXi 5.1(from ESXi console prompt)

esxcli system snmp get or /etc/init.d# ./snmpd -status

  • Community Name
  • From vSphere command-line (vCLI) run following command:

vicfg-snmp.pl --server <server name> --show

  • View configuration of snmp.xml (from ESXi console prompt)

# cat /etc/vmware/snmp.xml

  • On ESXi 5.1(from ESXi console prompt)

esxcli system snmp get

  • Open ports in firewall
  • Using vSphere client check SNMP port in firewall (default port is 161)

In vSphere Client >> Host >> Configuration >> Security Profile

Other things to try:

What to do?

How to check /fix?

Restart SNMP agent

  • Check by restarting hostd (from ESXi console)

/etc/init.d/host restart

  • Check by restarting the management agents (from DCUI of ESXi)

DCUI >> Troubleshooting Options >> Restart Management Agents

Send Test Trap

  • From vSphere command-line (vCLI) run following command:

vicfg-snmp.pl --server hostname --test

Reset and reconfigure the SNMP agent

  • From vSphere command-line (vCLI) run following command to reset/clear all previously specified communities and targets, and configure it again

vicfg-snmp.pl --server <server name>  --reset

Reset any previously configured trap filter

  • Clear the list of notraps OID

vicfg-snmp.pl --server <server name>  -- notraps reset

Verify MIB files on Management System

  • Check that required VMware MIB files are loaded in the Management System. You may need to refer to Management Server documentation.

Use snmpwalk utility

  • If you have access to any Linux system having snmpwalk binaries verify the ESXi host using it.
bazzab
Contributor
Contributor

Thanks for the helpfull info.

I have tried all these

The result is that the snmpd status is not running, I can start it but it stops with out of memory error.

I have changed the snmp.xml file to be the same as a running instance with no luck

esxcli network firewall ruleset list | grep snmp = true

esxcli network ip connection list | grep 161 does not contain 0 0 0.0.0.0:161 0.0.0.0:0 423798 snmpd (as on a working box)

esxcli network firewall ruleset rule list | grep -i snmp does contain snmp Inbound UDP Dst 161 161 as in a working box

0 Kudos
jrmunday
Commander
Commander

Can you run and post the results of the --show command;

vicfg-snmp.pl --server esx01 --username root --password aaaaaaaaaaaa --show

You should see something like this;

===============================

Current SNMP agent settings:
Enabled  : 1
UDP port : 161


Communities :
public
anothercommunity


Notification targets :
mysnmptarget1.fqdn@162/public
mysnmptarget2.fqdn@162/anothercommunity


Options :
EnvEventSource=sensors

===============================

vExpert 2014 - 2022 | VCP6-DCV | http://www.jonmunday.net | @JonMunday77
0 Kudos
bazzab
Contributor
Contributor

Current SNMP agent settings:
Enabled : 1
UDP port : 161

Communities :
abc123

Notification targets :
10.217.123.1@161/abc123

Options :
EnvEventSource=indications

engineid=00000063000000a10ad8308e

loglevel=info

0 Kudos
jrmunday
Commander
Commander

Does this look the same on a host that does not have this "out of memory" error?

vExpert 2014 - 2022 | VCP6-DCV | http://www.jonmunday.net | @JonMunday77
0 Kudos
bazzab
Contributor
Contributor

Only the engineid has incremented by 1, otherwise the same

0 Kudos
MarekZdrojewski

Anyone ever solved this issue?

I'm having exactly the same with one of the servers here. Clean install did not help...

I'm also getting the following error several times before the snmp service quits with "out of memory".

snmpd,"fetch_fixed_disk_status: smart_open(naa.60a98000646648654c34657143504344) failed, reporting unknown health state"
Any idea's?
| Blog: https://defaultreasoning.com | Twitter: @MarekDotZ |
0 Kudos
bazzab
Contributor
Contributor

Hi Marek.Z

Issue not resolved yet

Your issue will be a full disk

Log on to the Host navigate to /var/ spool/snmp dir

delete the files in there

For some reason this dir fills up when the snmp does not work

0 Kudos
MarekZdrojewski

Hi bazzab,

Thanks for pointing that out.

I've solved the problem. In my case, I've installed a fresh copy of ESXi and renamed the vmnic naming in esx.conf. This caused issue with already configured SNMP service. I've reinstalled the host, renamed the vnmics and than configured the SNMP. Everything works fine.

Cheers!

| Blog: https://defaultreasoning.com | Twitter: @MarekDotZ |
0 Kudos
amatteo78
Contributor
Contributor

Hi,

i have same problem, snmp start, i try snmpwalk from other server and agent stop.

I dont know why...

i cant fresh install esxi, can i change vmnic name without fresh install ?

what write ?? In esx.conf instead "vmnic0" ?

thanks

0 Kudos