How to Solve Rabbitmq Error: Failed to start RabbitMQ broker

systemctl start rabbitmq-server

Error: unable to connect to node rabbit@sf206152: nodedown

Jun 21 17:11:12 sf206152 rabbitmq-server[31112]: {bad_return,
Jun 21 17:11:12 sf206152 rabbitmq-server[31112]: {{rabbit,start,[normal,[]]},
Jun 21 17:11:12 sf206152 rabbitmq-server[31112]: {‘EXIT’,
Jun 21 17:11:12 sf206152 rabbitmq-server[31112]: {rabbit,failure_during_boot,
Jun 21 17:11:12 sf206152 rabbitmq-server[31112]: {error,
Jun 21 17:11:12 sf206152 rabbitmq-server[31112]: {schema_integrity_check_failed,
Jun 21 17:11:12 sf206152 rabbitmq-server[31112]: [{table_attributes_mismatch,rabbit_user,
Jun 21 17:11:12 sf206152 rabbitmq-server[31112]: [username,password_hash,tags],
Jun 21 17:11:12 sf206152 rabbitmq-server[31112]: [username,password_hash,tags,
Jun 21 17:11:12 sf206152 rabbitmq-server[31112]: hashing_algorithm]}]}}}}}}}
Jun 21 17:11:12 sf206152 rabbitmq-server[31112]: Log files (may contain more information):
Jun 21 17:11:12 sf206152 rabbitmq-server[31112]: /var/log/rabbitmq/[email protected]
Jun 21 17:11:12 sf206152 rabbitmq-server[31112]: /var/log/rabbitmq/[email protected]
Jun 21 17:11:13 sf206152 rabbitmq-server[31112]: {“init terminating in do_boot”,{rabbit,failure_during_boot,{could_not_start,rabbit,{bad_return,{{rabbit,start,[normal,[]]},{‘EXIT’,{rabbit,failure_du
Jun 21 17:11:14 sf206152 rabbitmq-server[31112]: Crash dump was written to: erl_crash.dump
Jun 21 17:11:14 sf206152 rabbitmq-server[31112]: init terminating in do_boot ()
Jun 21 17:11:14 sf206152 systemd[1]: rabbitmq-server.service: main process exited, code=exited, status=1/FAILURE
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: Stopping and halting node rabbit@sf206152 …
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: Error: unable to connect to node rabbit@sf206152: nodedown
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: DIAGNOSTICS
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: ===========
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: attempted to contact: [rabbit@sf206152]
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: rabbit@sf206152:
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: * connected to epmd (port 4369) on sf206152
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: * epmd reports: node ‘rabbit’ not running at all
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: no other nodes on sf206152
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: * suggestion: start the node
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: current node details:
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: – node name: rabbitmqctl31207@sf206152
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: – home dir: /var/lib/rabbitmq
Jun 21 17:11:14 sf206152 rabbitmqctl[31207]: – cookie hash: cmvEv4p7/gNkQVUvRdn10w==
Jun 21 17:11:14 sf206152 systemd[1]: rabbitmq-server.service: control process exited, code=exited status=2
Jun 21 17:11:14 sf206152 systemd[1]: Failed to start RabbitMQ broker.
— Subject: Unit rabbitmq-server.service has failed
— Defined-By: systemd
— Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel

— Unit rabbitmq-server.service has failed.

— The result is failed.

 

Solution:</strong

/var/lib/rabbitmq/mnesia 目录下存在[email protected], rabbit@localhost, rabbit@localhost-plugins-expand, delete these 3 items, and then use systemctl start rabbitmq-server to start.

# StartStopRestart

service rabbitmq-server start

service rabbitmq-server stop

service rabbitmq-server restart

# Check Status

rabbitmqctl cluster_status

rabbitmqctl status

Add a new user

[root@sf106212 etc]# rabbitmqctl add_user admin admin@2015

View the list of current users

[root@sf106212 etc]# rabbitmqctl list_users

Set the user role superadministrator

[root@sf106212 etc]# rabbitmqctl set_user_tags admin administrator

Set user permissions

[root@sf106212 etc]# rabbitmqctl set_permissions -p/admin “.*” “.*” “.*”

 

View permission information for the specified user

[root@sf106212 etc]# rabbitmqctl  list_user_permissions admin

Listing permissions for user “admin” …

/       .*      .*      .*

# StartConfigure Auto Start

rabbitmq-plugins enable rabbitmq_management

service rabbitmq-server start

chkconfig rabbitmq-server on

http://localhost:15672

Similar Posts: