Error to upgrade mautic to 3.24 from 2.16.5

Mautic 2.16.5
php 7.3.3
OS linux

update with GUI of mautic and i have this error

Upgrading Mautic…

This might take several minutes.

Starting the upgrade…
Backing up the database if we can…
Applying Mautic 2 database migrations to ensure all migrations are in place prior to upgrade…
Downloading Mautic 3 upgrade package…
Extracting Mautic 3 files…

Something went wrong on the server, but we didn’t get any further details. This might be a timeout (the script was running for too long). Please check your server logs and refresh this page to try again.

in the log there is:
[2021-12-24 10:34:50] ===== STARTING MAUTIC 3 UPGRADE AT 2021-12-24 10:34:50… =====
Installed Mautic version: 2.16.5
PHP version: 7.3.33
OS: Linux
Upgrade type: UI

[2021-12-24 10:34:50] Running pre-upgrade checks…
[2021-12-24 10:34:51] One or more warnings occurred in the pre-upgrade checks:

  • You have 10000 or more contacts in your system. We recommend upgrading by using the CLI (command line) for the best performance and stability.

[2021-12-24 10:34:54] Starting the upgrade…
[2021-12-24 10:34:54] Running database backup…
[2021-12-24 10:40:44] Successfully backed up database.
[2021-12-24 10:40:45] Getting the amount of available Mautic 2 database migrations…
[2021-12-24 10:40:45] No available database migrations found. On to the next step…
[2021-12-24 10:40:46] Downloading Mautic 3 upgrade package…
[2021-12-24 10:40:46] Successfully downloaded Mautic 3 upgrade package.
[2021-12-24 10:40:46] Extracting Mautic 3 files…

someone can help me please.
Thanks
Alessandro

do you have ssh access to your server ?

I would highly recommend doing it this way if possible.

Once logged into your server run /var/www/mautic/app/console mautic:update:find and then following instructions
(I cannot remember there might be an update.php file that you can run in the root directory as well)

thanks mikew, i tried but i have this message from terminal:Thank you, continuing…
===== STARTING MAUTIC 3 UPGRADE AT 2021-12-24 16:52:26… =====
Installed Mautic version: 2.16.5
PHP version: 7.3.33
OS: Linux
Upgrade type: CLI

Doing pre-upgrade checks…
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: Error: ‘Access denied; you need (at least one of) the PROCESS privilege(s) for this operation’ when trying to dump tablespaces
Finished pre-upgrade checks.
Starting upgrade…
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: Error: ‘Access denied; you need (at least one of) the PROCESS privilege(s) for this operation’ when trying to dump tablespaces
Backing up your database…
mysqldump: [Warning] Using a password on the command line interface can be insecure.
mysqldump: Error: ‘Access denied; you need (at least one of) the PROCESS privilege(s) for this operation’ when trying to dump tablespaces

what should i do?

from reading the error messages it seems you have a password issue here.
I would check my local.php file I think in 2.x it is found in /mautic/app/config/local.php and make sure your password is correct in this file for your mautic db and I would also make sure you are running console as sudo
so command would be
sudo php /var/www/mautic/app/console mautic:update:apply

i found the psw in local.php but when i open terminal from my Register account dont ask password or username.
i tried to put “sudo php /var/www/mautic/app/console mautic:update:apply” but terminal says “bash: sudo: command not found”.

Hi,

Mautic is trying to create a backup of your database with mysqldump command but it looks like it cant because of insufficient MySQL permissions.

I would advise you to grant all privileges to some mysql user on mautic database and before you try to run the upgrade process again, try backing up your database using mysqldump command (you should do database backup before every mautic upgrade anyway).

You can temporarily use different mysql user (the one with all privileges) and then switch it back to the current. You can switch mysql credentials in local.php @mikew pointed you too.

I hope its clear enough. If you need step by step instructions (actual commands on how to achieve what is described above, let me know).

Hope it helps.

Regards, M.

Hi,
in theory the set user has all the privileges, if not where do I see him?
Thank you

Hi,

you can see currently database user that is used in mautic if you open up local.php. Fields like:

  • db_host
  • db_name
  • db_user
  • db_password

are the ones that are relevant to you.

You can see how to grant all privileges on a specific database here: How to Grant All Privileges on a Database in MySQL | Tutorial by Chartio

Hope it helps.

hi,
for host, username, name and password i found it from “manage file” but i dont know how to open command line from Register CPanel.

sorry for my english and my knowledge.

Thanks
Alessandro

You need to get to CLi (terminal). How were you able to start the upgrade process?

I do not know the cpanel that well but you might be able to add mysql user via cpanel gui too.

Regards, M.

hi,

the update i tried to do through terminal of cpanel or gui of mautic

Thanks, so you have access to the terminal. You can try viewing the local.php file like so:

nano <path-to-mautic>/app/config/local.php

or

cat <path-to-mautic>/app/config/local.php

you will see credentials to mysql server and database there.

I can offer you my services and resolve the issue of mysql permission error for you, since I think it would be faster. Drop me an email to matic@sos-sw.si if interested.

Regards, M.

ok, i found that my user has all privileges.
i dont know why i cant update mautic :frowning: my mail is a.mosca89@gmail.com

the error log is:
[2021-12-30 18:41:30] mautic.ERROR: An error occurred while attempting to fetch the language list: SSL certificate problem: certificate has expired
[2021-12-30 18:42:10] mautic.WARNING: MaxMind license key is required.
[2021-12-30 18:42:10] mautic.ERROR: Failed to fetch remote IP data: No HTTP response received
[2021-12-30 18:42:10] mautic.WARNING: MaxMind license key is required.

Hi,

do you actually use MaxMind? If not you should unselect maxMind IP lookup service in:

Configuration → System Settings → Miscellaneous Settings → IP lookup service

You should get rid warnings about MaxMind settings.

ok perfect, now there is only one error:
[2021-12-31 09:22:52] mautic.ERROR: An error occurred while attempting to fetch the language list: SSL certificate problem: certificate has expired

Looking at the code that produces this error, I think that either you have the wrong translation_url or for a while there site had invalid SSL certificate.

The url in question is: https://language-packs.mautic.com/manifest.json

In short this should go away by the time you upgrade to Mautic 4.

Did you manage to upgrade to Mautic 4?

no, im updating mautic from 2 to 3. but i have always this error:
[2022-01-04 20:34:12] mautic.ERROR: An error occurred while attempting to fetch the language list: SSL certificate problem: certificate has expired
[2022-01-04 20:46:36] mautic.CRITICAL: Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: “An exception occurred while executing ‘SELECT m0_.is_published AS is_published_0, m0_.date_added AS date_added_1, m0_.created_by AS created_by_2, m0_.created_by_user AS created_by_user_3, m0_.date_modified AS date_modified_4, m0_.modified_by AS modified_by_5, m0_.modified_by_user AS modified_by_user_6, m0_.checked_out AS checked_out_7, m0_.checked_out_by AS checked_out_by_8, m0_.checked_out_by_user AS checked_out_by_user_9, m0_.id AS id_10, m0_.username AS username_11, m0_.password AS password_12, m0_.first_name AS first_name_13, m0_.last_name AS last_name_14, m0_.email AS email_15, m0_.position AS position_16, m0_.timezone AS timezone_17, m0_.locale AS locale_18, m0_.last_login AS last_login_19, m0_.last_active AS last_active_20, m0_.online_status AS online_status_21, m0_.preferences AS preferences_22, m0_.signature AS signature_23, m1_.is_published AS is_published_24, m1_.date_added AS date_added_25, m1_.created_by AS created_by_26, m1_.created_by_user AS created_by_user_27, m1_.date_modified AS date_modified_28, m1_.modified_by AS modified_by_29, m1_.modified_by_user AS modified_by_user_30, m1_.checked_out AS checked_out_31, m1_.checked_out_by AS checked_out_by_32, m1_.checked_out_by_user AS checked_out_by_user_33, m1_.id AS id_34, m1_.name AS name_35, m1_.description AS description_36, m1_.is_admin AS is_admin_37, m1_.readable_permissions AS readable_permissions_38, m0_.role_id AS role_id_39 FROM mauvgo_users m0_ LEFT JOIN mauvgo_roles m1_ ON m0_.role_id = m1_.id WHERE (m0_.username = ? OR m0_.email = ?) AND m0_.is_published = ?’ with params [“vegaoptic”, “vegaoptic”, 1]: SQLSTATE[HY000]: General error: 2006 MySQL server has gone away” at /home/lf343x93/public_html/automktg/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php line 115 {“exception”:"[object] (Doctrine\DBAL\Exception\DriverException(code: 0): An exception occurred while executing ‘SELECT m0_.is_published AS is_published_0, m0_.date_added AS date_added_1, m0_.created_by AS created_by_2, m0_.created_by_user AS created_by_user_3, m0_.date_modified AS date_modified_4, m0_.modified_by AS modified_by_5, m0_.modified_by_user AS modified_by_user_6, m0_.checked_out AS checked_out_7, m0_.checked_out_by AS checked_out_by_8, m0_.checked_out_by_user AS checked_out_by_user_9, m0_.id AS id_10, m0_.username AS username_11, m0_.password AS password_12, m0_.first_name AS first_name_13, m0_.last_name AS last_name_14, m0_.email AS email_15, m0_.position AS position_16, m0_.timezone AS timezone_17, m0_.locale AS locale_18, m0_.last_login AS last_login_19, m0_.last_active AS last_active_20, m0_.online_status AS online_status_21, m0_.preferences AS preferences_22, m0_.signature AS signature_23, m1_.is_published AS is_published_24, m1_.date_added AS date_added_25, m1_.created_by AS created_by_26, m1_.created_by_user AS created_by_user_27, m1_.date_modified AS date_modified_28, m1_.modified_by AS modified_by_29, m1_.modified_by_user AS modified_by_user_30, m1_.checked_out AS checked_out_31, m1_.checked_out_by AS checked_out_by_32, m1_.checked_out_by_user AS checked_out_by_user_33, m1_.id AS id_34, m1_.name AS name_35, m1_.description AS description_36, m1_.is_admin AS is_admin_37, m1_.readable_permissions AS readable_permissions_38, m0_.role_id AS role_id_39 FROM mauvgo_users m0_ LEFT JOIN mauvgo_roles m1_ ON m0_.role_id = m1_.id WHERE (m0_.username = ? OR m0_.email = ?) AND m0_.is_published = ?’ with params [“vegaoptic”, “vegaoptic”, 1]:\n\nSQLSTATE[HY000]: General error: 2006 MySQL server has gone away at /home/lf343x93/public_html/automktg/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractMySQLDriver.php:115, Doctrine\DBAL\Driver\PDOException(code: HY000): SQLSTATE[HY000]: General error: 2006 MySQL server has gone away at /home/lf343x93/public_html/automktg/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:107, PDOException(code: HY000): SQLSTATE[HY000]: General error: 2006 MySQL server has gone away at /home/lf343x93/public_html/automktg/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:105)"}

i have check the file local.php and the link is correct. while the SSL certificate has expiry date on 7/3/22

It looks like your mysql instance is not running.

Can you check if your mautic instance is running and you can login to mysql using credentials from
app/config/local.php?

Hi,
maybe yesterday mautic was on tilt because today that select error is gone.
I attach file of the errors it produces.