Unable to browse SNMP information.
snmpwalk -v 1 -c public 127.0.0.1 OPENSER-REG-MIB::openser
OPENSER-SIP-COMMON-MIB::openserSIPProtocolVersion.0 = STRING: SIP/2.0
Error in packet.
Reason: (genError) A general failure occured
Failed object: OPENSER-SIP-COMMON-MIB::openserSIPProtocolVersion.0
When the code changed back to the way how it was in v1.6.4 it works fine.
opensips-1.6.4-2-tls/modules/snmpstats/openserSIPCommonObjects.c
fgets(buffer, SNMPGET_MAX_BUFFER, theFile);
opensips-1.8.2-tls/modules/snmpstats/openserSIPCommonObjects.c
if (fgets(buffer, SNMPGET_MAX_BUFFER, theFile)==NULL)
return SNMP_ERR_GENERR;
Hi Ledda,
According to man::
gets() and fgets() return s on success, and NULL on error or when end
of file occurs while no characters have been read.
So, the test added on fgets seems to be valid to me. Now, the question is if you have the file it tries to read from:
/tmp/openSER_SNMPAgent.txt
Is there any valid data in there ?
Regards,
Bogdan
The file exists. But it is zero size in both cases.
So the code is correct and the problem may be related to the creation of the file. Could you confirm the file has some content right after the opensips start?
Thanks.
The file /tmp/openSER_SNMPAgent.txt exists, and it is empty.
I don't see any snmpget related errors in the logs.
What do you get if you run from a console:
snmpget -Ov -c public localhost .1.3.6.1.2.1.1.3.0
?
Regards,
Bogdan
I'm currently experiencing this problem with 1.9 also. I see you never got a response to your request Bogdan, so I will provide my feedback if it helps.
snmpget -Ov -c opensips localhost .1.3.6.1.2.1.1.3.0
snmpget: No securityName specified
I have tried using both v1 and v2c (not using v3 at this time).
snmpwalk -Ci -v 2c -c opensips 127.0.0.1 OPENSER-REG-MIB::openser
OPENSER-REG-MIB::openser = No Such Object available on this agent at this OID
OPENSER-SIP-COMMON-MIB::openserSIPProtocolVersion.0 = STRING: SIP/2.0
Error in packet.
Reason: (genError) A general failure occured
Failed object: OPENSER-SIP-COMMON-MIB::openserSIPProtocolVersion.0
The interesting part is that I can query scalar and table statistics directly just fine, so I'm pretty sure all the agent connectivity is fine.
snmpwalk -Ci -v 2c -c opensips localhost openserSIPRegCurrentUsers.0
OPENSER-SIP-SERVER-MIB::openserSIPRegCurrentUsers.0 = Gauge32: 1
snmptable -Ci -v 2c -c opensips localhost openserSIPRegUserTable
SNMP table: OPENSER-SIP-SERVER-MIB::openserSIPRegUserTable
index openserSIPUserUri openserSIPUserAuthenticationFailures
1 DefaultUser 0
2 6506410690 0
Happy to provide any other details needed to diagnose this one.