我一直在试图安装我的LetsEncrypt生成的证书到我的rabbitmq服务器,但没有运气。
为了testing事情与出局必须反对权限问题,我已经复制了pem文件
/etc/letsencrypt/live/<domain>/
到我的主目录。 我也从我find它的位置复制cacert.pem文件到我的主目录:
/home/<user>/.local/share/letsencrypt/lib/python2.7/site-packages/requests/cacert.pem
我决定首先尝试通过编辑要添加的rabbitmq.config来在pipe理插件上安装证书
{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
但是,当试图导航到pipe理插件端口时,我的rabbitmq日志文件包含tls_alert
=ERROR REPORT==== 14-Dec-2015::03:08:05 === application: mochiweb "Accept failed error" "{error,{tls_alert,\"decode error\"}}"
我正在使用正确的文件还是有可能是我遇到的更深层次的问题?
更新证书生成详细信息:让encryption通过克隆git存储库安装在:
git clone https://github.com/letsencrypt/letsencrypt
证书创build细节。 服务器证书是使用Lets Encrypt工具套件使用以下命令创build和安装的。
./letsencrypt-auto --server https://acme-v01.api.letsencrypt.org/directory -d <domain>
需要注意的是它是一个子域证书。 例如,xxxx.domain.com。
更新2我已经validation证书是有效的,并为问题的AMQPS部分工作。 我修改了主要的configuration选项来包含
{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}]}
请参阅附加的图像以获取启用SSL的Pika客户端的屏幕截图
RabbitMQ 3.2.4确实存在一个问题。
我在Ubuntu 14.04 ( RabbitMQ 3.2.4和Erlang 16.b3 )和Ubuntu 15.10或Centos 7 (有RabbitMQ 3.5.4和Erlang 18.0 )上做了完全相同的configuration(至less是SSL部分)。
我得到它在3.5.4工作,而不是在3.2.4 {mochiweb_socket_server,295,{acceptor_error,{error,accept_failed}}}。 我找不到任何打开的错误报告,但它肯定是一个与pipe理插件相关的问题,因为这些证书在更新的版本中是完美的。