我在docker容器中安装了rabbitmq。我用centos:latest镜像创建了这个容器。我遵循的安装rabbitmq的步骤如下,
此时,我可以使用URL http://localhost:15672
访问管理控制台,而不会出现问题。然后我添加了一个自定义配置/etc/rabbitmq/rabbitmq.config文件。内容(如果该文件如下)
[
{ rabbit, [
{ loopback_users, [ ] },
{ tcp_listeners, [ ] },
{ ssl_listeners, [ 5671 ] },
{ ssl_options, [
{ cacertfile, "/path/to/cacert" },
{ certfile, "/path/to/cert" },
{ fail_if_no_peer_cert, false },
{ keyfile, "/path/to/key" },
{ verify, verify_peer }
] },
{ hipe_compile, false }
] },
{ rabbitmq_management, [ { listener, [
{ port, 15672 },
{ ssl, true },
{ ssl_opts, [
{ cacertfile, "/path/to/cacert" },
{ certfile, "/path/to/cert" },
{ keyfile, "/path/to/key.pem" },
{ fail_if_no_peer_cert, false },
{ verify, verify_none }
] }
] } ] }
].
然后,我重新启动了Rabbitmq-service并尝试使用URL https://localhost:15672进行连接。但是没有连接,
rabbitmq日志文件中有以下错误日志,
=ERROR REPORT==== 6-Jul-2018::07:35:18 ===
application: mochiweb
"Accept failed error"
"{'EXIT',\n {{function_clause,\n [{ssl_cipher,hash_algorithm,\"\\b\",\n [{file,\"ssl_cipher.erl\"},{line,1175}]},\n {ssl_handshake,'-dec_hello_extensions/2-blc$^0/1-1-',1,\n [{file,\"ssl_handshake.erl\"},{line,1649}]},\n {ssl_handshake,'-dec_hello_extensions/2-blc$^0/1-1-',1,\n [{file,\"ssl_handshake.erl\"},{line,1650}]},\n {ssl_handshake,dec_hello_extensions,2,\n [{file,\"ssl_handshake.erl\"},{line,1649}]},\n {tls_handshake,decode_handshake,3,\n [{file,\"tls_handshake.erl\"},{line,182}]},\n {tls_handshake,get_tls_handshake_aux,3,\n [{file,\"tls_handshake.erl\"},{line,153}]},\n {tls_connection,next_state,4,\n [{file,\"tls_connection.erl\"},{line,454}]},\n {gen_fsm,handle_msg,7,[{file,\"gen_fsm.erl\"},{line,505}]}]},\n {gen_fsm,sync_send_all_state_event,[<0.500.0>,{start,20000},infinity]}}}"
此错误的原因可能是什么?任何想法。预先感谢。
答案 0 :(得分:2)
发生错误{function_clause, [{ssl_cipher,hash_algorithm,"\b", [{file,"ssl_cipher.erl"},{line,1196}]}
是由于Erlang中的SSL应用程序的旧版本与现代Web浏览器之间的不兼容。将Erlang升级到至少18.0版可以解决此问题。
此问题的ID为OTP-12829,在release notes中被描述为:
OTP-12829 Gracefully ignore proprietary hash_sign algorithms