Adding Host

any one need your help me?

we are install librenms in ubuntu 18.04
but successfully install and runing
but problem is that when add localhost or new host the error showing " Could not connect to SDPL-OP-LIBRENMS, please check the snmp details and snmp reachability",

snmpd running

/home/libranms# systemctl status snmpd
● snmpd.service - Simple Network Management Protocol (SNMP) Daemon.
Loaded: loaded (/lib/systemd/system/snmpd.service; enabled; vendor preset: enabled)
Active: active (running) since Sat 2020-03-07 22:38:03 IST; 2h 20min ago
Process: 31229 ExecReload=/bin/kill -HUP $MAINPID (code=exited, status=0/SUCCESS)
Process: 28316 ExecStartPre=/bin/mkdir -p /var/run/agentx (code=exited, status=0/SUCCESS)
Main PID: 28317 (snmpd)
Tasks: 1 (limit: 2317)
CGroup: /system.slice/snmpd.service
└─28317 /usr/sbin/snmpd -Lsd -Lf /dev/null -u Debian-snmp -g Debian-snmp -I -smux mteTrigger mteTriggerConf -f

Mar 08 00:27:13 sdpl-op-libranms snmpd[28317]: Connection from UDP: [127.0.0.1]:36595->[127.0.0.1]:161
Mar 08 00:27:13 sdpl-op-libranms snmpd[28317]: Connection from UDP: [127.0.0.1]:36595->[127.0.0.1]:161
Mar 08 00:27:13 sdpl-op-libranms snmpd[28317]: Connection from UDP: [127.0.0.1]:36595->[127.0.0.1]:161
Mar 08 00:27:13 sdpl-op-libranms snmpd[28317]: Connection from UDP: [127.0.0.1]:36595->[127.0.0.1]:161
Mar 08 00:27:13 sdpl-op-libranms snmpd[28317]: Connection from UDP: [127.0.0.1]:36595->[127.0.0.1]:161
Mar 08 00:27:13 sdpl-op-libranms snmpd[28317]: Connection from UDP: [127.0.0.1]:36595->[127.0.0.1]:161
Mar 08 00:27:13 sdpl-op-libranms snmpd[28317]: Connection from UDP: [127.0.0.1]:36595->[127.0.0.1]:161
Mar 08 00:27:13 sdpl-op-libranms snmpd[28317]: Connection from UDP: [127.0.0.1]:36595->[127.0.0.1]:161
Mar 08 00:27:13 sdpl-op-libranms snmpd[28317]: Connection from UDP: [127.0.0.1]:36595->[127.0.0.1]:161
Mar 08 00:27:13 sdpl-op-libranms snmpd[28317]: Connection from UDP: [127.0.0.1]:36595->[127.0.0.1]:161

and firewall status
:/home/libranms# ufw status
Status: inactive

Hi and welcome to the Forum,

is SNMP listening to localhost?

SNMP listening to localhost

iso.3.6.1.2.1.1.1.0 = STRING: “Linux sdpl-op-libranms 4.15.0-88-generic #88-Ubuntu SMP Tue Feb 11 20:11:34 UTC 2020 x86_64”
iso.3.6.1.2.1.1.2.0 = OID: iso.3.6.1.4.1.8072.3.2.10
iso.3.6.1.2.1.1.3.0 = Timeticks: (930409) 2:35:04.09
iso.3.6.1.2.1.1.4.0 = STRING: “Your Name [email protected]
iso.3.6.1.2.1.1.5.0 = STRING: “sdpl-op-libranms”
iso.3.6.1.2.1.1.6.0 = STRING: “Rack, Room, Building, City, Country [GPSX,Y]”
iso.3.6.1.2.1.1.8.0 = Timeticks: (2) 0:00:00.02
iso.3.6.1.2.1.1.9.1.2.1 = OID: iso.3.6.1.6.3.11.3.1.1
iso.3.6.1.2.1.1.9.1.2.2 = OID: iso.3.6.1.6.3.15.2.1.1
iso.3.6.1.2.1.1.9.1.2.3 = OID: iso.3.6.1.6.3.10.3.1.1
iso.3.6.1.2.1.1.9.1.2.4 = OID: iso.3.6.1.6.3.1
iso.3.6.1.2.1.1.9.1.2.5 = OID: iso.3.6.1.6.3.16.2.2.1
iso.3.6.1.2.1.1.9.1.2.6 = OID: iso.3.6.1.2.1.49
iso.3.6.1.2.1.1.9.1.2.7 = OID: iso.3.6.1.2.1.4
iso.3.6.1.2.1.1.9.1.2.8 = OID: iso.3.6.1.2.1.50
iso.3.6.1.2.1.1.9.1.2.9 = OID: iso.3.6.1.6.3.13.3.1.3
iso.3.6.1.2.1.1.9.1.2.10 = OID: iso.3.6.1.2.1.92
iso.3.6.1.2.1.1.9.1.3.1 = STRING: “The MIB for Message Processing and Dispatching.”
iso.3.6.1.2.1.1.9.1.3.2 = STRING: “The management information definitions for the SNMP User-based Security Model.”
iso.3.6.1.2.1.1.9.1.3.3 = STRING: “The SNMP Management Architecture MIB.”
iso.3.6.1.2.1.1.9.1.3.4 = STRING: “The MIB module for SNMPv2 entities”
iso.3.6.1.2.1.1.9.1.3.5 = STRING: “View-based Access Control Model for SNMP.”
:

is this the output of snmpwalk on the LibreNMS Machine against “localhost” ?

yes output of snmpwalk on the LibreNMS Machine against “localhost”

did you doublecheck/reconfigure SNMP configuration in LibreNMS?
Other Option would be not to use “localhost”, but use real hostname instead. This is good for better seeing systems later.

this is my snmpd.conf file
rocommunity public 127.0.0.1
extend distro /usr/bin/distro
extend hardware “/bin/cat /sys/devices/virtual/dmi/id/product_name”
extend manufacturer “/bin/cat /sys/devices/virtual/dmi/id/sys_vendor”
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
~
“/etc/snmp/snmpd.conf” [readonly] 4 lines, 197 characters

ok … you listen to 127.0.0.1 which is ipv4 localhost

most today systems resolve “localhost” to ::1 which is ipv6 localhost

could you try to add “127.0.0.1” to overwrite ip and recheck it?

Sir,

Howto change can you help me we are change resolved.conf but auto change after restart
~$ cat /etc/resolv.conf

This file is managed by man:systemd-resolved(8). Do not edit.

This is a dynamic resolv.conf file for connecting local clients to the

internal DNS stub resolver of systemd-resolved. This file lists all

configured search domains.

Run “systemd-resolve --status” to see details about the uplink DNS servers

currently in use.

Third party programs must not access this file directly, but only through the

symlink at /etc/resolv.conf. To manage man:resolv.conf(5) in a different way,

replace this symlink by a static file or a different symlink.

See man:systemd-resolved.service(8) for details about the supported modes of

operation for /etc/resolv.conf.

nameserver 127.0.0.53

i wouldn’t change resolv.conf or systemd-resolved parameter

have you tried out it with 127.0.0.1
or let snmpd listen to “::1” ?

let snmpd listen to “::1” change but same error , telnet not working or connected 161 port.

snmpd.conf
libranms@sdpl-op-libranms:~$ cat /etc/snmp/snmpd.conf
rocommunity public ::1
extend distro /usr/bin/distro
extend hardware “/bin/cat /sys/devices/virtual/dmi/id/product_name”
extend manufacturer “/bin/cat /sys/devices/virtual/dmi/id/sys_vendor”
libranms@sdpl-op-libranms:~$

why not using hostname and listen to it’s IP?

i’m use host name and snmpd.conf file
rocommunity public sdpl-op-libranms
extend distro /usr/bin/distro
extend hardware “/bin/cat /sys/devices/virtual/dmi/id/product_name”
extend manufacturer “/bin/cat /sys/devices/virtual/dmi/id/sys_vendor”

But same problem

Just start by listening to all interfaces, (so don’t specify anything after the community) and get it to run.
Then you can start filtering (and you should probably filter by IP so you know exactly what’s filtered).
And if you want to use names, use a proper DNS so you know exactly which IP is bound with which name

Yes i’m using IP but same problem

Do it with snmpwalk in CLI from LibreNMS server.

snmpwalk -v2c -c <community> x.x.x.x .1

When that one is fixed, LibreNMS will work (cause that’s exactly what it does at the end of the day …). (you select v2c and write the same community in LibreNMS GUI. )