我正在运行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
答案 0 :(得分:1)
将此添加到Dockerfile
:
RUN rabbitmq-plugins enable --offline rabbitmq_auth_backend_http