Mautic Community Forums

Error upgrading from 2.16.3 to 3.0.1 on self-hosted CentOS 7

Your software
My PHP version is : 7.3.21
My MariaDB version is: 10.3.24

Updating/Installing Errors
I am Updating
Upgrading/installing via (delete as applicable) : Web / Command Line : BOTH methods tried. It stops at the same spot.

These errors are showing in the installer :

These errors are showing in the Mautic log :

The error on the CLI is exactly the same one, listed below:

Thank you, continuing…
===== STARTING MAUTIC 3 UPGRADE AT 2020-08-30 18:25:36… =====
Installed Mautic version: 2.16.3
PHP version: 7.3.21
OS: Linux
Upgrade type: CLI

Doing pre-upgrade checks…
Finished pre-upgrade checks.
Starting upgrade…
Backing up your database…
Database backup successfully written to your Mautic root folder.
Getting the amount of available Mautic 2 database migrations… This might take a while!
No available database migrations found. On to the next step…
Downloading Mautic 3…
Extracting the update package…
Extracting done!
Preparing for phase 2 of the upgrade…
IMPORTANT: NOT DONE YET! Due to the large amount of changes in Composer dependencies, we now need to restart the script to continue. We’ve saved your state, so we’ll continue where we left off.
PLEASE RUN php upgrade_v3.php AGAIN TO START PHASE 2 OF THE UPGRADE!
bash-4.2$ php upgrade_v3.php
Welcome to Phase 2 of the Mautic 3 upgrade! We’ll continue where we left off.
Moving Mautic 2 files into mautic-2-backup and moving the Mautic 3 files in place, this might take a while… DO NOT ABORT THE SCRIPT!!!
Done!

Updating your config/local.php with new settings that were changed/introduced in Mautic 3…
Done! Your config file has been updated.
Getting the amount of available Mautic 3 database migrations… This might take a while!
ERR_MAUTIC_3_MIGRATIONS_IDENTIFICATION_FAILED: We couldn’t reliably detect the amount of available database migrations.
ERR_MAUTIC_3_MIGRATIONS_IDENTIFICATION_FAILED: We couldn’t reliably detect the amount of available database migrations… For more details about this message, see http://mau.tc/m3-upgrade-error#err_mautic_3_migrations_identification_failed

==============================

These errors are showing in the upgrade_log.txt file (located in the root of your Mautic instance when an upgrade has been attempted - ensure you remove or redact any sensitive data such as domain names in the file path) :

This ONLY reflects the UI because I restored the database and all the files and tried again, but the errors were the same.

===== STARTING MAUTIC 3 UPGRADE AT 2020-08-30 18:44:53… =====
Installed Mautic version: 2.16.3
PHP version: 7.3.21
OS: Linux
Upgrade type: UI

[2020-08-30 18:44:54] Running pre-upgrade checks…
[2020-08-30 18:45:04] All pre-upgrade checks passed successfully.
[2020-08-30 18:45:21] Starting the upgrade…
[2020-08-30 18:45:22] Running database backup…
[2020-08-30 18:45:29] Successfully backed up database.
[2020-08-30 18:45:29] Getting the amount of available Mautic 2 database migrations…
[2020-08-30 18:45:30] No available database migrations found. On to the next step…
[2020-08-30 18:45:31] Downloading Mautic 3 upgrade package…
[2020-08-30 18:45:34] Successfully downloaded Mautic 3 upgrade package.
[2020-08-30 18:45:34] Extracting Mautic 3 files…
[2020-08-30 18:45:40] Mautic 3 files extracted successfully.
[2020-08-30 18:45:40] Moving Mautic 2 files to mautic-2-backup-files folder, then moving Mautic 3 files from mautic-3-temp-files to the root folder…
[2020-08-30 18:45:40] Successfully moved Mautic 3 files into place!
[2020-08-30 18:45:41] Updating config/local.php with new configuration parameters…
[2020-08-30 18:45:41] Successfully updated config/local.php.
[2020-08-30 18:45:41] Getting the amount of available Mautic 3 database migrations… This might take a while!
[2020-08-30 18:45:42] ERR_MAUTIC_3_MIGRATIONS_IDENTIFICATION_FAILED: We couldn’t reliably detect the amount of available database migrations. Please try again by refreshing this page.
[2020-08-30 18:46:07] ===== STARTING MAUTIC 3 UPGRADE AT 2020-08-30 18:46:07… =====
PHP version: 7.3.21
OS: Linux
Upgrade type: UI

