-
Notifications
You must be signed in to change notification settings - Fork 12
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
Better support for hosted database services using maintenance mode #95
Comments
See also (internal issue): |
Hey @robotdan Im trying to get fusionauth running using azure database for mysql, but the installer fails. As far as i know Azure expects a user like rootnamething@instancename For Superuser credentials i used: rootname@tif-mysql-prod for the superuser it works, database is being created, but then fusionauth can not use it after because it gets stuck on:
When i change the fusionauth username to fusionauth@tif-mysql-prod it throws a different error
How to resolve? Im kinda stuck |
@sanderkooger Edit: whoops, this issue is open. Thanks for giving us additional feedback. |
@mooreds That just made me laugh on this amazingly "confined" day!! |
@mooreds Do you have an idea on how to connect to an azure mysql Database, I have set up an environment to troubleshoot this one. |
I took a deepdive; I migrated the local working DB to mysqlforazure. including a user with full rights and the same password. I changed the connectionstring in the fusionauth.properties file.
As soon as i restart the service it leads me to the installation wizzard. When i change back to local host it works. I ruled out connection issues between server and DB, I am able to connect using phpMyAdmin using the fusionauth database credentials. |
@sanderkooger unfortunately I think that this aspect of FA needs a bit of work, as outlined in this issue. My only suggestion would be to run the SQL manually using the advanced installation: https://fusionauth.io/docs/v1/tech/installation-guide/fusionauth-app#advanced-installation which should hopefully sidestep the installation wizard. |
I already did. I even went as far as to copy over a working database from a local mysql server, adding the same user with the same password and changing the config file. Even then it does not want to work. You are more than welcome to troubleshoot with me. |
@sanderkooger If you have a URL we can test with that may help, otherwise we'll have to stand up a similar environment in Azure and do some testing to either identify a work around or a fix on our end. |
@robotdan the Database is not in use yet, so I could just give you the root credentials in private. I would be glad to be of service. Feel free to shoot me a mail on sander@thisisfashion.tv |
Re: MySQL in Azure, see comments in #681 (comment) |
Managed Mysql on Digitalocean cant load all the tables from mysql.sql - each table requires a primary key, something to do with performance on replication. |
I am now getting this error for Mysql and I cant figure out what causes it - this is hosted on Scalegrid which deploys into Digitalocean (to be close to our kubernetes cluster) because I couldn't get Managed Digitalocean Mysql to work. I tried both Mysql 8 and Mysql 5.7 - both gave the same error. I originally thought it might have been about native password but doesnt seem to be the case. jdbc:mysql://xxx.mongodirector.com:3306/fusionauth?useSSL=true&requireSSL=true
|
Just to leave a little more information on this issue. FusionAuth is not designed to work on constrained or non-standard systems. It assumes that the JVM is a standard JVM, the server behaves like a standard Linux/Windows installation, and the database behaves like a standard installation of PostgreSQL or MySQL. We can look into changing this in the future, but as it stands, some hosting environments won't support the current version of FusionAuth because they these types of constraints. |
Re: the warning that @saul-gush is seeing - that is simply a warning as far as I can tell. If the system is not starting up or not connecting to the database, I don't believe that is the root cause. That is just JDK 14 complaining. |
Can't figure out how to set up with DigitalOcean managed Postgres.
ENV configuration
And this is my log from service with an error
|
This is fixed in version 1.19.0. The new maintenance mode and silent mode will allow FusionAuth to connect to database servers that already have a database for FusionAuth created and do not have super user credentials available. |
Enhance Maintenance Mode to configure 3rd party database services
Problem
FusionAuth has a feature called maintenance mode. During startup this allows FusionAuth possible configure the database silently, or through an interactive setup mode.
Some services such as PostgreSQL in Azure, do not offer a root user configuration. Instead, a user is created that has authority to create a schema.
The FusionAuth maintenance mode and silent configuration mode request a super user credentials, and this is not always available.
Solution
Enhance Maintenance Mode to account for this possibility and allow silent configuration or interactive db configurations using maintenance mode on 3rd party db services.
Ensure db configuration can handle:
Local and AWS RDS flavors of PostgreSQL and MySQL work today.
Alternatives/workarounds
If you run into issues with this today, you have a few options:
Try to complete maintenance mode by entering the user credentials offered to you by your database service provider in both the super user and the user sections of the db maintenance mode configuration. This may work.
If that doesn't work, you may manually create the db schema using the advanced install instructions.
https://fusionauth.io/docs/v1/tech/installation-guide/fusionauth-app#advanced-installation
Additional context
Similar issues reported via the following:
fusionauth-containers Issue #7
fusionauth-issues Issue #94
fusionauth-issues Issuer #115
fusionauth-issues Issue #681
Thanks to @davidmw, @MatthewLymer, @hengel2810 and @plunkettscott for reporting their issues.
How to vote
Please give us a thumbs up or thumbs down as a reaction to help us prioritize this feature. Feel free to comment if you have a particular need or comment on how this feature should work.
The text was updated successfully, but these errors were encountered: