Bri*_*ain 9 ssl rabbitmq lets-encrypt
我一直在尝试将我的 LetsEncrypt 生成的证书安装到我的 rabbitmq 服务器中,但没有成功。
为了在不必解决权限问题的情况下进行测试,我复制了 pem 文件
/etc/letsencrypt/live/<domain>/
Run Code Online (Sandbox Code Playgroud)
到我的主目录。我还将 cacert.pem 文件从我在以下位置找到的位置复制到我的主目录:
/home/<user>/.local/share/letsencrypt/lib/python2.7/site-packages/requests/cacert.pem
Run Code Online (Sandbox Code Playgroud)
我决定首先尝试通过编辑 rabbitmq.config 来在管理插件之上安装证书以添加
{rabbitmq_management,
[%% Pre-Load schema definitions from the following JSON file. See
%% http://www.rabbitmq.com/management.html#load-definitions
%%
%% {load_definitions, "/path/to/schema.json"},
%% Log all requests to the management HTTP API to a file.
%%
%% {http_log_dir, "/path/to/access.log"},
%% Change the port on which the HTTP listener listens,
%% specifying an interface for the web server to bind to.
%% Also set the listener to use SSL and provide SSL options.
%%
{listener, [{port, 12345},
{ip, "127.0.0.1"},
{ssl, true},
{ssl_opts, [{cacertfile, "/home/<user>/cacert.pem"}, %% File pulled from /home/<user>/.local....
{certfile, "/home/<user>/cert.pem"}, %% File pulled from /etc/letsencrypt/live/<domain>/cert.pem
{keyfile, "/home/<user>/privkey.pem"}]}]} %% File pulled from /etc/letsencrypt/live/<domain>/privkey.pem
Run Code Online (Sandbox Code Playgroud)
但是,当尝试导航到管理插件端口时,我的 rabbitmq 日志文件包含一个 tls_alert
=ERROR REPORT==== 14-Dec-2015::03:08:05 ===
application: mochiweb
"Accept failed error"
"{error,{tls_alert,\"decode error\"}}"
Run Code Online (Sandbox Code Playgroud)
我使用的是正确的文件还是我遇到了更深层次的问题?
更新证书生成详细信息:通过在以下位置克隆 git 存储库来安装 Lets encrypt:
git clone https://github.com/letsencrypt/letsencrypt
Run Code Online (Sandbox Code Playgroud)
证书创建详细信息。服务器证书是使用 Lets Encrypt 工具套件通过以下命令创建和安装的。
./letsencrypt-auto --server https://acme-v01.api.letsencrypt.org/directory -d <domain>
Run Code Online (Sandbox Code Playgroud)
需要注意的是,它是一个子域证书。例如,xxxx.domain.com。
更新 2 我已验证证书有效并且适用于问题的 AMQPS 部分。我修改了主配置选项以包含
{ssl_listeners, [5671]},
{ssl_options, [{cacertfile, "/etc/rabbitmq/chain1.pem"},
{certfile, "/etc/rabbitmq/cert1.pem"},
{keyfile, "/etc/rabbitmq/privkey1.pem"},
{verify, verify_none},
{fail_if_no_peer_cert, false}]}
Run Code Online (Sandbox Code Playgroud)
确实有问题RabbitMQ 3.2.4
。
Ubuntu 14.04
我在(RabbitMQ 3.2.4
和Erlang 16.b3
) 和Ubuntu 15.10
或Centos 7
(具有RabbitMQ 3.5.4
和)上做了完全相同的配置(和你一样,至少是 SSL 部分)Erlang 18.0
。
我让它在 3.5.4 中工作,而不是在 3.2.4 {mochiweb_socket_server,295,{acceptor_error,{error,accept_failed}}} 中工作。我还找不到任何打开的错误报告,但这肯定是与管理插件相关的问题,因为证书在最新版本中完美工作。
归档时间: |
|
查看次数: |
6235 次 |
最近记录: |