Hi, I’m trying run Passbolt on Docker with an RDS database, but I keep getting this error:
Running baseline checks, please wait…
Exception: SQLSTATE[HY000] [2002] No such file or directory in [/var/www/passbolt/vendor/cakephp/cakephp/src/Database/Driver.php, line 92]
Exception: There was a problem connecting to the database: SQLSTATE[HY000] [2002] No such file or directory in [/var/www/passbolt/vendor/robmorgan/phinx/src/Phinx/Db/Adapter/PdoAdapter.php, line 82]
I am building an image with docker compose, like this:
Checklist
I have read intro post: About the Installation Issues category
I have read the tutorials, help and searched for similar issues
I provide relevant information about my server (component names and versions, etc.)
I provide a copy of my logs and healthcheck
I describe the steps I have taken to trouble shoot the problem
I describe the steps on how to reproduce the issue
Can you confirm if you already created the database on RDS and have granted privileges on it to the USER? Also, confirm from passbolt server command line that you can connect with:
mysql -u USER -p -h region.rds.amazonaws.com
If both of these steps are validated, the next step would be to build the container, and then run this to see if access to RDS is possible from within passbolt:
docker-compose exec passbolt mysql -u USER -p -h region.rds.amazonaws.com
I tried the steps you described and I have access to db in both ways. Locally everything works perfectly but when I try to deploy to production the error that I posted appears.
I am sending the image to an AWS ECR e then using a container orchestrator. Locally I am using Ubuntu 20.04.
@Elias I have read elsewhere that RDS may not need the port configured. Try commenting out the DATASOURCES_DEFAULT_PORT=3306 line and see if it makes a difference. (It may not, as the port may be set to a default 3306 in passbolt. But we can experiment if this first step does not work. )
The other issue may be security settings on the AWS end of things, like a firewall setting.
@poorni If you are still using AWS AMI as noted in your other post, it is structured differently than the Docker install as is being discussed in this thread. It is not recommended for you to look for phinx.yml.
For AWS AMI, where i should look for db details.
My main query , after we install in my case AWS AMI, where are the config files we create during the installation process.