rabbitmq / rabbitmq-erlang-client

Erlang client for RabbitMQ
https://www.rabbitmq.com/
Other
184 stars 127 forks source link

Log noise when direct connection is rejected due to missing vhost or insufficient permissions #83

Closed michaelklishin closed 7 years ago

michaelklishin commented 7 years ago

Can be reproduced with rabbithole without running the setup steps:

2017-06-10 18:26:33.729 [error] <0.22639.157> Error on Direct connection <0.22639.157>
vhost not_found not found
2017-06-10 18:26:33.729 [error] <0.22639.157> ** Generic server <0.22639.157> terminating
** Last message in was connect
** When Server state == {state,amqp_direct_connection,{state,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined},undefined,{amqp_params_direct,<<"guest">>,<<"guest">>,not_found,rabbit@mercurio,none,[]},undefined,undefined,none,false}
** Reason for termination ==
** {{badrecord,amqp_adapter_info},[{amqp_direct_connection,i,2,[{file,"src/amqp_direct_connection.erl"},{line,117}]},{amqp_direct_connection,terminate,2,[{file,"src/amqp_direct_connection.erl"},{line,98}]},{gen_server,try_terminate,3,[{file,"gen_server.erl"},{line,629}]},{gen_server,terminate,7,[{file,"gen_server.erl"},{line,795}]},{gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,661}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,247}]}]}
2017-06-10 18:26:33.729 [error] <0.22639.157> CRASH REPORT Process <0.22639.157> with 0 neighbours exited with reason: bad record amqp_adapter_info in amqp_direct_connection:i/2 line 117 in gen_server:handle_msg/5 line 663
2017-06-10 18:26:33.729 [error] <0.22624.157> Supervisor {<0.22624.157>,amqp_connection_sup} had child connection started with amqp_gen_connection:start_link(<0.22580.157>, {amqp_params_direct,<<"guest">>,<<"guest">>,not_found,rabbit@mercurio,none,[]}) at <0.22639.157> exit with reason bad record amqp_adapter_info in amqp_direct_connection:i/2 line 117 in context child_terminated
2017-06-10 18:26:33.730 [error] <0.22624.157> Supervisor {<0.22624.157>,amqp_connection_sup} had child connection started with amqp_gen_connection:start_link(<0.22580.157>, {amqp_params_direct,<<"guest">>,<<"guest">>,not_found,rabbit@mercurio,none,[]}) at <0.22639.157> exit with reason reached_max_restart_intensity in context shutdown
2017-06-10 18:26:33.734 [error] <0.22628.157> Error on Direct connection <0.22628.157>
vhost not_found not found
2017-06-10 18:26:33.735 [error] <0.22628.157> ** Generic server <0.22628.157> terminating
** Last message in was connect
** When Server state == {state,amqp_direct_connection,{state,undefined,undefined,undefined,undefined,undefined,undefined,undefined,undefined},undefined,{amqp_params_direct,<<"guest">>,<<"guest">>,not_found,rabbit@mercurio,none,[]},undefined,undefined,none,false}

This process termination is harmless (the connection is terminating anyway) but it would be great to avoid polluting the log with scary looking messages.