【rabbitmq】Authentication failed (rejected by the remote node), please check the Erlang cookie
前言
- erlang 23.1
- rabbitmq server v3.8.9
- win 10
問題描述
使用 rabbitmqctl 命令時出現錯誤:
C:\Program Files\RabbitMQ Server\rabbitmq_server-3.8.9\sbin> rabbitmqctl status Error: unable to perform an operation on node 'rabbit@DESKTOP-1GHM2HM'. Please see diagnostics information and suggestions below.Most common reasons for this are:* Target node is unreachable (e.g. due to hostname resolution, TCP connection or firewall issues)* CLI tool fails to authenticate with the server (e.g. due to CLI tool's Erlang cookie not matching that of the server)* Target node is not runningIn addition to the diagnostics info below:* See the CLI, clustering and networking guides on https://rabbitmq.com/documentation.html to learn more* Consult server logs on node rabbit@DESKTOP-1GHM2HM* If target node is configured to use long node names, don't forget to use --longnames with CLI toolsDIAGNOSTICS ===========attempted to contact: ['rabbit@DESKTOP-1GHM2HM']rabbit@DESKTOP-1GHM2HM:* connected to epmd (port 4369) on DESKTOP-1GHM2HM* epmd reports node 'rabbit' uses port 25672 for inter-node and CLI tool traffic* TCP connection succeeded but Erlang distribution failed* Authentication failed (rejected by the remote node), please check the Erlang cookieCurrent node details:* node name: 'rabbitmqcli-20064-rabbit@DESKTOP-1GHM2HM'* effective user's home directory: C:\Users\admin* Erlang cookie hash: 37DhljkMemAT0RSfiJUaUQ==有用的錯誤信息:Authentication failed (rejected by the remote node), please check the Erlang cookie
錯誤分析
官方說明 如下
核心思想是:RabbitMQ Windows service啟動時使用的 erlang cookie,與 RabbitMQ 命令行執行時使用的 erlang cookie,位置不一致。
解決辦法
官方解決辦法是:復制RabbitMQ Windows service啟動時使用的 erlang cookie,覆蓋掉RabbitMQ 命令行執行時使用的 erlang cookie。
非官方解決辦法有:
- 按照低版本的 erlang。(PS: 這個沒試過)
- 使用命令行啟動 RabbitMQ 。(執行 rabbitmq-server.bat 命令啟動 RabbitMQ)
參考
https://www.rabbitmq.com/cli.html#erlang-cookie
https://blog.csdn.net/J_Shine/article/details/78833456
https://www.cnblogs.com/hellxz/p/9104028.html
https://blog.csdn.net/yangl1337905751/article/details/80318055
https://www.rabbitmq.com/install-windows-manual.html
總結
以上是生活随笔為你收集整理的【rabbitmq】Authentication failed (rejected by the remote node), please check the Erlang cookie的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 新浪微博怎么看热搜榜
- 下一篇: Linux系统安装电脑如何装中文系统