Advertisement
lwcolton

Untitled

Mar 26th, 2014
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.43 KB | None | 0 0
  1. 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:
  2.  
  3. {ok, Pid} = snmpm:start_link(MgrOpts)
  4.  
  5. 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):
  6.  
  7. start_link(Opts) ->
  8. %% This start the manager top supervisor, which in turn
  9. %% starts the other processes.
  10. {ok, _} = snmpm_supervisor:start_link(normal, Opts),
  11. ok.
  12.  
  13.  
  14. Full traceback here:
  15.  
  16. Eshell V5.9.1 (abort with ^G)
  17. 1> snmp_test_manager:start_link([{options, [{config, [{dir,"/tmp"}, {db_dir, "/tmp"}]}]}, {agent_config, []}, {agent_target, "127.0.0.1"}]).
  18. ** exception exit: {case_clause,
  19. {'EXIT',
  20. {{badmatch,ok},
  21. [{snmp_test_manager,do_init,1,
  22. [{file,"snmp_test_manager.erl"},{line,133}]},
  23. {snmp_test_manager,init,1,
  24. [{file,"snmp_test_manager.erl"},{line,123}]},
  25. {gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},
  26. {proc_lib,init_p_do_apply,3,
  27. [{file,"proc_lib.erl"},{line,227}]}]}}}
  28. in function snmp_test_manager:init/1 (snmp_test_manager.erl, line 123)
  29. in call from gen_server:init_it/6 (gen_server.erl, line 304)
  30. in call from proc_lib:init_p_do_apply/3 (proc_lib.erl, line 227)
  31. 2>
  32. =ERROR REPORT==== 26-Mar-2014::08:35:05 ===
  33. ** Generic server snmpm_supervisor terminating
  34. ** Last message in was {'EXIT',<0.34.0>,
  35. {{case_clause,
  36. {'EXIT',
  37. {{badmatch,ok},
  38. [{snmp_test_manager,do_init,1,
  39. [{file,"snmp_test_manager.erl"},{line,133}]},
  40. {snmp_test_manager,init,1,
  41. [{file,"snmp_test_manager.erl"},{line,123}]},
  42. {gen_server,init_it,6,
  43. [{file,"gen_server.erl"},{line,304}]},
  44. {proc_lib,init_p_do_apply,3,
  45. [{file,"proc_lib.erl"},{line,227}]}]}}},
  46. [{snmp_test_manager,init,1,
  47. [{file,"snmp_test_manager.erl"},{line,123}]},
  48. {gen_server,init_it,6,
  49. [{file,"gen_server.erl"},{line,304}]},
  50. {proc_lib,init_p_do_apply,3,
  51. [{file,"proc_lib.erl"},{line,227}]}]}}
  52. ** When Server state == {state,
  53. {local,snmpm_supervisor},
  54. one_for_all,
  55. [{child,<0.46.0>,snmpm_server_sup,
  56. {snmpm_server_sup,start_link,
  57. [normal,
  58. [{config,[{dir,"/tmp"},{db_dir,"/tmp"}]}]]},
  59. transient,2000,supervisor,
  60. [snmpm_server_sup,supervisor]},
  61. {child,<0.45.0>,snmpm_misc_sup,
  62. {snmpm_misc_sup,start_link,[]},
  63. transient,2000,supervisor,
  64. [snmpm_misc_sup,supervisor]},
  65. {child,<0.37.0>,snmpm_config,
  66. {snmpm_config,start_link,
  67. [[{config,[{dir,"/tmp"},{db_dir,"/tmp"}]}]]},
  68. transient,2000,worker,
  69. [snmpm_config,gen_server]}],
  70. undefined,0,3600,[],snmpm_supervisor,
  71. [normal,[{config,[{dir,"/tmp"},{db_dir,"/tmp"}]}]]}
  72. ** Reason for termination ==
  73. ** {{case_clause,
  74. {'EXIT',
  75. {{badmatch,ok},
  76. [{snmp_test_manager,do_init,1,
  77. [{file,"snmp_test_manager.erl"},{line,133}]},
  78. {snmp_test_manager,init,1,
  79. [{file,"snmp_test_manager.erl"},{line,123}]},
  80. {gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},
  81. {proc_lib,init_p_do_apply,3,
  82. [{file,"proc_lib.erl"},{line,227}]}]}}},
  83. [{snmp_test_manager,init,1,[{file,"snmp_test_manager.erl"},{line,123}]},
  84. {gen_server,init_it,6,[{file,"gen_server.erl"},{line,304}]},
  85. {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,227}]}]}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement