我正在运行rabbitmq:3.7.6
docker image并具有以下rabbitmq.conf
文件:
auth_backends.1 = http
auth_http.user_path = http://1.2.3.4/api/rmq/user
auth_http.vhost_path = http://1.2.3.4/api/rmq/vhost
auth_http.resource_path = http://1.2.3.4/api/rmq/resource
auth_http.topic_path = http://1.2.3.4/api/rmq/topic
当我运行服务器时,它崩溃并显示以下错误,这使我相信未安装
auth_backend_http
,即使文档说默认情况下它随RabbitMQ一起提供。BOOT FAILED
===========
Config file generation failed 16:11:41.266 [error] You've tried to set auth_http.user_path, but there is no setting with that name.
16:11:41.266 [error] Did you mean one of these?
16:11:41.279 [error] ssl_options.depth
16:11:41.279 [error] auth_backends.$num
16:11:41.279 [error] auth_mechanisms.$name
16:11:41.279 [error] You've tried to set auth_http.vhost_path, but there is no setting with that name.
16:11:41.279 [error] Did you mean one of these?
16:11:41.292 [error] auth_backends.$num
16:11:41.292 [error] auth_mechanisms.$name
16:11:41.292 [error] default_vhost
16:11:41.292 [error] You've tried to set auth_http.resource_path, but there is no setting with that name.
16:11:41.292 [error] Did you mean one of these?
16:11:41.307 [error] auth_backends.$num.authn
16:11:41.307 [error] auth_backends.$num.authz
16:11:41.307 [error] auth_mechanisms.$name
16:11:41.307 [error] You've tried to set auth_http.topic_path, but there is no setting with that name.
16:11:41.307 [error] Did you mean one of these?
16:11:41.319 [error] auth_backends.$num
16:11:41.319 [error] auth_mechanisms.$name
16:11:41.319 [error] net_ticktime
16:11:41.319 [error] Error generating configuration in phase transform_datatypes
16:11:41.319 [error] Conf file attempted to set unknown variable: auth_http.topic_path
16:11:41.319 [error] Conf file attempted to set unknown variable: auth_http.resource_path
16:11:41.320 [error] Conf file attempted to set unknown variable: auth_http.vhost_path
16:11:41.320 [error] Conf file attempted to set unknown variable: auth_http.user_path
编辑:当我
RUN ls /plugins
时,我得到以下信息:README
...
rabbitmq_auth_backend_cache-3.7.6.ez
rabbitmq_auth_backend_http-3.7.6.ez
rabbitmq_auth_backend_ldap-3.7.6.ez
rabbitmq_auth_mechanism_ssl-3.7.6.ez
最佳答案
将此添加到Dockerfile
:
RUN rabbitmq-plugins enable --offline rabbitmq_auth_backend_http
关于docker - 未在Rabbit MQ Docker镜像3.7.6上安装auth_backend_http,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/50952903/