RabbitMQ啟動配置中出現(ArgumentError) argument error xxx的錯誤


  1. 最近在安裝RabbitMQ中,輸入rabbitmqctl status后出現這樣的錯誤

Status of node rabbit@Desktopxxxxx
** (ArgumentError) argument error
(stdlib) io_lib.erl:170: :io_lib.format(' * effective user's home directory: sn', [[67, 58, 92, 85, 115, 101, 114, 115, 92, 37329, 20108, 33804]])
src/rabbit_misc.erl:668: :rabbit_misc."-format_many/1-lc$^0/1-0-"/1
src/rabbit_misc.erl:668: :rabbit_misc."-format_many/1-lc$^0/1-0-"/1
src/rabbit_misc.erl:668: :rabbit_misc.format_many/1
(rabbitmqctl) lib/rabbitmqctl.ex:349: RabbitMQCtl.get_node_diagnostics/1
(rabbitmqctl) lib/rabbitmqctl.ex:307: RabbitMQCtl.format_error/3
(rabbitmqctl) lib/rabbitmqctl.ex:43: RabbitMQCtl.main/1
(elixir) lib/kernel/cli.ex:105: anonymous fn/3 in Kernel.CLI.exec_fun/2

網上查閱后發現是win的賬戶是中文名導致的錯誤,需要將中文名修改成英文名。參考的是這篇文章的方法修改。

https://blog.csdn.net/weixin_39112840/article/details/8635113

  1. 一般情況下1操作后RabbitMQ是不會載出問題的,然鵝,我再輸入rabbitmqctl status后又出現了這樣的報錯

Status of node rabbit@DESKTOP-xxxxxx ...

Error: unable to perform an operation on node 'rabbit@DESKTOP-xxxxxx'. 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 running

In addition to the diagnostics info below:

* See the CLI, clustering and networking guides on http://rabbitmq.com/documentation.html to learn more

* Consult server logs on node rabbit@DESKTOP-ECFDCQB

DIAGNOSTICS

===========

attempted to contact: ['rabbit@DESKTOP-xxxxxx']

rabbit@DESKTOP-xxxxxxxx:

* connected to epmd (port 4369) on DESKTOP-xxxxxxx

* 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 cookie

Current node details:

* node name: 'rabbitmqcli80@DESKTOP-xxxxxx'

* effective user's home directory: C:\Users\tracyclock

* Erlang cookie hash: Gue+A5xaV3AGwaGPZAEp3A==

解決方法有兩種:

  • (1) 將 C:\Users\Administrator下的erlang.cookie文件 替換C:\Windows\System32\config\systemprofile下的erlang.cookie 文件,然后再重啟服務
  • (2) 將RabbitMQ的登錄賬戶由本地賬戶設為當前登錄的用戶,然后再重啟服務,詳情請見這篇博文https://blog.csdn.net/dear_Alice_moon/article/details/79466568

試過上述的方法后,重啟服務后還是報第二種錯誤。於是我又看了一下安裝路徑,發現我的安裝路徑是D:\Program Files\RabbitMQ server.....我就想要不試一下換個路徑安裝,之后直接在D盤根目錄D:\RabbitMQ server安裝,居然成功了!!!

后面又查了一下,發現報錯的原因是安裝路徑中有空格,但是一般安裝RabbitMQ的時候默認是C:\Program Files...神坑,所以安裝的時候一定要注意修改安裝路徑!不要有中文或者空格的目錄。。。


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM