snmpd를 올바르게 시작할 수 없습니다.

snmpd를 올바르게 시작할 수 없습니다.

몇 가지 테스트를 수행하기 위해 ubuntu-server 15.10에서 snmp를 설정해 보았습니다. snmp를 다음과 같이 설치했습니다.

sudo apt-get install snmp snmpd snmp-mibs-downloader

설치 후 다음 줄에 주석을 달았습니다 /etc/snmp/snmp.conf.

#mibs :

ubuntu-server 15.10에서 snmpd 프로세스를 시작하려고 하는데 그렇게 하면 실패합니다.

sudo service snmpd start

다음 오류가 발생합니다.

Job for snmpd.service failed because the control process exited with error code. See "systemctl status snmpd.service" and "journalctl -xe" for details.

하지만 이렇게 하면 $ sudo /usr/sbin/snmpd -f해당 명령어로 동작하는지 확인하면서 서비스를 시작할 수 있습니다 snmpwalk. 그러나 다음과 같은 오류도 발생합니다.

$ sudo /usr/sbin/snmpd -f
Cannot statfs /sys/fs/cgroup/systemd: No such file or directory
Cannot statfs /sys/fs/cgroup/cpu,cpuacct: No such file or directory
Cannot statfs /sys/fs/cgroup/freezer: No such file or directory
Cannot statfs /sys/fs/cgroup/net_cls,net_prio: No such file or directory
Cannot statfs /sys/fs/cgroup/cpuset: No such file or directory
Cannot statfs /sys/fs/cgroup/blkio: No such file or directory
Cannot statfs /sys/fs/cgroup/perf_event: No such file or directory
Cannot statfs /sys/fs/cgroup/hugetlb: No such file or directory
Cannot statfs /sys/fs/cgroup/memory: No such file or directory
Cannot statfs /sys/fs/cgroup/devices: No such file or directory
Turning on AgentX master support.
NET-SNMP version 5.7.3

해결책을 찾으려고 노력했지만 아무것도 찾지 못했습니다. 누구든지 도와줄 수 있나요?

또한 처음 두 명령의 출력을 복사하여 붙여넣었습니다.

$ systemctl status snmpd.service
● snmpd.service - LSB: SNMP agents
   Loaded: loaded (/etc/init.d/snmpd)
   Active: failed (Result: exit-code) since Tue 2016-03-15 15:32:18 CET; 9min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 15559 ExecStart=/etc/init.d/snmpd start (code=exited, status=219/CGROUP)

Mar 15 15:32:18 ubuntu-server systemd[1]: Starting LSB: SNMP agents...
Mar 15 15:32:18 ubuntu-server systemd[1]: snmpd.service: Control process exited, code=exited status=219
Mar 15 15:32:18 ubuntu-server systemd[1]: Failed to start LSB: SNMP agents.
Mar 15 15:32:18 ubuntu-server systemd[1]: snmpd.service: Unit entered failed state.
Mar 15 15:32:18 ubuntu-server systemd[1]: snmpd.service: Failed with result 'exit-code'.

$journalctl -xe
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit system-getty.slice: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit systemd-modules-load.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit systemd-vconsole-setup.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit apport.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit samba-ad-dc.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit dbus.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit systemd-journald.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit dev-mqueue.mount: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit sys-fs-fuse-connections.mount: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit ifup-wait-all-auto.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit dev-sda5.swap: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit systemd-user-sessions.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit resolvconf.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit nmbd.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit systemd-timesyncd.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit dev-hugepages.mount: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit tomcat7.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit dev-disk-by\x2duuid-e0924ced\x2deab6\x2d4590\x2d96e7\x2ddba3bba25688.swap: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit rsyslog.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit systemd-tmpfiles-setup.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit dev-disk-by\x2did-ata\x2dWDC_WD10EZEX\x2d08M2NA0_WD\x2dWCC3F3528610\x2dpart5.swap: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit cron.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit winbind.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit systemd-update-utmp.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit apache2.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit networking.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit dev-disk-by\x2did-wwn\x2d0x50014ee25f55a721\x2dpart5.swap: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit system-postgresql.slice: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to create cgroup : No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: Failed to realize cgroups for queued unit systemd-udev-trigger.service: No such file or directory
Mar 15 15:43:57 ubuntu-server systemd[1]: smbd.service: Control process exited, code=exited status=219
Mar 15 15:43:57 ubuntu-server systemd[1]: Reload failed for LSB: start Samba SMB/CIFS daemon (smbd).
-- Subject: Unit smbd.service has finished reloading its configuration
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit smbd.service has finished reloading its configuration
--
-- The result is failed.
Mar 15 15:43:57 ubuntu-server dhclient[712]: bound to 192.168.137.153 -- renewal in 291 seconds.

감사해요!

답변1

나는 다음을 사용하여 동일한 문제를 해결했습니다.이 튜토리얼

이 파일을 편집해야 합니다./etc/snmp/snmpd.conf변화프록시 주소해당 지침. 그런 다음 사용사용자 생성그리고RW 사용자, 사용자를 생성하고 각각 충분한 액세스 수준을 부여합니다.

다음과 같아야합니다.

#  Listen for connections from the local system only
#agentAddress  udp:127.0.0.1:161 # <= comment this line
#  Listen for connections on all interfaces (both IPv4 *and* IPv6)
agentAddress udp:161,udp6:[::1]:161

createUser bootstrap MD5 temp_password DES

rwuser bootstrap priv
rwuser demo priv

인사말, 이력서

관련 정보