@ajyoon opened this Issue on January 21st 2019

I saw a notice about upgrading from 3.7.0 to 3.8.0, so I followed the web UI for performing the upgrade. After initiating the upgrade, I got an error which unfortunately I did not write down or screenshot so I can't supply any error message. I retried loading the login page and was directed to a different page indicating that my database was out of date and had to be upgraded, so I clicked the button to proceed, and got a 502 error. Now when I load the login page everything appears okay, but I can't log in with my admin account anymore.

FWIW, my analytics requests from tracked pages are returning 200 responses, so hopefully it's still collecting data and the issue is only related to log-in lockout.

This is hosted on a VPS, so I'm happy to SSH in and pull any logs if folks know of a special place upgrade / migration logs get stored.

@ajyoon commented on January 21st 2019

If it's helpful, the console script errors on all commands right now:

/home/analytics/piwik$ ./console 
The directory "/home/analytics/piwik/tmp/cache/tracker/" does not exist and could not be created.

  [InvalidArgumentException]                                                                         
  The directory "/home/analytics/piwik/tmp/cache/tracker/" does not exist and could not be created.
@ajyoon commented on January 21st 2019

and the error message I get when I attempt to log in is:

Error: You can't access this resource as it requires 'view' access for the website id = 1.
@ajyoon commented on January 21st 2019

This issue has been reported by multiple other uses on the forum at https://forum.matomo.org/t/cannot-sign-in-after-update/31321/2

@ajyoon commented on January 21st 2019

The error message I saw is the same mentioned on the forum,

SQLSTATE[42S02]: Base table or view not found: 1146 Table ‘xxxxxx.piwik_brute_force_log’ doesn’t exist
@AramVK commented on January 22nd 2019

I also got this
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'mydatabase.piwik_brute_force_log' doesn't exist

I could continue with the update though, needed to re-login.

@SlavikCA commented on January 22nd 2019

Probably related to https://github.com/matomo-org/matomo/issues/13836

Kind a tells you, that Matomo doesn't do even basic QA of the upgrade.

@ingeniumdesign commented on January 22nd 2019

here my error:
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'db570XXX_4.matomo_brute_force_log' doesn't exist

@SlavikCA commented on January 22nd 2019

I found, that you need to click "Back to Matomo", and it will ask you to Upgrade DB, which adds new (missing) table

@dev-101 commented on January 22nd 2019

👍 Same happened to me on 1 VPS server running Matomo, and I could not log-in from any of my devices afterwards (all PCs, mobiles where I was logged-in before auto-update).

[Tue Jan 22 H:i:s] [:error] [pid 12176] [client ***] Error in Matomo: Mysqli prepare error: Table &<a href='/039'>#039</a>;***piwik_brute_force_log&<a href='/039'>#039</a>; doesn&<a href='/039'>#039</a>;t exist, referer: https:// *** /piwik/index.php?module=CoreUpdater&action=oneClickUpdate

( btw. you are using html special characters encoding in PHP log files - why? )

FIX
I have closed my browser, (I am aware of these kind of auto-update hickups in Matomo since 3.x Piwik time, so I was playing cool), then tried to access Matomo again, which prompted me then with new message that update was successful in fact, and just skipped to the last part, which was in the installation loop (Upgrade Database part). One more restart of browser and it was completed, but now log-in page was presented, and I was stuck in the log-in nightmare loop.

Then, I have cleared application cache (alternatively delete your cookies on mobile for Matomo/Piwik website), restarted browser and now finally I can normally log-in back.


Off-topic: Btw. my file ownership and permissions are in order, every other PHP app can read/write there just fine, except Piwik/Matomo for couple of major update releases now (3.x something). Every time I have to manually run commands in terminal to remove obsolete files - Why? Something is definitely not right there. If this was truly the case, temporary and cache files errors would be present in the first place, which aren't (they are normally created, including sub-dirs etc.).

@JanUrlaub commented on January 22nd 2019

+1

@thE-iNviNciblE commented on January 22nd 2019

i can't relogin.... i've deleted the cache and it doesn't work.

@dev-101 commented on January 22nd 2019

You will probably have to create the missing database table and update database manually:

See Matt's answer here: https://github.com/matomo-org/matomo/issues/13836#issuecomment-446555725
Manual update (from terminal / ssh console): https://github.com/matomo-org/matomo/issues/13990#issuecomment-456312014

Also, do not use your bookmark, instead, try to access to your 'root' matomo folder without any URL parameters (index.php?etc...).

@utrenkner commented on January 22nd 2019

Same problem about missing table here - both, on a Debian and a FreeBSD server:
SQLSTATE[42S02]: Base table or view not found: 1146 Table '<myDatabaseName>.piwik_brute_force_log' doesn't exist.

@mattab commented on January 22nd 2019 Member

duplicates #13836

This Issue was closed on January 22nd 2019
Powered by GitHub Issue Mirror