SNMP manager problem in handle_register_agent/4

Micael Karlberg bmk@REDACTED
Wed Apr 19 10:34:09 CEST 2006


Hi,

I changed the paths in your config file, and it ran just fine.

Try running this after enabling verbosity for config (set it to trace
instead of silence).
Also, just to be sure, you don't have a machine named 'default' do you?

/BMK

karol skocik wrote:
> Hi dear Erlangers!
>   I am having an obscure problem with SNMP manager. I have developed a
> SNMP agent application in Erlang couple months ago (my first Erlang
> app!! hopefully not last :-), and now, at the time of integration and
> internal testing, I am not able to make the manager running for
> testing of the agent. I have tried many times a configuration changes
> with snmp:config(), dumbing SNMP to v1 with no security (not really
> usable for us, but to achieve a minimum functionality), and also I
> have tried trapexit's howto, but no luck so far. I am quite puzzled,
> since I think I didn't change anything in the process of
> configuration, but since no other Erlang user is signalling problems
> with the manager, it seems that the problem must be on my side.
> 
> When I start erl with config files for manager, and I do
> application:start(snmp) I get immediately a very badly formated error
> (because it was stringified), which after unstringing and some
> indentation looks like this :
> 
> md@REDACTED ~/md_projects/snmp/manager $ ./run_manager
> Erlang (BEAM) emulator version 5.4.13 [source] [hipe]
> 
> Eshell V5.4.13  (abort with ^G)
> (manager@REDACTED)1> application:start(snmp).
> 
> =ERROR REPORT==== 19-Apr-2006::09:10:55 ===
> [snmpm_config] init exit: {{badmatch,{error,not_found}},
>                            [{snmpm_config,handle_register_agent,4},
>                             {snmpm_config,init_agent_config,1},
>                             {snmpm_config,init_agents_config,1},
>                             {snmpm_config,do_init,1},
>                             {snmpm_config,init,1},
>                             {gen_server,init_it,6},
>                             {proc_lib,init_p,5}]}
> 
> =INFO REPORT==== 19-Apr-2006::09:10:55 ===
>     application: snmp
>     exited: invalid return value from snmp_app:start(normal,[]) ->
>     {'EXIT',{{badmatch,{error,
> 			{shutdown,
> 			 {child,
> 			  undefined,
> 			  snmpm_supervisor,
> 			  {snmpm_supervisor,
> 			   start_link,[normal,
> 				       [{priority,normal},
> 					{versions,[v1]},
> 					{config,[{dir,"/home/md/md_projects/snmp/manager/conf/"},
> 						 {verbosity,silence},
> 						 {db_dir,"/home/md/md_projects/snmp/manager/db/"},
> 						 {repair,true},
> 						 {auto_save,5000}]},
> 					{inform_request_behaviour,auto},
> 					{mibs,[]},
> 					{server,
> 					 [{timeout,30000},
> 					  {verbosity,silence}]},
> 					{note_store,
> 					 [{timeout,30000},
> 					  {verbosity,silence}]},
> 					{net_if,
> 					 [{module,snmpm_net_if},
> 					  {verbosity,log},
> 					  {options,
> 					   [{bind_to,false},
> 					    {no_reuse,false}]}]},
> 					{def_user_mod,
> 					 snmpm_user_default},
> 					{def_user_data,
> 					 undefined}]]},
> 			  transient,2000,
> 			  supervisor,[snmpm_supervisor,supervisor]}}}},
> 	     [{snmp_app,start,2},{application_master,start_it_old,4}]}}
>     type: temporary
>       {error,"invalid return value from snmp_app:start(normal,[]) ->
> {'EXIT',{{... the same error here stringified  "
> 
> I am running on :
> md@REDACTED ~/md_projects $ uname -a
> Linux saturn 2.6.14-gentoo-r4 #5 SMP PREEMPT Sun Jan 29 09:45:05 CET
> 2006 i686 Intel(R) Celeron(R) M processor         1.40GHz GenuineIntel
> GNU/Linux
> 
> The config files (the paths must be changed) are in the attachment, I
> hope somebody with the Erlang SNMP knowledge will take a look at that,
> and tell the rookie what is the problem. (And help spreading Erlang in
> our company & beyond ;-)
> 
> Thanks for your time,
>   Karol Skocik



More information about the erlang-questions mailing list