Skip to content

RabbitMQ 凭据(RabbitMQ credentials)#

你可以使用以下凭据验证以下节点:

🌐 You can use these credentials to authenticate the following nodes:

支持的身份验证方法(Supported authentication methods)#

  • 用户连接

有关该服务的更多信息,请参阅 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:

  1. 输入 RabbitMQ 代理的 主机名
  2. 输入连接应使用的端口
  3. 输入一个 用户,连接将使用该用户登录。
    • 默认值是 guest。RabbitMQ 建议在生产环境中使用不同的用户。有关更多信息,请参阅 访问控制 | 基础知识。如果你在非本地主机连接中使用 guest 帐号,请参阅下面的 guest 用户问题 以获取故障排除提示。
  4. 请输入用户的密码
    • guest 用户的默认密码是 guest
  5. 输入连接应使用的 Vhost虚拟主机。默认虚拟主机是 /
  6. 选择连接是否应使用 SSL。如果启用,还需设置:
    • 无密码:选择 SSL 证书连接用户使用 SASL 机制 EXTERNAL(关闭)或不使用密码(开启)。如果开启,你还需要输入:
      • 客户端证书:粘贴要使用的 SSL 客户端证书的文本。
      • 客户端密钥:粘贴要使用的 SSL 客户端密钥。
      • 密码短语:粘贴要使用的 SSL 密码短语。
    • CA 证书:粘贴要使用的 SSL CA 证书文本。

访客用户问题(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
[错误] <0.918.0> PLAIN 登录被拒:用户 'guest' 只能通过本地主机连接

这是因为 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.