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

After upgrade to 10.1.0.4 unable to log in; oc_bfp_failed_logins table missing #34565

Closed
nerdlinger opened this issue Feb 20, 2019 · 3 comments
Closed

Comments

@nerdlinger
Copy link

Steps to reproduce

  1. Upgrade to 10.1.0.4
  2. Attempt to log in

Expected behaviour

Access to data

Actual behaviour

Error screen ("Internal Server Error")

Server configuration

Operating system: Debian 9
Web server: nginx 1.10.3
Database: mariadb
PHP version: MariaDB 10.1.37
ownCloud version: 10.1.0.4
Updated from an older ownCloud or fresh install: updated from previous
Where did you install ownCloud from: apt repository
Signing status (ownCloud 9.0 and above): integrity check passed

  • market:
    • EXTRA_FILE:
      • README.md:
        • expected:
        • current: b53ebb407cb90a5cf9e28463013f38e6aec3d39b4281187366e02b5fd014be144216a088fc50851635acc50cb71c92ad2407b21e8a4f3433b0f73a32ea066c97
          (Not worried about a README)

The content of config/config.php:
{
"system": {
"updatechecker": false,
"instanceid": "ocsp4lgd1nk8",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"REMOVED SENSITIVE VALUE",
"REMOVED SENSITIVE VALUE"
],
"datadirectory": "/var/www/owncloud/data",
"overwrite.cli.url": "REMOVED SENSITIVE VALUE",
"dbtype": "mysql",
"version": "10.1.0.4",
"dbname": "owncloud",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"logtimezone": "UTC",
"installed": true,
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_smtpmode": "php",
"maintenance": false,
"preview_max_x": 200,
"preview_max_y": 200,
"preview_max_scale_factor": 10,
"files_external_allow_create_new_local": "true",
"theme": "",
"loglevel": 0
}
}

List of activated apps:
Enabled:

  • activity: 2.4.2
  • brute_force_protection: 1.0.1
  • calendar: 1.6.1
  • camerarawpreviews: 0.6.4
  • checksum: 0.3.5
  • comments: 0.3.0
  • configreport: 0.1.1
  • contacts: 1.5.5
  • dav: 0.4.0
  • federatedfilesharing: 0.3.1
  • federation: 0.1.0
  • files: 1.5.1
  • files_external: 0.7.1
  • files_pdfviewer: 0.10.0
  • files_sharing: 0.11.0
  • files_trashbin: 0.9.1
  • files_versions: 1.3.0
  • files_videoplayer: 0.9.8
  • firstrunwizard: 1.1
  • gallery: 16.1.1
  • market: 0.3.0
  • music: 0.9.3
  • notifications: 0.4.1
  • onlyoffice: 2.1.3
  • phonetrack: 0.2.8
  • provisioning_api: 0.5.0
  • systemtags: 0.3.0
  • tasks: 0.9.7
  • updatenotification: 0.2.1
    Disabled:
  • audioplayer
  • encryption
  • external
  • gpxpod
  • user_external

Are you using external storage, if yes which one: local/smb/sftp/...
No

Are you using encryption: yes/no
Yes

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No

Client configuration

Browser: Chrome 72.0.3626.109
Operating system: Windows 10

Logs

Web server error log

No error log triggered

ownCloud log (data/owncloud.log)

