RabbitMQ Configuration Guide
Now that RabbitMQ is configured and running, we will need to perform the following tasks
- Update configuration
- Create a vhost
- Create a user account
Update Configuration
The default RabbitMQ configuration will work if you are doing development and/or testing. For production usage, it is highly recommended to update the configuration as we outline here. Follow these steps
- Open File explorer
- Click in the Address bar at the top of the File Explorer and type %APPDATA% and press Enter
- Locate the "RabbitMQ" directory and double click on it
Now that we are inside the RabbitMQ configuration folder, we should see that there is no rabbitmq.conf file, we need to create one. Follow these steps to create the file
- Open notepad
Once notepad is open, we need to set a couple configuration settings, you can copy/paste these settings directly into the notepad window.
loopback_users.guest = false
listeners.tcp.default = 5672
default_pass = CHANGEME
default_user = admin
hipe_compile = false
management.listener.port = 15672
management.listener.ssl = false
Be sure to change the default_pass to a secure password!
- Next, go to File and click "Save"
- Set the name to rabbitmq.conf
- Change the "Save as type" dropdown to "All files"
- Click "Save"
Next look for a file named "enabled_plugins", it should be in the same folder as the rabbitmq.conf file. If the does not exist, we will need to create it. Open a new notepad file and add following
[rabbitmq_management,rabbitmq_mqtt].
Make sure to include both brackets [ ] as well as the Period .
- Next, go to File and click "Save"
- Set the name to enabled_plugins
- Change the "Save as type" dropdown to "All files"
- Click "Save"
The last step in updating the configuration is to restart the RabbitMQ service. Follow these steps
- Goto Start and click "Windows Administrative Tools"
- In the "Administrative Tools" window, locate "Services" and double click on it
- In the "Services" window, locate the "RabbitMQ" service in the list
- Once located, Right click on the service and click "Restart"
It can take up to 5 minutes before the server is available after the first startup!
Congratulations, RabbitMQ is now configured!
Note: Sometimes the RabbitMQ Service will auto-start after installation before the rabbitmq.conf file can be created, when this happens the default username & default password are never set. To correct this issue, stop the RabbitMQ service and delete the "db" folder located in the RabbitMQ Data folder (IE: %APPDATA%\RabbitMQ\db), then restart the service, the default user & password should now work.
Create a vhost
Next we need to create Virtual Host for the MyChild6 software to use. To do this we will be using the RabbitMQ Management Ui, this is typically located at HTTP://localhost:15672 Follow these steps
This assumes that RabbitMQ is installed on the same computer you are working on.
If McTech Wireless Receivers have been pre-programmed to communicate with the McLinkAgent, you MUST ensure that the same vHost is used on both the Wireless Receiver AND the MyChild6 Web server, typically in this sceneiro we would use the default / vHost and create a dedicated user with a password of 30 characters or less.
- Open a web browser (Microsoft Edge or Google Chrome are recommended)
- Browse to the Management Ui (HTTP://localhost:15672)
- Enter your username & password we configured in the last step and login
Once you are logged in, you should see an Overview page with a couple of graphs and a ton of information. We need to go to the Administration section. Follow these steps
- At the top of the page, locate the tab named "Admin" and click on it
- On the right side of the page, locate "Virtual Hosts" (it's bold!) and click on it
If all went well, you should be viewing the "Virtual Hosts" page. Near the center of the screen shoutl be a list of hosts, there should only be one listed with the "Name" of "/" and the "Add a new virtual host" dropdown should be expanded. Follow these steps
- Enter a name for your virtual host ( We recommend MyChild6 )
- Enter a description (Optional)
- Enter tags (Optional)
- Click the "Add virtual host" button
After clicking save, the list should be updated and your new virtual host should be listed with a state of "running".
Congratulations, You have successfully created a vhost (Virtual Host).
Create User Account
Next we need to create a User account for the MyChild6 software to use. Follow these steps
- Locate "Users" on the top right side of the screen (its BOLD) and click on it
- You should see a list of user accounts, with only "guest" being listed
- Locate the "Add a user" section (near the bottom)
- Enter a username (We recommend mychild6)
- Enter a password (Note: do not use $ or , in your password!)
- Click "Add user"
After clicking "Add user" your new user account should be listed in the list near the center of the page. We need to set permissions for our user account. Follow these steps
Click on the name of your new account from the list
You should now see a big yellow banner saying your user does not have permissions, as well as several places to set different permissions. Locate the section labeled "Permissions" and then locate the section "Set permission". Once located follow these steps
- Set the "Virtual Host" to the virtual host we created in (Create Virtual Host)
- Leave Configure regexp at default
- Leave Write regexp at default
- Leave Read regexp at default
- Click "Set Permssion"
After clicking "Set permission" the yellow banner should disappear and a new list should be displayed under the header "Current permissions". The permissions should be set for the Virtal Host you created.
The above steps assume you are already logged into the RabbitMQ Management Ui
Congratulations. RabbitMQ is now configured and ready! Continue on to the Minio Configuration Guide
No Comments