I'm in the process of spinning up a Mattermost server on AWS with a separate RDS Postgres SQL database. For security reasons, I want to make sure that the connection between the Mattermost Server and the Postrgres DB is encrypted. Therefore I set the Postgres Connection string as the following in my Mattermost Configuration file:
"DataSource": "postgres://<username>:<password>@<url>:5432/mattermost?sslmode=verify-full&sslrootcert=~/certs/rds-ca-2015-root.pem\u0026connect_timeout=10"
Unfortunately after I try to run the Mattermost server once making this change, I get the following error:
Failed to ping DB retrying in 10 seconds err=open ~/certs/rds-ca-2015-root.pem: no such file or directory
After some investigation into the Mattermost code I found that they were simply forwarding the connection string passed in the Configuration file over to the pq library. Therefore I figured it made more sense to post the issue here.
From what I can see thus far, this seems to be something related to the Golang ioutil library, and it being unable to read the file path that I'm passing into the connection string. Is there something obvious that I'm missing here? I've tried playing around with a couple of formats for the connection string, but can't seem to come up with a working solution.
I'm in the process of spinning up a Mattermost server on AWS with a separate RDS Postgres SQL database. For security reasons, I want to make sure that the connection between the Mattermost Server and the Postrgres DB is encrypted. Therefore I set the Postgres Connection string as the following in my Mattermost Configuration file:
"DataSource": "postgres://<username>:<password>@<url>:5432/mattermost?sslmode=verify-full&sslrootcert=~/certs/rds-ca-2015-root.pem\u0026connect_timeout=10"Unfortunately after I try to run the Mattermost server once making this change, I get the following error:
Failed to ping DB retrying in 10 seconds err=open ~/certs/rds-ca-2015-root.pem: no such file or directoryAfter some investigation into the Mattermost code I found that they were simply forwarding the connection string passed in the Configuration file over to the pq library. Therefore I figured it made more sense to post the issue here.
From what I can see thus far, this seems to be something related to the Golang ioutil library, and it being unable to read the file path that I'm passing into the connection string. Is there something obvious that I'm missing here? I've tried playing around with a couple of formats for the connection string, but can't seem to come up with a working solution.