Updating a RabbitMQ Password > Update a RabbitMQ Password – Linux
Update a RabbitMQ Password – Linux
Overview
If you install the instance of RabbitMQ provided with the Platform Analytics installer, the password is encrypted by default during installation. If, at some point, you need to reset the RabbitMQ password, it must be updated in both ThingWorx and the Property Transform microserver. Follow the procedures below to complete all the necessary tasks.
Update the Password in RabbitMQ
To update a RabbitMQ password, make all of the following updates:
1. Open a terminal window as the root user.
2. Navigate to the following location in your Platform Analytics installation directory:
<platform_analytics_install>/RabbitMQ/rabbitmq_server-<version>/sbin
For example:
/opt/ThingWorxAnalytics/PlatformAnalytics/RabbitMQ/rabbitmq_server-<version>/sbin
3. Run the following command:
./rabbitmqctl change_password <RabbitMQ username> <new password>
4. Use the following commands to restart the RabbitMQ and Flink services:
systemctl restart twpas-rabbitmq.service
systemctl restart twpas-flink.service
Update the Password in ThingWorx
1. Open a terminal window as the root user.
2. Navigate to the bin directory of the Security Management Tool.
* 
The Security Management Tool was downloaded and configured the first time you manually encrypted the RabbitMQ password. To review that procedure, see the Configure Property Transform Settings in ThingWorx and navigate to the Encrypt the RabbitMQ Password section.
3. Run the following command:
./security-common-cli keystore.conf set encrypt.propertytransform.password "<new RabbitMQ password>"
4. Restart ThingWorx.
Update the Password in the Property Transform Microserver
This scripted procedure automates most of the steps involved in updating an encrypted password. It eliminates the manual work of copying randomly generated Key Store directory and file names and plugging them into a complex Java encryption command. The encryption script is stored in the install bin directory and is launched with a simple command that requires two parameters.
1. Open a terminal window and navigate, as the root user, to the bin directory where your Platform Analytics is installed:
/opt/ThingWorxAnalytics/PlatformAnalytics/bin
2. Execute the following command to run a script that will update the encryption of your new RabbitMQ password:
./update-encrypted-password.sh r <new RabbitMQ password>
A message is displayed when the encryption process is complete and the command prompt returns.
3. Use the following command to restart the Property Transform microserver:
systemctl restart twpas-property–transform.service
Was this helpful?