LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   snmpd running but not responding (https://www.linuxquestions.org/questions/linux-server-73/snmpd-running-but-not-responding-717526/)

jnojr 04-07-2009 04:35 PM

snmpd running but not responding
 
RHEL5, net-snmp-5.3.2.2-5.el5

[root@mda-services ~]# service snmpd status
snmpd (pid 27340) is running...
[root@mda-services ~]# snmpwalk -v 2c localhost -c public
Timeout: No Response from localhost

It's been a long time since I've mucked with an snmpd.conf and I seem to remember needing to change something in the stock file to make it go.

TB0ne 04-08-2009 09:33 AM

Quote:

Originally Posted by jnojr (Post 3501706)
RHEL5, net-snmp-5.3.2.2-5.el5

[root@mda-services ~]# service snmpd status
snmpd (pid 27340) is running...
[root@mda-services ~]# snmpwalk -v 2c localhost -c public
Timeout: No Response from localhost

It's been a long time since I've mucked with an snmpd.conf and I seem to remember needing to change something in the stock file to make it go.

Have you tried v1 or v3, instead of 2c? From what I remember, 2c needed other connection info, more than just the community string. And have you tried the 127.0.0.1, instead of localhost?

Also, check your IPtables..see if there's anything blocking ports 161 and 162....

kirukan 04-08-2009 12:15 PM

I have checked my system with below mentioned snmp.conf, snmp working fine

## sec.name source community
com2sec local 127.0.0.1 public
com2sec mynetwork 172.16.0.0/16 vnet

## group.name sec.model sec.name
group MyRWGroup v1 local
group MyRWGroup v2c local
group MyROGroup v1 mynetwork
group MyROGroup v2c mynetwork

## incl/excl subtree mask
view all included .1 80

## context sec.model sec.level prefix read write notif
access MyROGroup "" any noauth exact all none none
access MyRWGroup "" any noauth exact all all all

#disk / 10000
disk / 10000
disk /opt 10000
disk /usr 10000
disk /var 10000

# Added for support of bcm5820 cards.
pass .1.3.6.1.4.1.4413.4.1 /usr/bin/ucd5820stat

TB0ne 04-08-2009 04:27 PM

Quote:

Originally Posted by kirukan (Post 3502665)
I have checked my system with below mentioned snmp.conf, snmp working fine

Great...thanks for letting us know. But what does your configuration have to do with jnojr's original question?

jnojr 04-08-2009 04:51 PM

I started to look back into this. I was thinking, maybe selinux? Nope, nothing in audit.log... but then I happened to notice, in /var/log/messages :

Apr 8 21:43:18 mda-services snmpd[28291]: Connection from UDP: [127.0.0.1]:49806 REFUSED

Effing hosts.allow! I haven't used that in years!

So my issue is resolved. Thanks for the responses!

kirukan 04-09-2009 02:51 PM

Quote:

Great...thanks for letting us know. But what does your configuration have to do with jnojr's original question?
Actually i didnt drive any solution for jnojr's question but what i did was i just post the working configuration.

Quote:

Have you tried v1 or v3, instead of 2c? From what I remember, 2c needed other connection info, more than just the community string
But in configuration if he miss the part,
group MyRWGroup v2c local
group MyROGroup v2c mynetwork

He cant get the response from localhost using snmpwalk.
#snmpwalk -v 2c localhost -c public


All times are GMT -5. The time now is 02:56 PM.