Ad Widget

Collapse

SNMPD crashes when configuring SNMP Traps

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Jarne St
    Member
    • Sep 2019
    • 63

    #1

    SNMPD crashes when configuring SNMP Traps

    I am using Ubuntu vesion 18.04.3 and zabbix_server 4.0.12
    I try to configure SNMP Traps.

    I have followed the installation procedure as described here: https://zabbix.org/wiki/Start_with_SNMP_traps_in_Zabbix
    I installed the following package to work with Ubuntu: perl, libsnmp-perl, libxml-simple-perl
    And the deamons: snmp, snmpd, snmptrapd

    But after the installation procedure, the snmpd refuses to start.
    In my syslog I recieved hunderds of this lines:
    HTML Code:
    Oct  4 09:38:38 PRIMERGY kernel: [ 2214.861793] audit: type=1400 audit(1570174718.476:11729): apparmor="DENIED" operation="create" profile="snap.net-snmp.snmpd" pid=1102 comm="snmpd" family="netlink" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create"
    Oct  4 09:38:38 PRIMERGY kernel: [ 2214.861819] audit: type=1400 audit(1570174718.476:11730): apparmor="DENIED" operation="create" profile="snap.net-snmp.snmpd" pid=1102 comm="snmpd" family="netlink" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create"
    Oct  4 09:38:38 PRIMERGY kernel: [ 2214.861867] audit: type=1400 audit(1570174718.476:11731): apparmor="DENIED" operation="create" profile="snap.net-snmp.snmpd" pid=1102 comm="snmpd" family="netlink" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create"
    Oct  4 09:38:38 PRIMERGY kernel: [ 2214.861891] audit: type=1400 audit(1570174718.476:11732): apparmor="DENIED" operation="create" profile="snap.net-snmp.snmpd" pid=1102 comm="snmpd" family="netlink" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create"
    Oct  4 09:38:38 PRIMERGY kernel: [ 2214.862047] audit: type=1400 audit(1570174718.476:11733): apparmor="DENIED" operation="open" profile="snap.net-snmp.snmpd" name="/proc/sys/net/ipv4/neigh/enp0s25/retrans_time_ms" pid=1102 comm="snmpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
    Oct  4 09:38:38 PRIMERGY kernel: [ 2214.862071] audit: type=1400 audit(1570174718.476:11734): apparmor="DENIED" operation="open" profile="snap.net-snmp.snmpd" name="/proc/sys/net/ipv6/neigh/enp0s25/retrans_time_ms" pid=1102 comm="snmpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
    Oct  4 09:38:38 PRIMERGY kernel: [ 2214.862094] audit: type=1400 audit(1570174718.476:11735): apparmor="DENIED" operation="open" profile="snap.net-snmp.snmpd" name="/proc/sys/net/ipv6/conf/enp0s25/forwarding" pid=1102 comm="snmpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
    Oct  4 09:38:38 PRIMERGY kernel: [ 2214.862116] audit: type=1400 audit(1570174718.476:11736): apparmor="DENIED" operation="open" profile="snap.net-snmp.snmpd" name="/proc/sys/net/ipv6/neigh/enp0s25/base_reachable_time_ms" pid=1102 comm="snmpd" requested_mask="r" denied_mask="r" fsuid=0 ouid=0
    Has anyone an idea what exactly causes this error and how to resolve this?
    Any guidance would be welcome!


  • dimir
    Zabbix developer
    • Apr 2011
    • 1080

    #2
    It looks like a SELinux issue.

    Comment

    • Jarne St
      Member
      • Sep 2019
      • 63

      #3
      SELinux is disabled in my Ubuntu.
      HTML Code:
      jarne@PRIMERGY: sestatus
      SELinux status:                 disabled
      Has this something to do with the configuration off snmpd?
      If I look in the directory /etc/snmp the configuration file is missing ???

      HTML Code:
      jarne@PRIMERGY: /etc/snmp$ ls
      snmptrapd.conf

      Comment

      • dimir
        Zabbix developer
        • Apr 2011
        • 1080

        #4
        At least in my case I have snmpd.conf file:
        Code:
        $ dpkg -S /etc/snmp/snmpd.conf
        snmpd: /etc/snmp/snmpd.conf

        Comment

        • Jarne St
          Member
          • Sep 2019
          • 63

          #5
          I will create it manually
          cd /etc/snmp
          touch snmp.conf
          touch snmpd.conf

          Comment

          • Jarne St
            Member
            • Sep 2019
            • 63

            #6
            Hello,
            I have solved my snmpd, but when I test it I get this:
            (I used the (test) command from the tutorial: https://zabbix.org/wiki/Start_with_SNMP_traps_in_Zabbix)

            Code:
            jarne@PRIMERGY:~$ snmptrap -v 1 -c public 127.0.0.1 '.1.3.6.1.6.3.1.1.5.4' '0.0.0.0' 6 33 '55' .1.3.6.1.6.3.1.1.5.4 s "eth0"
            Cannot rename /var/lib/snmp/snmpapp.conf to /var/lib/snmp/snmpapp.0.conf
            Cannot unlink /var/lib/snmp/snmpapp.conf
            read_config_store open failure on /var/lib/snmp/snmpapp.conf
            read_config_store open failure on /var/lib/snmp/snmpapp.conf
            read_config_store open failure on /var/lib/snmp/snmpapp.conf

            Comment

            Working...