Authentication problem after upgrade to 10.0.0

Hi all,

I upgraded my 9.0.53 installation to 10.0.0. Did this by running php occ upgrade as user www-data (I’m on Debian).

Since this upgrade, I don’t see any files or calendar entries. Web Interfaces says Problem loading page, reloading in 5 seconds.

Apache error log says:
[Wed Aug 31 19:01:47.479659 2016] [:error] [pid 4522] [client 2001:db8:1:1:ed64:4cb2:c227:b392:40452] PHP Fatal error: Uncaught exception 'Exception' with message 'Session has been closed - no further changes to the session are allowed' in /var/www/\nStack trace:\n#0 /var/www/ OC\Session\Internal->validateSession()\n#1 /var/www/ OC\Session\Internal->set('encrypted_sessi...', 'e3b4eba3a833fa5...')\n#2 /var/www/ OC\Session\CryptoSessionData->close()\n#3 [internal function]: OC\Session\CryptoSessionData->__destruct()\n#4 {main}\n thrown in /var/www/ on line 154, referer:

nextcloud.log says:
{"reqId":"O+0RJqz9QDOXkLpQrjyh","remoteAddr":"2001:db8:1:1:ed64:4cb2:c227:b392","app":"core","message":"Login failed: 'sven' (Remote IP: '2001:db8:1:1:ed64:4cb2:c227:b392')","level":2,"time":"2016-08-31T19:14:22+02:00","method":"GET","url":"\/cloud\/index.php\/apps\/files\/","user":"sven"}

here comes my config.php:
<?php $CONFIG = array ( 'instanceid' => 'oc4xxxxxxxxx', 'passwordsalt' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx', 'trusted_domains' => array ( 0 => '', 1 => '', ), 'datadirectory' => '/var/www/', 'overwrite.cli.url' => '', 'dbtype' => 'mysql', 'version' => '', 'dbname' => 'owncloud2', 'dbhost' => 'webserver', 'dbtableprefix' => 'oc_', 'dbuser' => 'owncloud', 'dbpassword' => 'xxxxxxxxxxxxxxxx', 'logtimezone' => 'Europe/Berlin', 'installed' => true, 'theme' => '', 'loglevel' => 2, 'maintenance' => false, 'user_backends' => array ( 0 => array ( 'class' => 'OC_User_IMAP', 'arguments' => array ( 0 => '{localhost:993/imap/ssl/novalidate-cert/notls/readonly}', ), ), ), 'htaccess.RewriteBase' => '/cloud', );

I changed nothing in config.php before/after the update. These settings worked fine with version 9.0.53.

As you can see, authentication is done against a local IMAP server. I suspect there might be a correlation.

Does anybody have an idea?


Can you make sure that your browser cache is cleaned, perhaps restart apache as well. You shouldn’t get any new session errors any more.

Thanks for your response, tflidd!

I stopped apache, checked that the “apache” process is not running any more and started it again. Then I cleaned Firefox’ cache and cookies. The problem remains. I even tried it from my work computer which was never used to access any nextcloud or owncloud system. The behaviour is unchanged, unfortunately.

Thanks again!

I couldn’t find any current issues related to this error messages. It’s probably the best to report this problem to the bugtracker and fill out the issue template:

Did that:

(Sorry, hat to disguise the link as I couldn’t post otherwise)


I repaired the link. Thanks for submitting this issue.

Unfortunately the problem is still present in 10.0.1. :frowning:

I just upgraded to 11.0.0. The behaviour is now different: I cannot login although the user (sven) exists and the password is correct. I’m using user_external to login against an IMAP server on localhost.

The login webpage silently returns to the login webpage again without displaying any error message. This is what “tail -f /var/log/mail.log cloud/data/nextcloud.log” says:

==> /var/log/mail.log <==
Dec 13 16:22:54 sven-router dovecot: imap-login: Login: user=<sven>, method=PLAIN, rip=, lip=, mpid=26835, TLS, session=<nApUy4tDMgB/AAAB>
Dec 13 16:22:54 sven-router dovecot: imap(sven): Disconnected: Logged out in=15 out=409
Dec 13 16:22:54 sven-router dovecot: imap-login: Login: user=<sven>, method=PLAIN, rip=, lip=, mpid=26837, TLS, session=<yfhWy4tDNAB/AAAB>
Dec 13 16:22:54 sven-router dovecot: imap(sven): Disconnected: Logged out in=15 out=409

==> cloud/data/nextcloud.log <==
{"reqId":"qM9P6sa8IGBEphoG+GYU","remoteAddr":"","app":"core","message":"Login failed: 'sven' (Remote IP: '')","level":2,"time":"2016-12-13T16:22:55+01:00","method":"GET","url":"\/cloud\/index.php\/apps\/files\/","user":"sven","version":""}

When I enter a wrong password, the login page shows “Wrong password. Reset it?” (which is fine since the password is wrong!) and the logs show this:

==> /var/log/mail.log <==
Dec 13 16:26:51 sven-router dovecot: imap-login: Aborted login (auth failed, 1 attempts in 4 secs): user=<sven>, method=PLAIN, rip=, lip=, TLS, session=<qt042YtDhAB/AAAB>

==> cloud/data/nextcloud.log <==
{"reqId":"YkyiaPzo5mzngGnDatWl","remoteAddr":"","app":"core","message":"Login failed: 'sven' (Remote IP: '')","level":2,"time":"2016-12-13T16:26:51+01:00","method":"POST","url":"\/cloud\/index.php\/login?redirect_url=\/cloud\/index.php\/apps\/files\/","user":"--","version":""}

Does anybody have an idea how to track the problem down?


Unfortunately, still the same with 11.0.1.

Any ideas anybody?


Hi there (Sven?)

I habe also set auth to imap (through imapproxy to dovecot), check in DB:
MariaDB [owncloud]> select * from oc_users_external;
| backend | uid | displayname |
| {localhost:1143} | xyz | NULL |

But there was also an entry in the oc_users table for the same user

MariaDB [owncloud]> select * from oc_users;
| uid | displayname | password |
| xyz | NULL | 1|$2y$10balablablablablablab…etec… |
1 row in set (0.01 sec)

As I had the same problem after upgrading to 10.0.3 or 10.0.4, and found your post and some others, I presume there is a bug in core, where it checks against imap ok (in admin_xx), but in core again maybe against internal user and then fails, and logs you out again.
So I “re/moved” the entry in the oc_users table:
update oc_users set uid =‘xyz1’ where uid = ‘xyz’;

(you could try with your sven user, if you can log in again afterwards)

Good luck.
PS: I had different log entries:
{“reqId”:“cM+o1IZIMrpLy4luuxxx”,“remoteAddr”:“”,“app”:“admin_audit”,“message”:“Login attempt: “xyz””,“level”:1,“time”:“2017-03-25T12:17:33+00:00”,“method”:“POST”,“url”:"/oc/index.php/login",“user”:"–",“version”:“”}
{“reqId”:“cM+o1IZIMrpLy4luuxxx”,“remoteAddr”:“”,“app”:“admin_audit”,“message”:“Login successful: “xyz””,“level”:1,“time”:“2017-03-25T12:17:34+00:00”,“method”:“POST”,“url”:"/oc/index.php/login",“user”:“xyz”,“version”:“”}
{“reqId”:“8/um5+Ze9ijxxx/ZGxxx”,“remoteAddr”:“”,“app”:“core”,“message”:“Login failed: ‘xyz’ (Remote IP: ‘’)”,“level”:2,“time”:“2017-03-25T12:17:34+00:00”,“method”:“GET”,“url”:"/oc/index.php/apps/files/",“user”:“xyz”,“version”:“”}
{“reqId”:“8/um5+Ze9ijC07/ZGxxx”,“remoteAddr”:“”,“app”:“no app in context”,“message”:“Current user is not logged in”,“level”:0,“time”:“2017-03-25T12:17:34+00:00”,“method”:“GET”,“url”:"/oc/index.php/apps/files/",“user”:"–",“version”:“”}

Because this error was already reported to github, and was fixed (somehow), please reopen a bug report there and link to the old issue as well.

Hi @nextcloud_cmb,

thank you very much!! Indeed, my oc_users table has a “sven” entry, and if I rename that to “sven2”, Nextcloud starts working again!

I’m very glad that after 6 months ob absence, I can now continue using my Nextcloud installation.

Thanks again!