Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Here is the error I receive when calling snmp_test_manager:start_link. On line 133 of that file, in do_init, there is the following line:
- {ok, Pid} = snmpm:start_link(MgrOpts)
- This results in a badmatch error because snmpm:start_link returns the atom ok, and not a tuple, as seen below (line 155, snmpm.erl):
- start_link(Opts) ->
- %% This start the manager top supervisor, which in turn
- %% starts the other processes.
- {ok, _} = snmpm_supervisor:start_link(normal, Opts),
- ok.
- Full traceback here:
- Eshell V5.9.1 (abort with ^G)
- 1> snmp_test_manager:start_link([{options, [{config, [{dir,"/tmp"}, {db_dir, "/tmp"}]}]}, {agent_config, []}, {agent_target, "127.0.0.1"}]).
- ** exception exit: {case_clause,
- {'EXIT',
- {{badmatch,ok},
- [{snmp_test_manager,do_init,1,
- [{file,"snmp_test_manager.erl"},{line,133}]},
- {snmp_test_manager,init,1,
- [{file,"snmp_test_manager.erl"},{line,123}]},
- {gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},
- {proc_lib,init_p_do_apply,3,
- [{file,"proc_lib.erl"},{line,227}]}]}}}
- in function snmp_test_manager:init/1 (snmp_test_manager.erl, line 123)
- in call from gen_server:init_it/6 (gen_server.erl, line 304)
- in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 227)
- 2>
- =ERROR REPORT==== 26-Mar-2014::08:35:05 ===
- ** Generic server snmpm_supervisor terminating
- ** Last message in was {'EXIT',<0.34.0>,
- {{case_clause,
- {'EXIT',
- {{badmatch,ok},
- [{snmp_test_manager,do_init,1,
- [{file,"snmp_test_manager.erl"},{line,133}]},
- {snmp_test_manager,init,1,
- [{file,"snmp_test_manager.erl"},{line,123}]},
- {gen_server,init_it,6,
- [{file,"gen_server.erl"},{line,304}]},
- {proc_lib,init_p_do_apply,3,
- [{file,"proc_lib.erl"},{line,227}]}]}}},
- [{snmp_test_manager,init,1,
- [{file,"snmp_test_manager.erl"},{line,123}]},
- {gen_server,init_it,6,
- [{file,"gen_server.erl"},{line,304}]},
- {proc_lib,init_p_do_apply,3,
- [{file,"proc_lib.erl"},{line,227}]}]}}
- ** When Server state == {state,
- {local,snmpm_supervisor},
- one_for_all,
- [{child,<0.46.0>,snmpm_server_sup,
- {snmpm_server_sup,start_link,
- [normal,
- [{config,[{dir,"/tmp"},{db_dir,"/tmp"}]}]]},
- transient,2000,supervisor,
- [snmpm_server_sup,supervisor]},
- {child,<0.45.0>,snmpm_misc_sup,
- {snmpm_misc_sup,start_link,[]},
- transient,2000,supervisor,
- [snmpm_misc_sup,supervisor]},
- {child,<0.37.0>,snmpm_config,
- {snmpm_config,start_link,
- [[{config,[{dir,"/tmp"},{db_dir,"/tmp"}]}]]},
- transient,2000,worker,
- [snmpm_config,gen_server]}],
- undefined,0,3600,[],snmpm_supervisor,
- [normal,[{config,[{dir,"/tmp"},{db_dir,"/tmp"}]}]]}
- ** Reason for termination ==
- ** {{case_clause,
- {'EXIT',
- {{badmatch,ok},
- [{snmp_test_manager,do_init,1,
- [{file,"snmp_test_manager.erl"},{line,133}]},
- {snmp_test_manager,init,1,
- [{file,"snmp_test_manager.erl"},{line,123}]},
- {gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},
- {proc_lib,init_p_do_apply,3,
- [{file,"proc_lib.erl"},{line,227}]}]}}},
- [{snmp_test_manager,init,1,[{file,"snmp_test_manager.erl"},{line,123}]},
- {gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},
- {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement