[rabbitmq-discuss] Mochiweb / SSL failing to boot on esl-erlang R16B01

Simon MacMullen simon at rabbitmq.com
Tue Sep 10 10:14:58 BST 2013


Can you confirm which version of RabbitMQ you're using? There was 
definitely a bug in this area that was fixed in 3.1.2.

If you're using >= 3.1.2, are you using SSL *just* for mgmt? What 
happens if you enable it for AMQP as well?

Cheers, Simon

On 10/09/2013 10:03AM, Ceri Storey wrote:
> Hi there.
>
> We're using Erlang Solutions' packages of erlang for ubuntu
> (specifically1:16.b.1-1~ubuntu~precise) , and there seems to be some bad
> interaction between this, mochiweb, and ssl, meaning that the ASN1
> application (seemingly) doesn't get started on boot, and rabbit crashes
> trying to start the mochiweb listeners (crash logs below).
>
> The odd thing is, that with a version of R16B01 built from source with
> kerl <https://github.com/spawngrid/kerl>, everything works perfectly
> well. Also, we can work around this by adding ssl as an application
> dependency to either the mochiweb .app or the rabbit .app descriptor
> files. But we'd like to understand this better, and get the root issue
> fixed.
>
> I don't suppose that anyone could shed any light on this, perhaps?
>
> Thanks.
>
> ---
>
> -- Rabbit Log
> =ERROR REPORT==== 9-Sep-2013::16:21:22 ===
> ** Generic server rabbit_web_dispatch_registry terminating
> ** Last message in was {add,rabbit_mgmt,
>                             [{port,15672},
>                              {ssl,true},
>                              {ssl_opts,
>                                  [{cacertfile,
> "/etc/ssl/certs/cacert.pem"},
>                                   {certfile,
> "/etc/ssl/certs/my-certfile.crt"},
>                                   {keyfile,
> "/etc/ssl/rabbit/my-certfile.key"}]}],
> #Fun<rabbit_web_dispatch.1.31447083>,
> #Fun<rabbit_mgmt_app.2.5043001>,
>                             {[],"RabbitMQ Management"}}
> ** When Server state == undefined
> ** Reason for termination ==
> ** {could_not_start_listener,
>         [{port,15672},
>          {ssl,true},
>          {ssl_opts,
>              [{cacertfile,"/etc/ssl/certs/cacert.pem"},
>               {certfile,"/etc/ssl/certs/my-certfile.crt"},
> {keyfile,"/etc/ssl/rabbit/my-certfile.key"}]}],
>         {'EXIT',
>             {{case_clause,{error,{not_started,asn1}}},
>              [{mochiweb,ensure_started,1,[]},
>               {mochiweb_socket_server,prep_ssl,1,[]},
>               {mochiweb_socket_server,start_server,2,[]},
>               {supervisor,do_start_child,2,
>                   [{file,"supervisor.erl"},{line,310}]},
>               {supervisor,handle_start_child,2,
>                   [{file,"supervisor.erl"},{line,681}]},
> {supervisor,handle_call,3,[{file,"supervisor.erl"},{line,390}]},
> {gen_server,handle_msg,5,[{file,"gen_server.erl"},{line,585}]},
>               {proc_lib,init_p_do_apply,3,
>                   [{file,"proc_lib.erl"},{line,239}]}]}}}
>
> -- Sasl log
>
> =CRASH REPORT==== 9-Sep-2013::16:21:22 ===
>    crasher:
>      initial call: rabbit_web_dispatch_registry:init/1
>      pid: <0.258.0>
>      registered_name: rabbit_web_dispatch_registry
>      exception exit: {could_not_start_listener,
>                          [{port,15672},
>                           {ssl,true},
>                           {ssl_opts,
> [{cacertfile,"/etc/ssl/certs/cacert.pem"},
>                                {certfile,
> "/etc/ssl/certs/my-certfile.crt"},
>                                {keyfile,
> "/etc/ssl/rabbit/my-certfile.key"}]}],
>                          {'EXIT',
> {{case_clause,{error,{not_started,asn1}}},
> [{mochiweb,ensure_started,1,[]},
> {mochiweb_socket_server,prep_ssl,1,[]},
> {mochiweb_socket_server,start_server,2,[]},
>                                {supervisor,do_start_child,2,
> [{file,"supervisor.erl"},{line,310}]},
> {supervisor,handle_start_child,2,
> [{file,"supervisor.erl"},{line,681}]},
>                                {supervisor,handle_call,3,
> [{file,"supervisor.erl"},{line,390}]},
>                                {gen_server,handle_msg,5,
> [{file,"gen_server.erl"},{line,585}]},
>                                {proc_lib,init_p_do_apply,3,
> [{file,"proc_lib.erl"},{line,239}]}]}}}
>        in function  gen_server:terminate/6 (gen_server.erl, line 744)
>      ancestors: [rabbit_web_dispatch_sup,<0.256.0>]
>      messages: []
>      links: [<0.257.0>]
>      dictionary: []
>      trap_exit: false
>      status: running
>      heap_size: 4185
>      stack_size: 27
>      reductions: 594
>    neighbours:
>
> =SUPERVISOR REPORT==== 9-Sep-2013::16:21:22 ===
>       Supervisor: {local,rabbit_web_dispatch_sup}
>       Context:    child_terminated
>       Reason:     {could_not_start_listener,
>                       [{port,15672},
>                        {ssl,true},
>                        {ssl_opts,
> [{cacertfile,"/etc/ssl/certs/cacert.pem"},
>                             {certfile,
> "/etc/ssl/certs/my-certfile.crt"},
>                             {keyfile,
> "/etc/ssl/rabbit/my-certfile.key"}]}],
>                       {'EXIT',
> {{case_clause,{error,{not_started,asn1}}},
>                            [{mochiweb,ensure_started,1,[]},
> {mochiweb_socket_server,prep_ssl,1,[]},
> {mochiweb_socket_server,start_server,2,[]},
>                             {supervisor,do_start_child,2,
> [{file,"supervisor.erl"},{line,310}]},
> {supervisor,handle_start_child,2,
> [{file,"supervisor.erl"},{line,681}]},
>                             {supervisor,handle_call,3,
> [{file,"supervisor.erl"},{line,390}]},
>                             {gen_server,handle_msg,5,
> [{file,"gen_server.erl"},{line,585}]},
>                             {proc_lib,init_p_do_apply,3,
> [{file,"proc_lib.erl"},{line,239}]}]}}}
>       Offender:   [{pid,<0.258.0>},
>                    {name,rabbit_web_dispatch_registry},
> {mfargs,{rabbit_web_dispatch_registry,start_link,[]}},
>                    {restart_type,transient},
>                    {shutdown,5000},
>                    {child_type,worker}]
>
>
> =CRASH REPORT==== 9-Sep-2013::16:21:22 ===
>    crasher:
>      initial call: application_master:init/4
>      pid: <0.260.0>
>      registered_name: []
>      exception exit: {bad_return,
>                       {{rabbit_mgmt_app,start,[normal,[]]},
>                        {'EXIT',
>                         {{could_not_start_listener,
>                           [{port,15672},
>                            {ssl,true},
>                            {ssl_opts,
> [{cacertfile,"/etc/ssl/certs/cacert.pem"},
>                              {certfile,
> "/etc/ssl/certs/my-certfile.crt"},
>                              {keyfile,
> "/etc/ssl/rabbit/my-certfile.key"}]}],
>                           {'EXIT',
> {{case_clause,{error,{not_started,asn1}}},
>                             [{mochiweb,ensure_started,1,[]},
> {mochiweb_socket_server,prep_ssl,1,[]},
> {mochiweb_socket_server,start_server,2,[]},
>                              {supervisor,do_start_child,2,
> [{file,"supervisor.erl"},{line,310}]},
> {supervisor,handle_start_child,2,
> [{file,"supervisor.erl"},{line,681}]},
>                              {supervisor,handle_call,3,
> [{file,"supervisor.erl"},{line,390}]},
>                              {gen_server,handle_msg,5,
> [{file,"gen_server.erl"},{line,585}]},
>                              {proc_lib,init_p_do_apply,3,
> [{file,"proc_lib.erl"},{line,239}]}]}}},
>                          {gen_server,call,
>                           [rabbit_web_dispatch_registry,
>                            {add,rabbit_mgmt,
>                             [{port,15672},
>                              {ssl,true},
>                              {ssl_opts,
> [{cacertfile,"/etc/ssl/certs/cacert.pem"},
>                                {certfile,
> "/etc/ssl/certs/my-certfile.crt"},
>                                {keyfile,
> "/etc/ssl/rabbit/my-certfile.key"}]}],
> #Fun<rabbit_web_dispatch.1.31447083>,
> #Fun<rabbit_mgmt_app.2.5043001>,
>                             {[],"RabbitMQ Management"}},
>                            infinity]}}}}}
>        in function  application_master:init/4 (application_master.erl,
> line 133)
>      ancestors: [<0.259.0>]
>      messages: [{'EXIT',<0.261.0>,normal}]
>      links: [<0.259.0>,<0.7.0>]
>      dictionary: []
>      trap_exit: true
>      status: running
>      heap_size: 4185
>      stack_size: 27
>      reductions: 423
>    neighbours:
>
>
>
> _______________________________________________
> rabbitmq-discuss mailing list
> rabbitmq-discuss at lists.rabbitmq.com
> https://lists.rabbitmq.com/cgi-bin/mailman/listinfo/rabbitmq-discuss
>

-- 
Simon MacMullen
RabbitMQ, Pivotal


More information about the rabbitmq-discuss mailing list