报错集:部署OpenStack时配置Rabbitmq时报错!
Posted handsomeboy-东
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了报错集:部署OpenStack时配置Rabbitmq时报错!相关的知识,希望对你有一定的参考价值。
错误信息:
[root@ct my.cnf.d]# rabbitmqctl add_user openstack RABBIT_PASS
Error: unable to connect to node rabbit@localhost: nodedown
DIAGNOSTICS
===========
attempted to contact: [rabbit@localhost]
rabbit@localhost:
* connected to epmd (port 4369) on localhost
* epmd reports node 'rabbit' running on port 25672
* TCP connection succeeded but Erlang distribution failed
* Hostname mismatch: node "rabbit@ct" believes its host is different. Please ensure that hostnames resolve the same way locally and on "rabbit@ct"
current node details:
- node name: 'rabbitmq-cli-89@ct'
- home dir: /var/lib/rabbitmq
- cookie hash: JaJgWu1V8awy8CXzmXvTpw==
解决方法:
[root@ct my.cnf.d]# ps aux | grep mq #找到mq进程
rabbitmq 38842 0.7 0.8 3920452 64148 ? Ssl 22:04 0:03 /usr/lib64/erlang/erts-8.3.5.3/bin/beam.smp -W w -A 64 -P 1048576 -t 5000000 -stbt db -zdbbl 128000 -K true -- -root /usr/lib64/erlang -progname erl -- -home /var/lib/rabbitmq -- -pa /usr/lib/rabbitmq/lib/rabbitmq_server-3.6.16/ebin -noshell -noinput -s rabbit boot -sname rabbit@ct -boot start_sasl -config /etc/rabbitmq/rabbitmq -kernel inet_default_connect_options [{nodelay,true}] -sasl errlog_type error -sasl sasl_error_logger false -rabbit error_logger {file,"/var/log/rabbitmq/rabbit@ct.log"} -rabbit sasl_error_logger {file,"/var/log/rabbitmq/rabbit@ct-sasl.log"} -rabbit enabled_plugins_file "/etc/rabbitmq/enabled_plugins" -rabbit plugins_dir "/usr/lib/rabbitmq/plugins:/usr/lib/rabbitmq/lib/rabbitmq_server-3.6.16/plugins" -rabbit plugins_expand_dir "/var/lib/rabbitmq/mnesia/rabbit@ct-plugins-expand" -os_mon start_cpu_sup false -os_mon start_disksup false -os_mon start_memsup false -mnesia dir "/var/lib/rabbitmq/mnesia/rabbit@ct" -kernel inet_dist_listen_min 25672 -kernel inet_dist_listen_max 25672
rabbitmq 39053 0.0 0.0 4352 544 ? Ss 22:04 0:00 erl_child_setup 1024
rabbitmq 39067 0.0 0.0 11588 456 ? Ss 22:04 0:00 inet_gethost 4
rabbitmq 39068 0.0 0.0 13712 692 ? S 22:04 0:00 inet_gethost 4
root 39465 0.0 0.0 112724 984 pts/0 S+ 22:10 0:00 grep --color=auto mq
[root@ct my.cnf.d]# kill -9 38842 #杀死进程
[root@ct my.cnf.d]# rabbitmq-server -detached
Warning: PID file not written; -detached was passed.
[root@ct my.cnf.d]# rabbitmqctl stop
Stopping and halting node rabbit@localhost
[root@ct my.cnf.d]# rabbitmq-server -detached 重启rabbitmq
Warning: PID file not written; -detached was passed.
[root@ct my.cnf.d]# rabbitmqctl add_user openstack RABBIT_PASS #再创建用户即可
Creating user "openstack"
以上是关于报错集:部署OpenStack时配置Rabbitmq时报错!的主要内容,如果未能解决你的问题,请参考以下文章