connection snmp and mnesia...badmatch

David N. Welton davidw@REDACTED
Tue Sep 14 17:44:39 CEST 2004


[ Let's try this again... hopefully it won't show up twice! ]

Hi,

I'm having some troubles connecting SNMP and Mnesia.

Namely, this error:

** User error: Invalid return value {'EXIT',{{badmatch,false},[{snmp_generic,table_info,1},{snmp_generic_mnesia,table_func,4},{snmp_agent,dbg_apply,3},{snmp_agent,get_next_values_all_rows,6},{snmp_agent,get_next_table,4},{snmp_agent,next_loop_varbinds,5},{snmp_agent,process_pdu,4},{snmp_agent,handle_pdu,7}|more]}} from {snmp_generic,table_func,[{otr_extstatus,mnesia}]} (get_next)

Indeed, when I turn on debugging:

** SNMP MASTER-AGENT LOG: 
   apply: snmp_generic,table_func,[get_next,[],[0],{otr_extstatus,mnesia}]

** SNMP MASTER-AGENT LOG: 
   returned: {'EXIT',{{badmatch,false},
                      [{snmp_generic,table_info,1},
                       {snmp_generic_mnesia,table_func,4},
                       {snmp_agent,dbg_apply,3},
                       {snmp_agent,get_next_values_all_rows,6},
                       {snmp_agent,get_next_table,4},
                       {snmp_agent,next_loop_varbinds,5},
                       {snmp_agent,process_pdu,4},
                       {snmp_agent,handle_pdu,7}|
                       more]}}

Now, the first thing about this that looks awry to me is the
documentation for table_func:

table_func(Op1,NameDb)
table_func(Op2,RowIndex,Cols,NameDb) -> Ret

      Types:
            Op1 = new | delete
            Op2 = get | next | is_set_ok | set | undo

There is no get_next.

What else might be causing this error?  'get' fails too:

snmpget -v1 -c public localhost:4000 SNMPv2-SMI::enterprises.99999.2.1.1.0

....

** SNMP MASTER-AGENT LOG: 
   apply: snmp_generic,table_func,[get,[0],[1],{otr_extstatus,mnesia}]

** SNMP MASTER-AGENT LOG: 
   returned: {'EXIT',{{badmatch,false},
                      [{snmp_generic,table_info,1},
                       {snmp_generic_mnesia,table_func,4},
                       {snmp_agent,dbg_apply,3},
                       {snmp_agent,get_value_all_rows,5},
                       {snmp_agent,get_tab_value_from_mib,3},
                       {snmp_agent,try_get,2},
                       {snmp_agent,do_get_local,3},
                       {snmp_agent,do_get,2}|
                       more]}}

What's causing the badmatch?!

Thankyou for your time,
-- 
David N. Welton



More information about the erlang-questions mailing list