Web servers are unable to communicate with the database server due to password containing special characters (HA Environment)
Original Question or Issue:
We are in the process of setting up a high availability (HA) FileCloud deployment as part of our ongoing engagement. However, we’ve encountered a few issues that require your assistance.
Environment:
- Product - FileCloud Server
- Version - Any
- Platform - Any
Steps to Reproduce:
Error or Log Message:
Defect or Enhancement Number:
Cause:
Web nodes cannot communicate with the Database server because the password contains characters that must be converted using percent coding.
Resolution or Workaround:
In your cloudconfig.php & localstorageconfig.php (/var/www/html/config/) file, update the password with the characters mentioned below:
The following characters and the space character must be converted using percent encoding if included in a username or password:
: / ? # [ ] @ ! $ & ' ( ) * , ; = %
For example, if your password in plain-text is p@ssw0rd'9'!
, you need to encode your password as:
p%40ssw0rd%279%27%21
The MongoDB connection string in the `cloudconfig.php` and `localstorageconfig.php` files should be formatted as follows:
Notes:
External Reference: https://www.mongodb.com/docs/atlas/troubleshoot-connection/