LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   CentOS (https://www.linuxquestions.org/questions/centos-111/)
-   -   Centos 6.8 snmp wont start on boot (https://www.linuxquestions.org/questions/centos-111/centos-6-8-snmp-wont-start-on-boot-4175675000/)

fusion1275 05-11-2020 05:54 AM

Centos 6.8 snmp wont start on boot
 
Hi all,

So for the past 3 days I have been trying to get snmpd to auto start at boot time on an old centos machine.

I installed it and added the following line to the bottom of /etc/snmp/snmpd.conf

Quote:

rocommunity public
I then restarted the daemon

Quote:

service snmpd restart
Added the service to start at boot and confirmed by listing it

Quote:

chkconfig snmpd on
Quote:

chkconfig --list |grep snmpd
This shows that runlevel 2,3,4,5 are on

I then ran the snmpwalk test

Quote:

snmpwalk -c public -v2c <MY MACHINE IP ADDR>
This then gives me pages and pages of info

I know that snmp is working as I've also got another server which runs Zabbix 4.4 and this host is configured on it and is monitoring perfectly.

But I just cannot get the service to auto start??? It is killing.

Any ideas please? What other steps have I missed out here? I know I could try creating my own startup script but it already has all start and kill scripts in the rc.d dir.


Thanks for any help you can provide.

dc.901 05-11-2020 07:10 AM

Quote:

Originally Posted by fusion1275 (Post 6121665)
But I just cannot get the service to auto start??? It is killing.

To identify why the service is getting killed, you should look at
/var/log/messages

There should be another log specific to snmp under:
/var/log/

Look at dmesg.

fusion1275 05-11-2020 07:14 AM

Unfortunately the specific machine has it's system messages disabled (the customer has turned it off for their reasons)

I have raised the logging level to 7 on snmp and monitored /var/log/snmp.log but nothing is outputted.

dmesg shows nothing with regards to snmp. Not even an attempt to start it and fail which is very weird also.

dc.901 05-11-2020 07:53 AM

Hmm; what version of snmp is installed?
Code:

rpm -qa | grep -i snmp
And, did I understand correctly that it fails to start at boot, but once the OS is up and running, and you manually start it, it works?

fusion1275 05-11-2020 07:53 AM

I have now redirected all the snmpd logs to /var/log/snmpd.log and can see the udp connections to Zabbix. So functionally it is working as designed. But it just wont start as a service.

Totally baffled

fusion1275 05-11-2020 07:54 AM

snmp version 5.5

and yes I can start manually and all is good. It just wont start as a service.


All times are GMT -5. The time now is 04:58 PM.