LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   RedHat 7 snmpd service failed due to Name or service not known (https://www.linuxquestions.org/questions/linux-networking-3/redhat-7-snmpd-service-failed-due-to-name-or-service-not-known-4175619440/)

Lucas Rey 12-12-2017 05:28 AM

RedHat 7 snmpd service failed due to Name or service not known
 
Dear community, I have a RedHat 7 server installed, but I cannot start the snmpd service due to:
Code:

    server11# systemctl status snmpd
    snmpd.service - Simple Network Management Protocol (SNMP) Daemon.
    Loaded: loaded (/usr/lib/systemd/system/snmpd.service; enabled; vendor preset: disabled)
    Active: failed (Result: exit-code) since Tue 2017-12-12 11:51:13 CET; 25min ago
    Process: 20736 ExecStart=/usr/sbin/snmpd $OPTIONS -f (code=exited, status=1/FAILURE)
    Main PID: 20736 (code=exited, status=1/FAILURE)
   
    Dec 12 11:51:13 oitwi11 systemd[1]: Starting Simple Network Management Protocol (SNMP) Daemon....
    Dec 12 11:51:13 oitwi11 snmpd[20736]: getaddrinfo: serverz1-oam Name or service not known
    Dec 12 11:51:13 oitwi11 snmpd[20736]: getaddrinfo("serverz1-oam", NULL, ...): Name or service not known
    Dec 12 11:51:13 oitwi11 snmpd[20736]: Error opening specified endpoint "serverz1-oam:161"
    Dec 12 11:51:13 oitwi11 snmpd[20736]: Server Exiting with code 1

Well, the error is clear, snmpd service cannot find the serverz1-oam hostname. So, solution could be add it to hosts file. But this is not correct because the real hostname is "server11".
I checked the /etc/snmp/snmpd.conf, but there isn't such config to change.
So, how can I instruct snmp to getaddress to server11 hostname?

Many thanks
Lucas

Lucas Rey 12-12-2017 06:23 AM

DAMN! got it, it was on these config files:
/etc/sysconfig/snmpd
/etc/sysconfig/snmptrapd

Sorry for wasting forum space!

!!! 12-13-2017 02:02 AM

No problem;) Just mark Thread 'Solved' (link or ThreadTools at top of page)
so future searchers can find a Solution here.


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