[SERVER-11465] SNMP: snmp-master when master/slave throws exception during snmpwalk Created: 29/Oct/13  Updated: 11/Jul/16  Resolved: 04/Nov/13

Status: Closed
Project: Core Server
Component/s: Diagnostics
Affects Version/s: 2.5.3
Fix Version/s: 2.5.4

Type: Bug Priority: Major - P3
Reporter: John Morales Assignee: James Wahlin
Resolution: Done Votes: 0
Labels: 26qa
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:
  • MongoDB 2.5.4-pre Ubuntu 12.04 Enterprise
  • Build version: enterprise-97c3a3d2b487e9376d484d33ede2895e379a3033-2013-10-29
  • Amazon EC2 m1.medium Ubuntu Server LTS 12.04
  • Master/Slave

Attachments: Text File mongod.master.log     Text File mongod.slave.log    
Issue Links:
Related
Operating System: ALL
Steps To Reproduce:

0.) Install standard pre-req packages for SNMP on Ubuntu.
1.) Edit /etc/snmp/mongod.conf config file for subagent connection through unix socket:

master agentx
agentXSocket /tmp/agentx/master

2.) Launch a master/slave pair. The master was also the SNMP master, the slave a subagent.
3.) Run snmpwalk of master.
snmpwalk -m MONGO-MIB -v 2c -c mongodb localhost:1161 1.3.6.1.4.1.34601

Actual command-line flags used for each host:
MASTER: ../bin/mongod -vvvvv --snmp-master --port 27017 --fork --dbpath data/master-0/ --logpath logs/master-0/mongod.log --smallfiles --nohttpinterface --nojournal --master

SLAVE: ./bin/mongod -vvvvv --snmp-subagent --port 27018 --fork --dbpath data/slave-0/ --logpath logs/slave-0/mongod.log --smallfiles --nohttpinterface --nojournal --slave --source ip-internal-hostname:27017

Participants:

 Description   

Given a MongoDB master/slave configured on the same host configured with --snmp-master and --snmp-subagent, the snmpwalk fails with an exceptions in the master's log. E.g.,

2013-10-29T22:50:47.616+0000 [SnmpAgent] ServerStatusClient::load { host: "ip-10-239-24-41", version: "2.5.4-pre-", process: "mongod", pid: 9557, uptime: 22.0, uptimeMillis: 22070, uptimeEstimate: 21.0, localTime: new Date(1383087047615), repl: { ismaster: true, s
ources: [] }, ok: 1.0 }
2013-10-29T22:50:47.616+0000 [SnmpAgent] warning: repl.setName is not a string
2013-10-29T22:50:47.616+0000 [SnmpAgent] ServerStatusClient::getElement: repl.setVersion
2013-10-29T22:50:47.617+0000 [SnmpAgent] Assertion: 13111:field not found, expected type 16
2013-10-29T22:50:47.624+0000 [SnmpAgent] 0xe361b3 0xdeba45 0xdd3951 0xdd39fc 0xacfc27 0xad10ab 0xadb964 0xad2216 0x7fc75ab31f7c 0x7fc75a8fe3e5 0x7fc75ab31f7c 0x7fc75a9024a5 0x7fc75ab319df 0x7fc75ab27441 0x7fc75ab27870 0x7fc75ab282e0 0x7fc75ab287ca 0x7fc75a660d86 0
x7fc75a661ecb 0x7fc75a6625b9 
 ./bin/mongod(_ZN5mongo15printStackTraceERSo+0x23) [0xe361b3]
 ./bin/mongod(_ZN5mongo10logContextEPKc+0x1a5) [0xdeba45]
 ./bin/mongod(_ZN5mongo11msgassertedEiPKc+0x91) [0xdd3951]
 ./bin/mongod() [0xdd39fc]
 ./bin/mongod() [0xacfc27]
 ./bin/mongod(_ZN5mongo18ServerStatusClient11getIntFieldERKNS_10StringDataE+0x2b) [0xad10ab]
 ./bin/mongod(_ZN5mongo9callbacks20ServerStatusCallback7respondEP13variable_list+0x2a4) [0xadb964]
 ./bin/mongod(_ZN5mongo16my_snmp_callbackEP21netsnmp_mib_handler_sP30netsnmp_handler_registration_sP28netsnmp_agent_request_info_sP22netsnmp_request_info_s+0x206) [0xad2216]
 /usr/lib/libnetsnmpagent.so.15(netsnmp_call_next_handler+0x1ac) [0x7fc75ab31f7c]
 /usr/lib/libnetsnmphelpers.so.15(netsnmp_instance_helper_handler+0x2c5) [0x7fc75a8fe3e5]
 /usr/lib/libnetsnmpagent.so.15(netsnmp_call_next_handler+0x1ac) [0x7fc75ab31f7c]
 /usr/lib/libnetsnmphelpers.so.15(netsnmp_serialize_helper_handler+0x55) [0x7fc75a9024a5]
 /usr/lib/libnetsnmpagent.so.15(netsnmp_call_handlers+0xdf) [0x7fc75ab319df]
 /usr/lib/libnetsnmpagent.so.15(handle_var_requests+0x91) [0x7fc75ab27441]
 /usr/lib/libnetsnmpagent.so.15(handle_getnext_loop+0x20) [0x7fc75ab27870]
 /usr/lib/libnetsnmpagent.so.15(netsnmp_handle_request+0x90) [0x7fc75ab282e0]
 /usr/lib/libnetsnmpagent.so.15(handle_snmp_packet+0x1ca) [0x7fc75ab287ca]
 /usr/lib/libnetsnmp.so.15(+0x38d86) [0x7fc75a660d86]
 /usr/lib/libnetsnmp.so.15(_sess_read+0x8db) [0x7fc75a661ecb]
 /usr/lib/libnetsnmp.so.15(snmp_sess_read+0x9) [0x7fc75a6625b9]

Log level 5 mongod logs are attached.



 Comments   
Comment by auto [ 04/Nov/13 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: Merge pull request #14 from jameswahlin/SERVER-11465

SERVER-11465 ensure replicaset-only snmp data is fetched only in replicaset mode
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/d176a8139965d1ac4f0c5b938b17c03d2f557338

Comment by auto [ 04/Nov/13 ]

Author:

{u'username': u'milkie', u'name': u'Eric Milkie', u'email': u'milkie@10gen.com'}

Message: Merge pull request #14 from jameswahlin/SERVER-11465

SERVER-11465 ensure replicaset-only snmp data is fetched only in replicaset mode
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/d176a8139965d1ac4f0c5b938b17c03d2f557338

Comment by auto [ 04/Nov/13 ]

Author:

{u'name': u'James Wahlin', u'email': u'james.wahlin@10gen.com'}

Message: SERVER-11465 SNMP exceptions on master/slave
Branch: master
https://github.com/10gen/mongo-enterprise-modules/commit/c4c64b857efe70ca55d297f86698a42da449a8a4

Generated at Thu Feb 08 03:25:51 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.