question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

snmpsim import error while running with root

See original GitHub issue

Hi

I’m trying to use snmpsim to simulate response from a switch. I need to open 161 port to get the management end fooled by snmpsim. I ran it as normal user without problems but when I ran it as root it gives-me an error.

(snmpsim-env) [root@management ~]# snmpsimd.py --data-dir ./data --agent-udpv4-endpoint=192.168.123.2:1611 --process-user=nobody --process-group=nobody
Scanning "/root/.snmpsim/variation" directory for variation modules...
Directory "/root/.snmpsim/variation" does not exist
Scanning "/root/snmpsim-env/snmpsim/variation" directory for variation modules...
Directory "/root/snmpsim-env/snmpsim/variation" does not exist
Scanning "/root/snmpsim-env/share/snmpsim/variation" directory for variation modules...
Directory "/root/snmpsim-env/share/snmpsim/variation" does not exist
Scanning "/root/snmpsim-env/lib/python2.7/site-packages/snmpsim/variation" directory for variation modules...
Directory "/root/snmpsim-env/lib/python2.7/site-packages/snmpsim/variation" does not exist
ERROR: SNMPv3 Engine initialization failed, EngineID "auto": local variable 'p' referenced before assignment
(snmpsim-env) [root@management ~]#

Regards

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:16 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
etingofcommented, Jan 19, 2019

Hmm, is not that p variable assigned unconditionally prior to reading the folder?

0reactions
dhilstcommented, Jan 19, 2019

Yeah you’re right, I was using an old revision, sorry!

Regards!

Read more comments on GitHub >

github_iconTop Results From Across the Web

[snmpsim-users] SNMP Simulator does not let snmpwalk know ...
I encounter this issue - After running the following: ... However, when I try to inspect this OID, I get the following error:...
Read more >
How to use SNMPSim to simulate a network device based on ...
1. Installing SNMP Simulator (snmpsim). pip install snmpsim. Note: You can install snmpsim as root, but you cannot it run as root. ·...
Read more >
Python ImportError: cannot import name utils - Stack Overflow
I used the inbuilt python migration automated tool to change the file that is causing the import error using the command 2to3 -w...
Read more >
snmpsim/commands/responder_lite.py - searchcode
1 2# This file is part of snmpsim software. ... type=str, 93 help='If run as root, switch simulator daemon to this user right...
Read more >
SNMP Simulator 0.4 documentation
virtualenv venv $ source venv/bin/activate $ pip install snmpsim ... In case of questions or troubles using SNMP Simulator, please open up an...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found