Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problem with loading fusionauthdb on RDS #69

Open
richb201 opened this issue Feb 27, 2021 · 2 comments
Open

problem with loading fusionauthdb on RDS #69

richb201 opened this issue Feb 27, 2021 · 2 comments

Comments

@richb201
Copy link

richb201 commented Feb 27, 2021

I have been battling with getting fa to work with mysql rds. I am using fusionauth/fusionauth-app:1.19.7

When I use this DATABASE_URL: jdbc:mysql://database-2.cwymdn16cxes.us-east-1.rds.amazonaws.com;dbname=fusionauthdb and I look in the docker logs, I see a huge number or errors.

for example:

2021-02-27 12:23:59.094 PM ERROR com.inversoft.maintenance.db.JDBCMaintenanceModeDatabaseService - Configuration [database.url] is invalid. It must begin with either jdbc:mysql: or jdbc:postgresql:
2021-02-27 12:23:59.102 PM ERROR com.inversoft.maintenance.db.JDBCURL - Could not parse jdbcString [jdbc:mysql://database-2.cwymdn16cxes.us-east-1.rds.amazonaws.com;dbname=fusionauthdb]

If I instead use this one:
DATABASE_URL: jdbc:mysql://database-2.cwymdn16cxes.us-east-1.rds.amazonaws.com:3306/fusionauthdb
the errors go away, but the rds times out with this message after about 10 minutes:

mysqli::real_connect(): (HY000/1129): Host '69.124.176.183' is blocked because of many connection errors; unblock with 'mysqladmin flush-hosts'

Either way, I am trying to run fa in docker on my laptop and access the dbase on rds. When I type localhost:9011 the system always goes into maint mode as if it can't see the existing rds fusionauthdb.

I have another installation on EC2 that can access this same fusionauthdb fine. Any ideas on why the rds is timing out from the localhost but not from EC2 when accessing fusionauthdb?

@nick-kostov
Copy link

The answers of this questions may vary.
I would suggest you look into the RDS size and see how many concurrent connections are supported.

@voidmain
Copy link
Member

I'm not sure how you have everything setup, but this could be caused by AWS security groups. If the EC2 is allowed to connect to the RDS in your security group, then that would be way it works fine. However, if your security group is blocking traffic from the outside, that could be causing the errors.

You'll want to ensure that you are able to connect to MySQL using the MySQL command line tools from your laptop. This will ensure that the RDS is accessible. This command should work:

mysql -uroot -p -hdatabase-2.cwymdn16cxes.us-east-1.rds.amazonaws.com mysql

You might need to adjust it based on the real host name, username, and database name.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants