当我执行sudo rabbitmqctl add_user james mypassword
时,它会返回:
Creating user "james" ...
Error: {badarg,
[{erlang,group_leader,[undefined,<5490.18387.0>],[]},
{rabbit_log,with_local_io,1,
[{file,"src/rabbit_log.erl"},{line,99}]},
{rabbit_auth_backend_internal,add_user,2,
[{file,"src/rabbit_auth_backend_internal.erl"},{line,149}]},
{rpc,'-handle_call_call/6-fun-0-',5,
[{file,"rpc.erl"},{line,206}]}]}
我之前没有遇到过这个问题。然而它最近产生了这个错误,我不知道为什么。当我尝试sudo rabbitmqctl stop
时,它也会返回相同的错误:
Stopping and halting node rabbit@postr ...
Error: {badarg,[{erlang,group_leader,[undefined,<5490.18408.0>],[]},
{rabbit_log,with_local_io,1,
[{file,"src/rabbit_log.erl"},{line,99}]},
{rabbit,'-stop_and_halt/0-after$^0/0-0-',0,
[{file,"src/rabbit.erl"},{line,387}]},
{rabbit,stop_and_halt,0,[{file,"src/rabbit.erl"},{line,384}]},
{rpc,'-handle_call_call/6-fun-0-',5,
[{file,"rpc.erl"},{line,206}]}]}
我的rabbitmq日志文件如下所示:
=ERROR REPORT==== 1-May-2018::21:48:06 ===
closing AMQP connection <0.14307.0> (174.824.62.219:39718 -> 174.824.62.219:5672):
{handshake_error,starting,0,
{amqp_error,access_refused,
"AMQPLAIN login refused: user 'james' - invalid credentials",
'connection.start_ok'}}
但是,用户james
现在不存在,sudo rabbitmqctl list_users
会返回:
Listing users ...
guest [administrator]
我已尝试将CELERY_BROKER_URL
从'amqp://{}:{}@174.824.62.219/vhost'.format(config('RABBIT_USER'), config('RABBIT_PW'))
更改为'amqp://guest:guest@localhost'
- 但仍会遇到同样的错误。
知道问题是什么吗?
修改
我也试过service rabbitmq-server start
(重启rabbitmq),然后返回:
Job for rabbitmq-server.service failed because the control process exited with error code.
See "systemctl status rabbitmq-server.service" and "journalctl -xe" for details.
所以systemctl status rabbitmq-server.service
返回:
● rabbitmq-server.service - RabbitMQ Messaging Server
Loaded: loaded (/lib/systemd/system/rabbitmq-server.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2018-05-03 07:30:37 UTC; 19s ago
Process: 29946 ExecStop=/usr/sbin/rabbitmqctl stop (code=exited, status=2)
Process: 8566 ExecStartPost=/usr/lib/rabbitmq/bin/rabbitmq-server-wait (code=exited, status=2)
Process: 8565 ExecStart=/usr/sbin/rabbitmq-server (code=exited, status=1/FAILURE)
Main PID: 8565 (code=exited, status=1/FAILURE)
输出:
(env) james@postr:~/postr$ sudo netstat -plant
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 1403/sshd
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 8409/postgres
tcp 0 0 0.0.0.0:443 0.0.0.0:* LISTEN 4690/nginx -g daemo
tcp 0 0 0.0.0.0:25672 0.0.0.0:* LISTEN 10518/beam
tcp 0 0 0.0.0.0:80 0.0.0.0:* LISTEN 4690/nginx -g daemo
tcp 0 0 0.0.0.0:4369 0.0.0.0:* LISTEN 30095/epmd
tcp 0 0 127.0.0.1:51656 127.0.0.1:4369 TIME_WAIT -
tcp 0 0 127.0.1.1:4369 127.0.0.1:35352 TIME_WAIT -
tcp 0 332 174.824.62.219:22 49.194.155.110:49861 ESTABLISHED 5856/sshd: james [p
tcp 0 0 127.0.0.1:59810 127.0.0.1:4369 TIME_WAIT -
tcp 0 0 127.0.0.1:56945 127.0.1.1:25672 TIME_WAIT -
tcp 0 0 127.0.0.1:4369 127.0.0.1:41000 ESTABLISHED 30095/epmd
tcp 0 0 127.0.0.1:41000 127.0.0.1:4369 ESTABLISHED 10518/beam
tcp 0 0 127.0.1.1:4369 127.0.0.1:51514 TIME_WAIT -
tcp 0 0 127.0.1.1:4369 127.0.0.1:48547 TIME_WAIT -
tcp 0 0 127.0.0.1:57392 127.0.0.1:4369 TIME_WAIT -
tcp6 0 0 :::22 :::* LISTEN 1403/sshd
tcp6 0 0 :::5672 :::* LISTEN 10518/beam
tcp6 0 0 :::80 :::* LISTEN 4690/nginx -g daemo
tcp6 0 0 :::4369 :::* LISTEN 30095/epmd
答案 0 :(得分:1)
似乎在云上使用了512MB RAM VM,这对于RabbitMQ来说太低了。你应该至少拿1GB,建议2GB。
拿一台新机器然后全部工作