[2020-08-30 18:46:08] Getting the amount of available Mautic 3 database migrations… This might take a while!
[2020-08-30 18:46:14] ERR_MAUTIC_3_MIGRATIONS_IDENTIFICATION_FAILED: We couldn’t reliably detect the amount of available database migrations. Please try again by refreshing this page.
[2020-08-30 18:46:22] ===== STARTING MAUTIC 3 UPGRADE AT 2020-08-30 18:46:22… =====
PHP version: 7.3.21
OS: Linux
Upgrade type: UI

[2020-08-30 18:46:22] Getting the amount of available Mautic 3 database migrations… This might take a while!
[2020-08-30 18:46:22] ERR_MAUTIC_3_MIGRATIONS_IDENTIFICATION_FAILED: We couldn’t reliably detect the amount of available database migrations. Please try again by refreshing this page.
[2020-08-30 18:50:12] ===== STARTING MAUTIC 3 UPGRADE AT 2020-08-30 18:50:12… =====
PHP version: 7.3.21
OS: Linux
Upgrade type: UI

[2020-08-30 18:50:13] Getting the amount of available Mautic 3 database migrations… This might take a while!
[2020-08-30 18:50:13] ERR_MAUTIC_3_MIGRATIONS_IDENTIFICATION_FAILED: We couldn’t reliably detect the amount of available database migrations. Please try again by refreshing this page.
[2020-08-30 18:51:15] Getting the amount of available Mautic 3 database migrations… This might take a while!
[2020-08-30 18:51:15] ERR_MAUTIC_3_MIGRATIONS_IDENTIFICATION_FAILED: We couldn’t reliably detect the amount of available database migrations. Please try again by refreshing this page.

Your problem

My problem is I cannot upgrade

Steps I have tried to fix the problem :
I don’t know what to do after this error. I’ve restored the database and am back at square 1 = 2.16.3

Thanks in advance for any help!

Hermann Bock

What is the output of:

php app/console doctrine:migration:status

?

Hi,

Actually, since I am half way in v3, had to use
php bin/console doctrine:migration:status

This is the result

Just crossed some emails and passwords.

Thanks in advance for talking a look at it.

Hummm… this doesn’t look good

If you try a
php bin/console doctrine:migrations:migrate

Any luck ?

If I do, I get EXACTLY the same error above.

[reposted this from the other thread where you had posted. I see my suggestions had already been addressed in this thread…]

For updates I still kinda rely on this advice.

That page includes 3 commands that Yosu Cadilla recommends to run before upgrade attempts:

php app/console doctrine:migration:migrate
php app/console doctrine:schema:update --force
php app/console cache:clear

Your error has to do with migrations, so have you tried the first? Or probably just do all three.

Also make sure you are using the right update package.

Also, what database type/version are you on?

I had just upgraded from MySQL 5.7.30 to MariaDB 10.3.24 before my upgrade. I think Mautic 3 had some special db requirements.

I definitely have to restore the database backup and the files from 2.16.3 and start from scratch.

To answer your question, I did upgrade to MariaDB 10.3.24 before upgrading.

Crazy stuff… good thing is, this is not a production server, that one is still on 2.16.2 :slight_smile:

Good that you’re not on your prod server and have a backup.

Let us know how it goes :slight_smile: