Comments (10)
You will have to show your code and reveal how you configured PySNMP.
You also need to show which OID you tried to SET.
from pysnmp.
The GET and SET works when the read community is set to 'read' and the write community is set to 'write' so this is a PySNMP internal problem. Looks like an issue with having both communities set to the same value.
from pysnmp.
Verbose debug of issue attached...
PySNMP GET and SET error with identical community names.txt
from pysnmp.
Like I commented earlier, you need to show your code. But anyway, the verbose log indicated the same,
2024-04-04 15:36:00,561 pysnmp: StatusInformation: {'errorIndication': NotInView()}
[D 240404 15:36:00 debug:53] StatusInformation: {'errorIndication': NotInView()}
that you didn't configure the view properly.
from pysnmp.
You can use the standard example 'multiple-snmp-communities.py' to replicate, just set the read and write communities to the same value.
The 'NotInView()' error is only generated when the communities are the same.
from pysnmp.
My team are the new maintainers of this project (read #429 for more), so we clearly know what you meant.
What we suggest is that you go through the documentation and sample code with more patience, because the MIB view related configuration is less known but critical in cases like this. You can refer to code like to see how a test SNMP agent should be configured (since you don't want to share your own code),
https://github.com/lextudio/pysnmp/blob/main/tests/agent_context.py#L57
from pysnmp.
I am using your sample code from here : examples/v3arch/asyncio/agent/cmdrsp/multiple-snmp-communities.py
It works when you use different community strings, as the example:
config.addV1System(snmpEngine, 'my-read-area', 'read')
config.addV1System(snmpEngine, 'my-write-area', 'write')
And fails when you make them the same:
config.addV1System(snmpEngine, 'my-read-area', 'same')
config.addV1System(snmpEngine, 'my-write-area', 'same')
I cannot do any other tests as this is as simple as you can get.
from pysnmp.
Those were the legacy samples written by Ilya and we don't really consider them extensive or up-to-date, compared to the unit test cases which are live and tested.
In the next few months we will revise the documentation on PySNMP.com further to eliminate the gaps.
from pysnmp.
Be they legacy examples or not the issue can still be demonstrated with your example code which was tested at some point in the past.
This is a problem with PySNMP so some constructive support would be welcome.
from pysnmp.
Only @etingof can confirm if those "were tested at some point in the past", but he won't be able to.
As new maintainers we clearly pointed out what you missed (even with line numbered code from live unit test case), and if that's not "constructive" I wonder what exactly you were looking for.
BTW, you keep refusing to show your code, and that actually blocked the discussion.
from pysnmp.
Related Issues (20)
- <lambda>() takes 3 positional arguments but 4 were given HOT 5
- Project URL now redirects to Suspicious/Malware Site HOT 1
- Sending requests from specific interface not working.
- Get no result of getCmd HOT 4
- Attempted "__hash__" operation on ASN.1 schema object HOT 13
- pysnmp doesn't support IPv6 link-local addresses HOT 1
- Hello there, new to python and pysnmp. HOT 2
- AttributeError: 'UdpTransportTarget' object has no attribute 'contextName' HOT 2
- snmpget retry HOT 1
- Some authentication/privacy combinations are not working correctly? HOT 1
- .snmprec Generation HOT 1
- pysnmp usinng with SNMP V3 HOT 3
- Strange error when running the code given HOT 4
- Incomplete OID Retrieval: SNMP Walk (nextCmd/bulkCmd) Fails to Capture All OIDs HOT 6
- This project is dead please open issues with a fork HOT 1
- MibCompiler error when node name is 'as',the key world change to 'pysmi_as'
- Pysnmp HOT 1
- Python 3.12 compatibility - deprecated asyncore HOT 2
- pysnmp import issue: asyncore HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pysnmp.