"Linux" "Services" "Openstack" Installation and Deployment (2. Message Queuing)

Source: Internet
Author: User
Tags rabbitmq

1. Introduction

1.1. Official website: https://www.rabbitmq.com/

2. Installation and configuration:

See: Https://docs.openstack.org/ha-guide/shared-messaging.html#rabbitmq-configure

2.1. Install: Do it on each node

Installed directly with Yum, the installation package is available in OpenStack's Yum source

Yum Install Rabbitmq-server

Start Service (Confirm cookie file has been generated)

[Email protected] ~]# systemctl start rabbitmq-~]# ll/var/lib/rabbitmq/. Erlang.cookie1   6: xx /var/lib/rabbitmq/

Create user

#前面的openstack是用户名, the back of OpenStack is the password rabbitmqctl add_user OpenStack OpenStack
Creating user "OpenStack" ...

assigning permissions

" .* " " .* " " .* "  for "openstack"in"/"  ...

Stop RABBITMQ

Systemctl Stop Rabbitmq-server

2.2. Configuration

On node 01, SCP the cookie file to a further two nodes

SCP /var/lib/rabbitmq/.erlang.cookie [email protected]:/var/lib/rabbitmq/. Erlang.cookieSCP /var/lib/rabbitmq/.erlang.cookie [Email Protected]:/var/lib/rabbitmq/.erlang.cookie

Modify permissions on node 02/03, respectively

chown rabbitmq:rabbitmq/var/lib/rabbitmq/chmod /var/lib/rabbitmq/. Erlang.cookie

Start the Service on node 01 and view the cluster status

[Email protected] ~]# systemctl start rabbitmq-~]# rabbitmqctl cluster_statuscluster Status of node [email p Rotected] ... [{Nodes,[{disc,[[email protected]}]}, {Running_nodes,[[email protected]}, {cluster_name,<< [email protected] ">>}, {partitions,[]}, {Alarms,[{[email protected],[]}]}]

Start the service on nodes 02 and 03, stop the native service, join the 01 cluster (after successfully joining, start the service without executing Stop_app)

 [[email protected] ~]# systemctl start Rabbitmq-server[[email  Protected]  ~]# rabbitmqctl stop_appstopping node [email protected] ... [[email protected]  ~]# rabbitmqctl join_cluster--ram [email  protected]clustering node [email protected] with [email protected] ...   
[[email protected] ~]# systemctl stop rabbitmq-chown rabbitmq:rabbitmq/var/lib/rabbitmq/  chmod  /var/lib/rabbitmq/~]# systemctl start rabbitmq-~~]# rabbitmqctl join_cluster --RAM [email protected]clustering node [email protected] with [email protected] ...

viewing status on a 01 node

[Email protected] ~]# rabbitmqctl cluster_statuscluster Status of node [email protected] ... [{Nodes,[{disc,[[email protected]},         {ram,[[email protected],[email protected]}]}, {Running_nodes,[[email Protected],[email protected],                 [email protected]}, {cluster_name,<<"[email protected]  ">>}, {partitions,[]}, {Alarms,[{[email protected],[]},          {[email protected],[]},          {[ Email protected],[]}]}

Must ensure that you can see three nodes, I in the configuration process occurred the following error, multiple restarts several times better, and then come back to study it

[Email protected] ~]# rabbitmqctl join_cluster-ram [email protected]clustering node [email protected] with [email p Rotected] ... Error: {inconsistent_cluster,"Node [email protected] thinks it ' s clustered with Node [email protected] , but [email protected] disagrees"}

Configure HA mode, I do not quite understand the official document meaning, but it seems that this configuration can implement the HA mode, the message can be mirrored to other nodes

' ^(?! Amq\.). *'{' ha-mode ': ' All '}'

"Linux" "Services" "Openstack" Installation and Deployment (2. Message Queuing)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.