Problem 3.0.3 to 4.1.1 upgrade, I can’t get past the Database Upgrade Required page

Hello,
On my personal Joomla site, I wanted to update Matomo in 1 click, from version 3.0.3 (Piwik) to the latest version 4.1.1
I have set write permissions (777) on main folder and subfolders.
I started the update.
As requested during the process, I manually deleted the folders and files (which Matomo didn’t expect to find).
I then clicked on the green button “Upgrade Matomo” and there I got a blank page in the browser.
I tried to access the consultation of my site’s statistics but each time I get a Matomo window indicating: "* Database update required. Your Matomo database is out of date and must be upgraded before you can continue. Matomo database will be upgraded from version 4.0.1-b1 to the new version 4.1.1 * ".
If I click on the green “Upgrade Matomo” button I get a blank page in the browser with this url : https://piwik.mydomain.fr/index.php?updateCorePlugins=1&module=CoreUpdater&action= and nothing happens.

With the new version of Matomo, is the database not up to date and Matomo wants to update it?
Why does the database have to be updated from version 4.0.1-b1 to version 4.1.1? The previous version of Piwik was version 3.0.3 !!!
In my case, obviously Matomo does not update my database.

In piwik_option table, I see among others this:
last_update_communication_sent_core = 4.1.1
MatomoUpdateHistory = 4.0.1-b1,3.0.3,
UpdateCheck_LatestVersion = 4.1.1
version_core = 4.0.1-b1
version_CoreUpdater = 4.1.1
version_CustomVariables = 4.0.1

For information, my web site, which works very well, is hosted on a shared server at OVH with a PHP version 7.3 and a SQL database version 5.6. I do not have the hand to change the version of this database.

What can I do to fix the problem?

Hi,

A blank page indicates an PHP error occuring. Can you check your PHP or webserver error log to see what this error is?

Hi,
Thank you for your reply.
For information, I updated Piwik / Matomo on 06/Feb/2021, I think around 5:45 p.m.

I have looked at the www/logs/error.php file. I only saw two failed login attempts. One thursday and the other yesterday morning. The IP addresses are from Vietnam and Russia.

In yesterday’s OVH log error file:
[Thu Feb 11 17:13:54 2021] [error] [client 91.134.248.253] [host piwik.piwik.mydomain.fr] AH10131: FastCGI: server “/homez.40/base name/piwik/piwik.php” stderr: PHP message: Error in Matomo (tracker): Error query: preparing query failed: Unknown column ‘config_client_type’ in ‘field list’ : SELECT visit_last_action_time, visit_first_action_time, idvisitor, idvisit, user_id, visit_exit_idaction_url, visit_exit_idaction_name, visitor_returning, visitor_seconds_since_first, visitor_seconds_since_order, visitor_count_visits, visit_goal_buyer, location_country, location_region, location_city, location_latitude, location_longitude, referer_name, referer_keyword, referer_type, idsite, profilable, visit_entry_idaction_url, visit_total_actions, visit_total_interactions, visit_total_searches, referer_url, config_browser_name, config_client_type, config_device_brand, config_device_model, config_device_type, visit_total_events, visit_total_time, location_ip, location_browser_lang, last_idlink_va, custom_dimension_1, custom_dimension_2, custom_dimension_3, custom_dimension_4, custom_dimension_5, custom_var_k1, custom_var_v1, custom_var_k2, custom_var_v2, custom_var_k3…

In the log error file of 06/Feb/2021 at OVH:
[Sat Feb 06 17:51:04 2021] [error] [client 91.134.248.253] [host piwik.mydomain.fr] AH10131: FastCGI: server “/homez.40/base name/piwik/piwik.php” stderr: PHP message: Error in Matomo (tracker): Error query: preparing query failed: Table ‘base name.piwik_tracking_failure’ doesn’t exist : SELECT idsite FROM piwik_tracking_failure WHERE idsite = ? and idfailure = ?
[Sat Feb 06 18:08:29 2021] [error] [client 91.134.248.253] [host piwik.mydomain.fr] AH10131: FastCGI: server “/homez.40/base name/piwik/piwik.php” stderr: PHP message: Error in Matomo (tracker): Error query: preparing query failed: Table ‘base name.piwik_tracking_failure’ doesn’t exist : SELECT idsite FROM piwik_tracking_failure WHERE idsite = ? and idfailure = ?
[Sat Feb 06 19:38:07 2021] [error] [client 91.134.248.253] [host piwik.mydomain.fr] AH10131: FastCGI: server “/homez.40/base name/piwik/piwik.php” stderr: PHP message: Error in Matomo (tracker): Error query: preparing query failed: Unknown column ‘config_client_type’ in ‘field list’ : SELECT visit_last_action_time, visit_first_action_time, idvisitor, idvisit, user_id, visit_exit_idaction_url, visit_exit_idaction_name, visitor_returning, visitor_seconds_since_first, visitor_seconds_since_order, visitor_count_visits, visit_goal_buyer, location_country, location_region, location_city, location_latitude, location_longitude, referer_name, referer_keyword, referer_type, idsite, profilable, visit_entry_idaction_url, visit_total_actions, visit_total_interactions, visit_total_searches, referer_url, config_browser_name, config_client_type, config_device_brand, config_device_model, config_device_type, visit_total_events, visit_total_time, location_ip, location_browser_lang, last_idlink_va, custom_dimension_1, custom_dimension_2, custom_dimension_3, custom_dimension_4, custom_dimension_5, custom_var_k1, custom_var_v1, custom_var_k2, custom_var_v2, custom_var_k3…

Dozens of times a day the IP address 91.134.248.253 generates 404 errors on my site !!!
I can’t block it permanently. :frowning:

In the log web file of 06/Feb/2021 at OVH:
my ip address piwik.mydomain.fr - [06/Feb/2021:17:45:23 +0100] “GET /index.php?module=CoreUpdater&action=newVersionAvailable HTTP/1.1” 200 8863 “https://piwik.mydomain.fr/index.php?module=CoreHome&action=index&idSite=1&period=day&date=yesterday” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [06/Feb/2021:17:45:23 +0100] “GET /index.php?module=CoreUpdater&action=getUpdaterCss&cb=d7b6818f3e82723f6d727f29f81dcf72 HTTP/1.1” 200 33518 “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=newVersionAvailable” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [06/Feb/2021:17:45:23 +0100] “GET /index.php?module=CoreUpdater&action=getUpdaterJs&cb=10452e2119039d3450de42aab0f60d18 HTTP/1.1” 200 207149 “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=newVersionAvailable” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [06/Feb/2021:17:47:43 +0100] “GET /index.php?module=CoreUpdater&action=oneClickUpdate HTTP/1.1” 200 654 “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=newVersionAvailable” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [06/Feb/2021:17:48:19 +0100] “POST /index.php?module=CoreUpdater&action=oneClickResults HTTP/1.1” 200 16041 “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=oneClickUpdate” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [06/Feb/2021:17:48:23 +0100] “GET /plugins/Morpheus/images/logo.svg?matomo HTTP/1.1” 200 12973 “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=oneClickResults” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [06/Feb/2021:17:48:23 +0100] “GET /index.php?module=CoreUpdater&action=getUpdaterCss&cb=942eb6b3d8a15f56b68930785c5493dc HTTP/1.1” 200 35350 “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=oneClickResults” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [06/Feb/2021:17:48:23 +0100] “GET /index.php?module=CoreUpdater&action=getUpdaterJs&cb=1cddf527f07369481057cd6caf12dfbc HTTP/1.1” 200 222326 “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=oneClickResults” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [06/Feb/2021:17:48:23 +0100] “GET /plugins/CoreHome/images/applogo_256.png HTTP/1.1” 200 10278 “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=oneClickResults” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [06/Feb/2021:17:48:23 +0100] “GET /plugins/CoreHome/images/applogo_256.png HTTP/1.1” 200 10278 “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=oneClickResults” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [06/Feb/2021:17:48:23 +0100] “GET /plugins/Morpheus/fonts/matomo.woff2?rjeutj HTTP/1.1” 200 11048 “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=getUpdaterCss&cb=942eb6b3d8a15f56b68930785c5493dc” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”

New test last night at 11:10 p.m. :
I tried to access the consultation of my site’s statistics, I get a Matomo window indicating: “* Database update required…”*
I then clicked on the green button “Upgrade Matomo” and I got a blank page again in the browser.

Then I have looked at in the log web file of 11/Feb/2021 at OVH:
my ip address piwik.mydomain.fr - [11/Feb/2021:23:10:07 +0100] “GET / HTTP/1.1” 302 - “-” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [11/Feb/2021:23:10:08 +0100] “GET /index.php?module=CoreUpdater&action= HTTP/1.1” 200 18904 “-” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [11/Feb/2021:23:10:14 +0100] “GET /plugins/CoreHome/angularjs/menudropdown/menudropdown.directive.js?cb=6d7ed76ae509430ef46b0d0f3f0cc4a7 HTTP/1.1” 200 905 “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [11/Feb/2021:23:10:14 +0100] “GET /plugins/LanguagesManager/angularjs/languageselector/languageselector.directive.js?cb=6d7ed76ae509430ef46b0d0f3f0cc4a7 HTTP/1.1” 200 434 “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [11/Feb/2021:23:10:14 +0100] “GET /index.php?module=CoreUpdater&action=getUpdaterJs&cb=6d7ed76ae509430ef46b0d0f3f0cc4a7 HTTP/1.1” 200 111531 “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [11/Feb/2021:23:10:17 +0100] “GET /index.php?updateCorePlugins=1 HTTP/1.1” 302 - “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”
my ip address piwik.mydomain.fr - [11/Feb/2021:23:10:18 +0100] “GET /index.php?updateCorePlugins=1&module=CoreUpdater&action= HTTP/1.1” 500 - “https://piwik.mydomain.fr/index.php?module=CoreUpdater&action=” “Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:85.0) Gecko/20100101 Firefox/85.0”

I selected a small part of the log files.
Thanks for your help

@Micky70 at some point did you maybe deactivate or active a plugin after initiating the update? Either through the Matomo Admin UI or the console or by manually editing the config?

Hi,
Thank you for your reply.
No, I haven’t changed anything.
When I launched the update, I waited for it to take place. I had read that updating the database could take a long time. So I waited almost 1 hour in front of the blank page.
Also, since I launched this update, I no longer have access to the Matomo UI.

For information, this is the first update of this application that I have made since installing and using Piwik 3.0.3
So I don’t know if updating from a previous version would have worked.
Maybe I should have gone through an intermediate version before updating directly to version 4.1.1?

The problem is solved.
I had noted this message from Matomo before launching the update: "Some components are not compatible with Piwik 4.1.1. We will update them if an update is available, otherwise we will deactivate them when you will perform the update: ExamplePlugin requires Piwik <4.0.0-b1 "

So, via FTP, I looked in the “plugins” folder and saw these two folders:

  • ExampleTracker
  • ExampleVisualization

These two folders and all their subfolders and files were the only ones to have the date of the first installation of Piwik 3.1.1. All other Matomo folders as well as all their subfolders and files have the date 02/06/2021, date of update to Matomo 4.1.1.

I changed the names of these two folders so that they were no longer recognized by Matomo and restarted the connection to statistics. As before, I got the Matomo “Update Database …” window. I clicked on the green button “Update Matomo”, and there after a few seconds I got the message “Matomo has been updated successfully”.

The database has therefore been updated and the statistics are accessible again. Of course no statistics have been recorded since 2/6/2021 but at least I haven’t lost the history.

The problem therefore came from these two plugins which were not compatible with Matomo 4.1.1 and which he did not deactivate during the update !!

2 Likes

Hi there,

I have been having problems trying to upgrade matomo on the tangoforge.com domain. As the database was too large for the upgrade to run the the browser, I ran the tool from the command -line as recommended: php /home/forge/public_html/piwik/console core:update.

It went through the plugin commands and exited on the 2nd to last one without making it to running the SQL commands: Executing ./console plugin:uninstall “ExampleAPI”… Done. [14 / 134] Executing ./console plugin:uninstall “ExampleCommand”… Done. [15 / 134] Executing ./console plugin:uninstall “ExampleSettingsPlugin”… Done. [16 / 134] Executing ./console plugin:uninstall “ExampleTracker”…

I tried each command by itself and only the command for “ExampleTracker” exited without any output. have you any suggestions on how I can get this updater to run?

I have many years of CLI Experience with Linux/unix and I found this quite challenging.

Hi @violllettta ,

You can try removing all Example* plugins before continuing with the upgrade (e.g. by deleting the directories and removing them from config.ini.php)