-
-
Notifications
You must be signed in to change notification settings - Fork 205
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'instanceIndex=(0,)' caused exception SmiError as “ValueRangeConstraint(1, 2147483647) failed at: ”0“” at Integer32 #7
Comments
You should use a non-zero instance index, for example |
I'm having an identical issue. This is a very stripped down version of the MIB I'm trying to use:
Trying to use this OID: The first instance of an OID is always at index 0, so changing to 1 will result in an NoSuchObject error if there's only meant to be 1. Changing the This seems to be an error in the OID conversion code. |
@jmichiel Two tips:
|
Sorry about posting here, wasn't aware of the move... (I'll still answer here if anyone else finds this) Oh, I start to (finally) understand! You can't actually see by looking at the OID definition itself (like for moduleMake here) if it is a table entry, you have to know that it was referenced elsewhere, which is why removing the So the fact that I can only access this it through the .0 index on the device I'm testing means the implementation on the device side is wrong! Thanks for clearing that up! Now I'll go and read up on SNMP tables... |
I am new for python and SNMP (as well as pysnmp). After two weeks study, I wrote a piece of python code which try to send a trap message.
The NotificationType was created by code: (pysnmp 4.3.2)
when I execute this code, I got following SmiError:
It seems pysnmp doesn't like to add suffix .0 for the variable whose syntax is defined as:
Does it a bug for pysnmp?
Or I should not add that .0 suffix?(at least after remove that '0,' from instanceIndex the code can be executed and trap message sent successfully.
But I was told that
So seems the .0 is anyway needed, right? (Since it should be a object has a single instance.)
Or there are some misunderstanding from us?
Thanks in advance.
Br,
-Dapeng Jiao
The original MIB defination for that variable is:
and converted python format is:
DateAndTime was imported from SNMPv2-TC.
One update for this:
Even the exception shows the problem is caused by 'myAlarmTime'
But after debug, it seems the real issue is 'myAlarmId' syntax definition. As that variable is the only one defined with Integer32 with range (1, 2147483647)
And after I change its value range to (0, 2147483647), the
instanceIndex = (0,)
start to works.
But I should NOT change that right?
Then what should be the root cause for this issue?
Pysnmp bug?
or our misunderstanding for SNMP and MIB file?
BTW: the suffix .0 was working fine with a Java based SNMP cilent. But due to company's order and license issue, we need to re-implement it and we though python should be a good enough to do this.
Attach more MIB definition relate to this alarm event
Br,
-Dapeng Jiao
The text was updated successfully, but these errors were encountered: