RabbitMQ 凭据(RabbitMQ credentials)#
你可以使用以下凭据验证以下节点:
🌐 You can use these credentials to authenticate the following nodes:
支持的身份验证方法(Supported authentication methods)#
- 用户连接
相关资源(Related resources)#
有关该服务的更多信息,请参阅 RabbitMQ 的连接文档。
🌐 Refer to RabbitMQ's Connections documentation for more information about the service.
使用用户连接(Using user connection)#
要配置此凭证,你需要安装一个 RabbitMQ 代理 并且:
🌐 To configure this credential, you'll need to have a RabbitMQ broker installed and:
- 输入 RabbitMQ 代理的 主机名。
- 输入连接应使用的端口。
- 输入一个 用户,连接将使用该用户登录。
- 默认值是
guest。RabbitMQ 建议在生产环境中使用不同的用户。有关更多信息,请参阅 访问控制 | 基础知识。如果你在非本地主机连接中使用guest帐号,请参阅下面的guest用户问题 以获取故障排除提示。
- 默认值是
- 请输入用户的密码。
guest用户的默认密码是guest。
- 输入连接应使用的 Vhost 的虚拟主机。默认虚拟主机是
/。 - 选择连接是否应使用 SSL。如果启用,还需设置:
- 无密码:选择 SSL 证书连接用户使用 SASL 机制 EXTERNAL(关闭)或不使用密码(开启)。如果开启,你还需要输入:
- 客户端证书:粘贴要使用的 SSL 客户端证书的文本。
- 客户端密钥:粘贴要使用的 SSL 客户端密钥。
- 密码短语:粘贴要使用的 SSL 密码短语。
- CA 证书:粘贴要使用的 SSL CA 证书文本。
- 无密码:选择 SSL 证书连接用户使用 SASL 机制 EXTERNAL(关闭)或不使用密码(开启)。如果开启,你还需要输入:
访客用户问题(guest user issues)#
如果你使用 guest 用户进行凭证验证并尝试访问远程主机,你可能会看到连接错误。RabbitMQ 日志会显示如下错误:
🌐 If you use the guest user for the credential and you try to access a remote host, you may see a connection error. The RabbitMQ logs show an error like this:
1 | |
这是因为 RabbitMQ 禁止默认的 guest 用户从远程主机连接。它只能通过 localhost 连接。
🌐 This happens because RabbitMQ prohibits the default guest user from connecting from remote hosts. It can only connect over the localhost.
要解决此错误,你可以:
🌐 To resolve this error, you can:
- 更新
guest用户以允许其远程主机访问。 - 创建或使用另一个用户连接到远程主机。
guest用户是默认受限制的唯一用户。
有关详细信息,请参阅 “guest” 用户只能从本地主机连接。
🌐 Refer to "guest" user can only connect from localhost for more information.