gpt4 book ai didi

docker - 启用ssl后无法连接到Rabbitmq管理控制台-centos docker容器

转载 作者:行者123 更新时间:2023-12-02 18:21:45 28 4
gpt4 key购买 nike

我在docker容器中安装了rabbitmq。我用centos:latest镜像创建了这个容器。我遵循的安装rabbitmq的步骤如下,

  • yum -y更新&& yum -y安装epel-release && yum -y安装wget logrotate
  • wget https://www.rabbitmq.com/releases/rabbitmq-server/v3.6.1/rabbitmq-server-3.6.1-1.noarch.rpm
  • rpm-导入https://www.rabbitmq.com/rabbitmq-signing-key-public.asc
  • yum安装rabbitmq-server-3.6.1-1.noarch.rpm
  • 服务rabbitmq-server启动
  • Rabbitmqctl add_user admin管理员
  • Rabbitmqctl set_user_tags管理员管理员
  • rabbitmqctl set_permissions -p /管理员“。” “。” “。*”
  • rabbitmq-plugins启用rabbitmq_management

  • 在这一点上,我可以使用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]}}}"

    发生此错误的原因可能是什么?任何的想法。提前致谢。

    最佳答案

    出现{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

    关于docker - 启用ssl后无法连接到Rabbitmq管理控制台-centos docker容器,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51206548/

    28 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com