Can't get by Maintenance Mode
-
Whatever happens after the database is created and the schema is set and ordinary user is created is when it stops, goes back into Maintenance Mode and asks for credentials where it can't connect.
I can connect to the MySQL instance (port 3306) with super user. I cannot connect to Plesk instance with super user (port 8306). If I set maintenance mode to use port 8306 and .properties file to 8306 port it will create the database in that directory and then stop the process the same way.
MySQL my.ini
[MySQLD] port=3306 basedir=C:\\Program Files\\MySQL\\MySQL Server 5.7\\ datadir=C:\\Program Files (x86)\\Plesk\\Databases\\MySQL\\Data character-set-server=latin1 default-storage-engine=INNODB read_buffer_size=1M read_rnd_buffer_size=256K sort_buffer_size=256K innodb_flush_log_at_trx_commit=1 innodb_log_buffer_size=1M innodb_buffer_pool_size=16M innodb_log_file_size=10M innodb_thread_concurrency=8 max_connections=151 old_passwords=0 max_user_connections=30 thread_cache_size=4 thread_stack=196608 binlog_cache_size=32768 net_read_timeout=30 net_retry_count=10 net_write_timeout=30 open_files_limit=4161 table_definition_cache=400 [client] port=3306
Plesk my.ini
# Copyright 1999-2019. Plesk International GmbH. All rights reserved. # Note that any changes made to this file will be overwritten when Plesk is updated. [client] port=8306 [PleskSQLServer] port=8306 character-set-server=latin1 default-storage-engine=INNODB query_cache_size=8M table_open_cache=32 tmp_table_size=7M thread_cache_size=32 myisam_max_sort_file_size=100G myisam_sort_buffer_size=2M key_buffer_size=2M read_buffer_size=1M read_rnd_buffer_size=256K sort_buffer_size=256K innodb_flush_log_at_trx_commit=1 innodb_log_buffer_size=1M innodb_buffer_pool_size=16M innodb_log_file_size=10M innodb_thread_concurrency=8 max_connections=300 max_allowed_packet=1M net_buffer_length=4K old_passwords=0 connect_timeout=20 basedir=C:\\Program Files (x86)\\Plesk\\MySQL datadir=C:\\Program Files (x86)\\Plesk\\MySQL\\Data tmpdir=C:\\Program Files (x86)\\Plesk\\MySQL\\Data
Thanks for sticking around and giving this an attempt to work. Any reason why you think a log file isn't being created?
-
Okay, I actually started fusionauth on windows and discovered why there is no logfile. If you start it up via
startup.bat
, the logfile is captured in the .bat file output.Mine looks something like this:
Jun 09, 2020 11:45:03.497 AM INFO io.fusionauth.app.maintenance.FusionAuthMaintenanceModeWorkflow - Determine database status : ORDINARY_USER_CANNOT_CONNECT [Communications link failure The last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.] Jun 09, 2020 11:45:03.501 AM INFO org.primeframework.mvc.servlet.PrimeServletContextListener - Initializing Prime Jun 09, 2020 11:45:03.502 AM INFO io.fusionauth.app.maintenance.guice.FusionAuthMaintenanceModeModule - --------------------------------------------------------------------------------------------------------- --------------------------------------- Entering Maintenance Mode --------------------------------------- --------------------------------------------------------------------------------------------------------- Jun 09, 2020 11:45:03.554 AM INFO io.fusionauth.api.configuration.PropertiesFileFusionAuthConfiguration - Loading FusionAuth configuration file [C:\fa\fusionauth\config\fusionauth.properties]
Can you cut and paste the relevant sections of your startup script output?
Thanks,
Dan -
I also added a bug for the log file not being in the logs directory: https://github.com/FusionAuth/fusionauth-issues/issues/673
-
I did a complete uninstall and clean install for this. Same problems. The database name is fusionauth and I let FusionAuth create it, not me. The first attempt is when it first stops, no errors but like I ran Maintenance Mode for the first time. Admin credentials field and password are blank and ordinary user of fusionauth has a new password showing. Second attempt is trying to login again with admin credentials.
Output too long to put in here so I created a pastbin. Let me know if you can't see it. Sorry for the long log file I didn't know which output is relevant.
-
Awesome, that pastebin is super helpful.
Around line 70, I see this error:
Enforcing utf8mb4 character encoding. Review the following messages: Errors that caused startup to fail: Expected [character_set_server] to start with or be equal to [utf8mb4] but found [latin1] Expected [collation_server] to start with or be equal to [utf8mb4] but found [latin1_swedish_ci]
This means that we're expecting a certain character set in mysql, but we aren't seeing it. So we're failing to continue.
You can turn off the expectation in your fusionauth.properties. Set
database.mysql.enforce-utf8mb4=false
and restart your app server. That should resolve this issue.More on the ramifications of turning this off here: https://github.com/FusionAuth/fusionauth-issues/issues/234#issuecomment-632757441
Alternately, you can set up your database to have the expected charsets. That's beyond the scope of the assistance I can offer, but some googling turns up https://dev.mysql.com/doc/refman/8.0/en/charset-database.html
-
Success! While I would have thought letting FusionAuth create the database would have set the character set in the database, the actual problem was setting the character set for the MySQL server and then restarting the server.
I appreciate your time and patience!
-
Awesome!
-
This post is deleted! -
-
I'm encountering the same error using PostgreSQL and MySQL.
not at all sure what is happening. I didn't see any mismatch with character encoding.
I also joined your slack channel with a new subchannel https://fusionauth.slack.com/archives/C05R6G25472
with a list of steps and files I used to run this. I can't figure out what FusionAuth is expecting or I'd set it.
-Ian
-
@ian-0 hate to ask you to try this, but have you created the database manually, following these steps?
https://fusionauth.io/docs/v1/tech/installation-guide/fusionauth-app#advanced-installation
In this case, you run the db creation scripts manually, and then when FusionAuth connects, it doesn't have to do anything DDL-wise.
Can you try that and let us know if it works?
-
did get slightly further. New error:
The user for the username you provided was either created or already existed but could not be granted access to the database. The error from the database was [Access denied for user 'fusionauth'@'10.222.3.159' (using password: NO)].
-
That indicates the fusionauth user doesn't have a password provided. https://fusionauth.io/docs/v1/tech/reference/configuration has the configuration values.
If you are using environment variables, you want to make sure
DATABASE_PASSWORD
is set. -
-
@dan said in Can't get by Maintenance Mode:
That indicates the fusionauth user doesn't have a password provided. https://fusionauth.io/docs/v1/tech/reference/configuration has the configuration values.
If you are using environment variables, you want to make sure
DATABASE_PASSWORD
is set.Yup have this variable set... stranger still is I can manually connect to the database without issue using the same username and password that I have set in the ENV variables.
-
@dan said in Can't get by Maintenance Mode:
That indicates the fusionauth user doesn't have a password provided. https://fusionauth.io/docs/v1/tech/reference/configuration has the configuration values.
If you are using environment variables, you want to make sure
DATABASE_PASSWORD
is set.Using Engine version
14.6
really bizzare. -
I rolled back and installed an elastisearch container. Added the SEARCH_TYPE in the fusionauth deployment and mapped a service to the same RDS DB and it stood up without an issue. Something screwy in the way Fusionauth is connecting to either Postgre or MySQL.
I'm going to have to talk to sales as I want to enable the features temporarily to use it as a POC. Also so I can justify the cost per month for actual support beyond forums.
Thank you for your time.