Joined: 14 Dec 2015 Posts: 775 Location: 127.0.0.1
Posted: Tue May 10, 2022 7:16 Post subject: [CONFIRMED-SOLVED] SNMP Stopped working
Hello everyone, long time no see! LOL
Wasn't sure if I should post this here or in the Advanced section, if it is only related to MVEBU units. (Also if you could let me know if the links in my signature no longer apply, that would be great)
I was out of state and updated my WRT3200ACM, WRT1900AC v1, and WRT1200AC to r48646 from r48432. SNMP has seemed to stop working on all of them. I have Cacti running on a Pi, it is no longer receiving anything from the WRTs, it is still getting info from my managed switches.
I know not many here use SNMP, and I try to keep up on the svn changes, but I don't remember seeing anything to do with SNMP.
Any advice would be greatly appreciated! _________________ Tutorial for flashing WRT series WRT Installation,Upgrade & Basic Setup–Cliff Notes
r52242: WRT3200ACM, WRT1200ACv1 & 1 Velop in bridge mode(IoT subnet), r52242 WRT1900ACv1 AP
Velop:2 WHW0101, RE6500, RE9000(AP)
Spectrum - 1000/50
SysLog Watcher 5, New security Onion box coming soon, Fingboxes, PiHoles, NEMS, Cacti, rpisurv
Joined: 14 Dec 2015 Posts: 775 Location: 127.0.0.1
Posted: Wed May 11, 2022 12:46 Post subject:
Hello the-joker!
Thank you for all the code you have done for the UI, love the Matrix one. I'm sure you also had something to do with the new options as well.
I understand the reasoning to not update SNMP, especially if it is bloated, doesn't really do much LOL. If it works it works.
I am adding a few screenshots, what would you like to see from the logs? Are we talking serial logs?
Thanks for the response. _________________ Tutorial for flashing WRT series WRT Installation,Upgrade & Basic Setup–Cliff Notes
r52242: WRT3200ACM, WRT1200ACv1 & 1 Velop in bridge mode(IoT subnet), r52242 WRT1900ACv1 AP
Velop:2 WHW0101, RE6500, RE9000(AP)
Spectrum - 1000/50
SysLog Watcher 5, New security Onion box coming soon, Fingboxes, PiHoles, NEMS, Cacti, rpisurv
Joined: 14 Dec 2015 Posts: 775 Location: 127.0.0.1
Posted: Thu May 12, 2022 7:52 Post subject:
You are right, I did not see anything in the messages, and I searched my Syslog Watcher and absolutely nothing matched *snmp*.
Possibly when it boots? I can try that, to see if I catch anything. Or logging has been turned off on it, I never had to look before. Could try to use snmpwalk on one of my pi's to see if the router is even responding at all.
I will keep you updated, I mean there has been no updates to Cacti for quite a while.
Thank you! _________________ Tutorial for flashing WRT series WRT Installation,Upgrade & Basic Setup–Cliff Notes
r52242: WRT3200ACM, WRT1200ACv1 & 1 Velop in bridge mode(IoT subnet), r52242 WRT1900ACv1 AP
Velop:2 WHW0101, RE6500, RE9000(AP)
Spectrum - 1000/50
SysLog Watcher 5, New security Onion box coming soon, Fingboxes, PiHoles, NEMS, Cacti, rpisurv
Joined: 14 Dec 2015 Posts: 775 Location: 127.0.0.1
Posted: Thu May 12, 2022 8:45 Post subject:
It is not responding at all:
Code:
pi@CactiPi:~ $ snmpwalk -c public -v 1 192.168.1.1
Timeout: No Response from 192.168.1.1
pi@CactiPi:~ $
I have tried tried it on 3 pi's that are on different switches.
I SSH'd into the router, and I am not the best trying to figure out all the different commands and switches depending on what the OS is. Trying to see the status of snmp, or snmpd. Seems that snmpd does not exist, just snmp. Not sure if that is an issue or not, and I also don't know how to see if it is running, haven't found that command yet. Been a long time. I also don't see it in htop also.
Code:
root@3200_ACM:~# service status-all
service servicename start|stop|restart|main args... [-f]
options:
-f : force start of service, no matter if neccessary
list of services:
[main]
snmp [start] [stop] [restart]
_________________ Tutorial for flashing WRT series WRT Installation,Upgrade & Basic Setup–Cliff Notes
r52242: WRT3200ACM, WRT1200ACv1 & 1 Velop in bridge mode(IoT subnet), r52242 WRT1900ACv1 AP
Velop:2 WHW0101, RE6500, RE9000(AP)
Spectrum - 1000/50
SysLog Watcher 5, New security Onion box coming soon, Fingboxes, PiHoles, NEMS, Cacti, rpisurv
I remember a little while back someone was having issues with snmp, something about the service bailing, I spoke to BS about upgrading it, but you know the answer.
On my WRT1200ac v2 running r48810, snmpd is in /usr/sbin (it's in the same place on my r7800). I've had no trouble with it and Cacti. If it's running, you should see it with ps:
Code:
root@wrt1200ac:~# ps | grep snmp
4491 root 3228 S snmpd -c /var/snmp/snmpd.conf
4662 root 1396 S grep snmp
root@wrt1200ac:~#
You can stop and start it with the service command:
Code:
root@wrt1200ac:~# service snmp stop
[snmpd] : daemon successfully stopped
root@wrt1200ac:~# service snmp start
[snmpd] : SNMP daemon successfully started
root@wrt1200ac:~#
Joined: 14 Dec 2015 Posts: 775 Location: 127.0.0.1
Posted: Sat May 14, 2022 3:24 Post subject:
jwieland wrote:
On my WRT1200ac v2 running r48810, snmpd is in /usr/sbin (it's in the same place on my r7800). I've had no trouble with it and Cacti. If it's running, you should see it with ps:
Code:
root@wrt1200ac:~# ps | grep snmp
4491 root 3228 S snmpd -c /var/snmp/snmpd.conf
4662 root 1396 S grep snmp
Joined: 31 Jul 2021 Posts: 2142 Location: All over YOUR webs
Posted: Sat May 14, 2022 5:23 Post subject:
Then snmp is not running.
Have you tried starting it via terminal? If so what was the result.
I would suggest that in Administration commands, you add the command to start snmp service snmp start, and save as firewall and click apply, for time being at least.
I have noticed that snmp wont start as expected via UI after enabling the service, sving and applying, but after running service snmp start via terminal, the output of ps/top grep snmp outputs as normal.
Joined: 31 Jul 2021 Posts: 2142 Location: All over YOUR webs
Posted: Sat May 14, 2022 8:22 Post subject:
What I have beeen able to tell is, if /var/snmp/snmpd.conf doesnt exist, and the service is enabled and you click apply (must be apply), the /var/snmp/snmpd.conf isnt being created consistently.
Took me 4 clicks of the apply button, waiting 10 seconds between to get snmp started and this is when the /var/snmp/snmpd.conf exists, and even then the service starting isnt being logged in /var/log/messages
if /var/snmp/snmpd.conf does not exist, you need to disable->apply, enable->apply add naseaum before the file is created, it can take up to unknown amount of times. This waiting 10 seconds between each enable/disable step to give slower machines time to catch up and the user to check if service and or file has been created/started.
and logging is equally flaky.
Meanwhile BS tried it and on his first try, it worked (Sod's law/Murphy's law at play here), idk if he is looking into it but I have reported a sure way to reproduce by removing the conf file when the service is disabled, and then taking it from there.
Could be Asus and your machine only, or could be its reproducible randomly, even though Im able to repro by removing the conf file.
Now, should I add it to the firewall startup? (Did you have success if it was restarted?)
It (The Cacti) is now getting information. Just don't want it to go away if the UPS runs out, or if I upgrade versions..
Never pong BS, ping him and buy him a beer!
And thank you again for looking into this! _________________ Tutorial for flashing WRT series WRT Installation,Upgrade & Basic Setup–Cliff Notes
r52242: WRT3200ACM, WRT1200ACv1 & 1 Velop in bridge mode(IoT subnet), r52242 WRT1900ACv1 AP
Velop:2 WHW0101, RE6500, RE9000(AP)
Spectrum - 1000/50
SysLog Watcher 5, New security Onion box coming soon, Fingboxes, PiHoles, NEMS, Cacti, rpisurv
Joined: 31 Jul 2021 Posts: 2142 Location: All over YOUR webs
Posted: Sat May 14, 2022 10:13 Post subject:
And who buys me a beer? Im broke for reals, and cant afford the basics. Soon water and power will be next.
If you set this as firewall and long as conf exists, it will for sure run the command when you restart device (even after upgrades) and when you click apply at least on admin page (it restarts some services) so saving as firewall may work better.
The snag as I saw it, even though the code was right (Im not a C person so looked OK) when the snmpd.conf didnt exist (as if snmp was never used this is normal) and you enabled the service and clicked apply, the file wasnt getting created as per code dictated within reasonable time and thus service didn't start.
But assuming file existed then the service should have started on first click, also not always the case.