strange issue with amqp in a release
Closed this issue · 4 comments
Anyone seen this error while trying to connect to a rabbit node with TLS after an exrm release?
The code runs fine from iex -S mix
17:09:58.596 [info] Application wameku_client exited: WamekuClient.start(:normal, []) returned an error: shutdown: failed to start child: WamekuClient.Client.Producer
** (EXIT) exited in: :gen_server.call(#PID<0.864.0>, :connect, :infinity)
** (EXIT) an exception was raised:
** (FunctionClauseError) no function clause matching in :amqp_gen_connection.terminate/2
(amqp_client) src/amqp_gen_connection.erl:230: :amqp_gen_connection.terminate({:bad_return_value, {:error, {:cannot_start_application, :asn1, {'no such file or directory', 'asn1.app'}}}}, {#PID<0.863.0>, {:amqp_params_network, "07c35345ebe6159d0926de64c788a48a", "password", "07c35345ebe6159d0926de64c788a48a", '127.0.0.1', 5671, 0, 0, 60, :infinity, [verify: :verify_none, fail_if_no_peer_cert: false], [&:amqp_auth_mechanisms.plain/3, &:amqp_auth_mechanisms.amqplain/3], [], []}})
(stdlib) gen_server.erl:629: :gen_server.try_terminate/3
(stdlib) gen_server.erl:795: :gen_server.terminate/7
(stdlib) proc_lib.erl:247: :proc_lib.init_p_do_apply/3
{"Kernel pid terminated",application_controller,"{application_start_failure,wameku_client,{{shutdown,{failed_to_start_child,'Elixir.WamekuClient.Client.Producer',{{function_clause,[{amqp_gen_connection,terminate,[{bad_return_value,{error,{cannot_start_application,asn1,{\"no such file or directory\",\"asn1.app\"}}}},{<0.863.0>,{amqp_params_network,<<\"07c35345ebe6159d0926de64c788a48a\">>,<<\"password\">>,<<\"07c35345ebe6159d0926de64c788a48a\">>,\"127.0.0.1\",5671,0,0,60,infinity,[{verify,verify_none},{fail_if_no_peer_cert,false}],[#Fun<amqp_auth_mechanisms.plain.3>,#Fun<amqp_auth_mechanisms.amqplain.3>],[],[]}}],[{file,\"src/amqp_gen_connection.erl\"},{line,230}]},{gen_server,try_terminate,3,[{file,\"gen_server.erl\"},{line,629}]},{gen_server,terminate,7,[{file,\"gen_server.erl\"},{line,795}]},{proc_lib,init_p_do_apply,3,[{file,\"proc_lib.erl\"},{line,247}]}]},{gen_server,call,[<0.864.0>,connect,infinity]}}}},{'Elixir.WamekuClient',start,[normal,[]]}}}"}
Kernel pid terminated (application_controller) ({application_start_failure,wameku_client,{{shutdown,{failed_to_start_child,'Elixir.WamekuClient.Client.Producer',{{function_clause,[{amqp_gen_connection```
I did find that adding these applications fix it in case someone stumbles across this.
[:asn1, :public_key, :ssl]
follow up:
maybe we should add these deps to amqp mix?
Hi @bradleyd. Thanks for reporting! So to confirm the issue you experienced...
"When you connect to RabbitMQ via TLS, you need to add [:asn1, :public_key, :ssl]
to applications"
Does it describe the issue correctly?
We might want to avoid adding unnecessary dependencies but the information is definitely worth sharing. I am thinking of adding the information to README once I have understood the issue precisely.
I tried TLS RabbitMQ host with the latest code on master. It connected to the host without specifying applications. Maybe Elixir 1.4 (or latest OTP) doesn't have the problem any more? Closing this issue but please don't hesitate reopen if you can reproduce the issue with the latest amqp.