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启动配置中出现(ArgumentError) argument error xxx的错误_第1张图片

后面又查了一下,发现报错的原因是安装路径中有空格,但是一般安装RabbitMQ的时候默认是C:\Program Files...神坑,所以安装的时候一定要注意修改安装路径!不要有中文或者空格的目录。。。

你可能感兴趣的:(RabbitMQ启动配置中出现(ArgumentError) argument error xxx的错误)