Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade from 3.7.0 to 3.8.0 got db error, can no longer log in. #13984

Closed
ajyoon opened this issue Jan 21, 2019 · 14 comments
Closed

Upgrade from 3.7.0 to 3.8.0 got db error, can no longer log in. #13984

ajyoon opened this issue Jan 21, 2019 · 14 comments
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.

Comments

@ajyoon
Copy link

ajyoon commented Jan 21, 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
Copy link
Author

ajyoon commented Jan 21, 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
Copy link
Author

ajyoon commented Jan 21, 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
Copy link
Author

ajyoon commented Jan 21, 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
Copy link
Author

ajyoon commented Jan 21, 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
Copy link

AramVK commented Jan 22, 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
Copy link

SlavikCA commented Jan 22, 2019

Probably related to #13836

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

@ingeniumdesign
Copy link

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

@SlavikCA
Copy link

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
Copy link

dev-101 commented Jan 22, 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 '***piwik_brute_force_log' doesn'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
Copy link

+1

@thE-iNviNciblE
Copy link

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

@dev-101
Copy link

dev-101 commented Jan 22, 2019

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

See Matt's answer here: #13836 (comment)
Manual update (from terminal / ssh console): #13990 (comment)

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

@utrenkner
Copy link

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
Copy link
Member

mattab commented Jan 22, 2019

duplicates #13836

@mattab mattab closed this as completed Jan 22, 2019
@mattab mattab added the duplicate For issues that already existed in our issue tracker and were reported previously. label Jan 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate For issues that already existed in our issue tracker and were reported previously.
Projects
None yet
Development

No branches or pull requests

9 participants