Efren
Efren

Reputation: 4907

SSL enabling for rabbitmq mangement. Server starts, but fails to accept requests

Followed the instructions for creating an SSL set of files with a self signed certificate according to rabbit docs.

I am using it for the management plugin instead only for now, by configuring rabbitmq.config like:

{rabbitmq_management, [ {http_log_dir, "/tmp/rabbit-mgmt"},

                            {rates_mode,    basic},

                            {listener, [{port,     7357},

                                        {ssl,      true},

                                        {ssl_opts, [{cacertfile, "/path/to/ca_certificate.pem"},
                                                    {certfile,   "/path/to/server_certificate.pem"},
                                                    {keyfile,    "/path/to/server_key.pem"},
                                                    {verify,verify_peer},
                                                    {fail_if_no_peer_cert,false}
                                                   ]}
                                       ]}
                          ]}

The server starts, and the https port seems open, however, the connection fails as soon as a request is received with:

=ERROR REPORT==== 25-Sep-2015::14:25:33 === application: mochiweb "Accept failed error" "{error,{options,{cacertfile,\"/path/to/ca_certificate.pem\",\n {error,eacces}}}}"

=ERROR REPORT==== 25-Sep-2015::14:25:33 === {mochiweb_socket_server,295,{acceptor_error,{error,accept_failed}}}

I tried chown and chgrp of the folders that have all the certificate files created by following the documentation, but still have the same access error.

Upvotes: 4

Views: 2479

Answers (1)

Efren
Efren

Reputation: 4907

The problem was related to file permissions, the folders were all granting rabbitmq read access, but they were inside another folder without access.

Upvotes: 2

Related Questions