{"reqId":"5L2jipsxyfwxfEpuMffF","level":0,"time":"2019-02-20T03:41:27+00:00","remoteAddr":"192.168.0.3","user":"--","app":"OC\User\Session::validateToken","method":"POST","url":"/login","message":"token REMOVED SENSITIVE VALUE, not found"}
{"reqId":"5L2jipsxyfwxfEpuMffF","level":3,"time":"2019-02-20T03:41:27+00:00","remoteAddr":"192.168.0.3","user":"--","app":"index","method":"POST","url":"/login","message":"Exception: {"Exception":"Doctrine\\DBAL\\Exception\\TableNotFoundException","Message":"An exception occurred while executing 'SELECT attempted_at FROM oc_bfp_failed_logins WHERE (attempted_at > ?) AND (uid = ?) AND (ip = ?) ORDER BY attempted_at DESC LIMIT 1' with params [1550633787, \"REMOVED SENSITIVE VALUE\", \"192.168.0.3\"]:\n\nSQLSTATE[42S02]: Base table or view not found: 1146 Table 'owncloud.oc_bfp_failed_logins' doesn't exist","Code":0,"Trace":"#0 \/var\/www\/owncloud\/lib\/composer\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/DBALException.php(128): Doctrine\\DBAL\\Driver\\AbstractMySQLDriver->convertException('An exception oc...', Object(Doctrine\\DBAL\\Driver\\PDOException))\n#1 \/var\/www\/owncloud\/lib\/composer\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Connection.php(855): Doctrine\\DBAL\\DBALException::driverExceptionDuringQuery(Object(Doctrine\\DBAL\\Driver\\PDOMySql\\Driver), Object(Doctrine\\DBAL\\Driver\\PDOException), 'SELECT attempt...', Array)\\n#2 \\\/var\\\/www\\\/owncloud\\\/lib\\\/private\\\/DB\\\/Connection.php(187): Doctrine\\\\DBAL\\\\Connection->executeQuery('SELECT attempt...', Array, Array, NULL)\n#3 \/var\/www\/owncloud\/lib\/composer\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Query\/QueryBuilder.php(206): OC\\DB\\Connection->executeQuery('SELECT `attempt...', Array, Array)\n#4 \/var\/www\/owncloud\/lib\/private\/DB\/QueryBuilder\/QueryBuilder.php(141): Doctrine\\DBAL\\Query\\QueryBuilder->execute()\n#5 \/var\/www\/owncloud\/apps\/brute_force_protection\/lib\/Db\/FailedLoginAttemptMapper.php(103): OC\\DB\\QueryBuilder\\QueryBuilder->execute()\n#6 \/var\/www\/owncloud\/apps\/brute_force_protection\/lib\/Throttle.php(97): OCA\\BruteForceProtection\\Db\\FailedLoginAttemptMapper->getLastFailedLoginAttemptTimeForUidIpCombination('REMOVED SENSITIVE VALUE', '192.168.0.3')\n#7 \/var\/www\/owncloud\/apps\/brute_force_protection\/lib\/Hooks.php(95): OCA\\BruteForceProtection\\Throttle->applyBruteForcePolicy('REMOVED SENSITIVE VALUE', '192.168.0.3')\n#8 \/var\/www\/owncloud\/apps\/brute_force_protection\/lib\/Hooks.php(63): OCA\\BruteForceProtection\\Hooks->preLoginCallback('REMOVED SENSITIVE VALUE')\n#9 \/var\/www\/owncloud\/lib\/private\/Hooks\/EmitterTrait.php(99): OCA\\BruteForceProtection\\Hooks->OCA\\BruteForceProtection\\{closure}('REMOVED SENSITIVE VALUE', 'SanBerdu99')\n#10 \/var\/www\/owncloud\/lib\/private\/Hooks\/PublicEmitter.php(33): OC\\Hooks\\BasicEmitter->emit('\\\\OC\\\\User', 'preLogin', Array)\n#11 \/var\/www\/owncloud\/lib\/private\/User\/Session.php(519): OC\\Hooks\\PublicEmitter->emit('\\\\OC\\\\User', 'preLogin', Array)\n#12 \/var\/www\/owncloud\/lib\/private\/User\/Session.php(333): OC\\User\\Session->loginWithPassword(*** sensitive parameters replaced )\n#13 \/var\/www\/owncloud\/core\/Controller\/LoginController.php(203): OC\\User\\Session->login( sensitive parameters replaced )\n#14 \/var\/www\/owncloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(153): OC\\Core\\Controller\\LoginController->tryLogin( sensitive parameters replaced ***)\n#15 \/var\/www\/owncloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php(85): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OC\\Core\\Controller\\LoginController), 'tryLogin')\n#16 \/var\/www\/owncloud\/lib\/private\/AppFramework\/App.php(100): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OC\\Core\\Controller\\LoginController), 'tryLogin')\n#17 \/var\/www\/owncloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php(46): OC\\AppFramework\\App::main('LoginController', 'tryLogin', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#18 \/var\/www\/owncloud\/lib\/private\/Route\/Router.php(342): OC\\AppFramework\\Routing\\RouteActionHandler->__invoke(Array)\n#19 \/var\/www\/owncloud\/lib\/base.php(909): OC\\Route\\Router->match('\/login')\n#20 \/var\/www\/owncloud\/index.php(54): OC::handleRequest()\n#21 {main}","File":"\/var\/www\/owncloud\/lib\/composer\/doctrine\/dbal\/lib\/Doctrine\/DBAL\/Driver\/AbstractMySQLDriver.php","Line":53}"}

Browser log

JQMIGRATE: Migrate is installed, version 1.4.0
shareconfigmodel.js?v=f55d4ef83ddd64343be0ea891bb19875:24 Uncaught ReferenceError: oc_appconfig is not defined
at shareconfigmodel.js?v=f55d4ef83ddd64343be0ea891bb19875:24
at shareconfigmodel.js?v=f55d4ef83ddd64343be0ea891bb19875:99
(anonymous) @ shareconfigmodel.js?v=f55d4ef83ddd64343be0ea891bb19875:24
(anonymous) @ shareconfigmodel.js?v=f55d4ef83ddd64343be0ea891bb19875:99
js.js?v=f55d4ef83ddd64343be0ea891bb19875:198 Uncaught TypeError: Cannot read property 'substring' of undefined
at Object.filePath (js.js?v=f55d4ef83ddd64343be0ea891bb19875:198)
at viewer.js?v=f55d4ef83ddd64343be0ea891bb19875:4

@ownclouders
Copy link
Contributor

GitMate.io thinks the contributor most likely able to help you is @ownclouders.

Possibly related issues are #28331 (DB issues after upgrade from 9.1.5 to 10.0.2), #27768 (Missing user_ldap after Upgrade to 10), #10088 (Missing table after upgrade), #30792 (After upgrade to 10.0.7, user cannot log-in anymore), and #34536 ( integrity check after upgrade to 10.0.1).

@karakayasemi
Copy link
Contributor

oc_bfp_failed_logins table comes with brute-force protection app. If you disable the app, probably you will be able to login again.

Can you write the exact steps to reproduce issue. What was your previous server version?

@nerdlinger
Copy link
Author

Thank you. Turned off BFP, and problem fixed. will deal with reactivating BFP later.

Thanks!

Closing ticket, but wondering if the upgrade incorrectly purged a table.

@lock lock bot locked as resolved and limited conversation to collaborators Feb 21, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants