Stuck on WEB UI Login screen


#1

hi,

My owncloud community edition suddenly redirects back to login page when log in. It shows a message as "you took too long to login please try again now". But when desktop or mobile clients are used, they log in correctly.

Please help me to sort this out.

sudo -u www-data ./occ status

  • installed: true
  • version: 10.0.7.2
  • versionstring: 10.0.7
  • edition: Community

sudo -u www-data ./occ config:list

{
"system": {
"instanceid": "ocq1tbj45qou",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"xxxx.xyz"
],
"datadirectory": "\/var\/www\/lrndata",
"overwrite.cli.url": "http:\/\/xxxx.xyz\/",
"dbtype": "mysql",
"version": "10.0.7.2",
"dbname": "oclearndb",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"logtimezone": "UTC",
"installed": true,
"mail_smtpmode": "smtp",
"mail_smtpauthtype": "PLAIN",
"ldapIgnoreNamingRules": false,
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "587",
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"maintenance": false,
"loglevel": "2",
"debug": true,
"memcache.local": "\OC\Memcache\APCu",
"memcache.locking": "\OC\Memcache\Redis",
"redis": {
"host": "localhost",
"port": 6379
}
},
"apps": {
"backgroundjob": {
"lastjob": "13"
},
"comments": {
"enabled": "yes",
"installed_version": "0.3.0",
"types": "logging,dav"
},
"configreport": {
"enabled": "yes",
"installed_version": "0.1.1",
"types": "filesystem"
},
"core": {
"backgroundjobs_mode": "cron",
"default_encryption_module": "OC_DEFAULT_MODULE",
"encryption_enabled": "yes",
"installedat": "1520251467.5854",
"lastcron": "1521013141",
"lastupdateResult": "[]",
"lastupdatedat": "1521005577",
"oc.integritycheck.checker": "{\"theme-lrn\":{\"EXCEPTION\":{\"class\":\"OC\\IntegrityCheck\\Exceptions\\InvalidSignatureException\",\"message\":\"Signature data not found.\"}}}",
"public_files": "files_sharing\/public.php",
"public_webdav": "dav\/appinfo\/v1\/publicwebdav.php"
},
"dav": {
"enabled": "yes",
"installed_version": "0.3.2",
"types": "filesystem"
},
"encryption": {
"enabled": "yes",
"installed_version": "1.3.1",
"masterKeyId": "master_ca48aaed",
"publicShareKeyId": "pubShare_ca48aaed",
"recoveryAdminEnabled": "1",
"recoveryKeyId": "recoveryKey_ca48aaed",
"types": "filesystem",
"userSpecificKey": "1"
},
"federatedfilesharing": {
"enabled": "yes",
"installed_version": "0.3.1",
"types": "filesystem"
},
"federation": {
"enabled": "yes",
"installed_version": "0.1.0",
"types": "authentication"
},
"files": {
"cronjob_scan_files": "500",
"enabled": "yes",
"installed_version": "1.5.1",
"types": "filesystem"
},
"files_external": {
"enabled": "yes",
"installed_version": "0.7.1",
"ocsid": "166048",
"types": "filesystem"
},
"files_pdfviewer": {
"enabled": "yes",
"installed_version": "0.8.2",
"signed": "true",
"types": ""
},
"files_sharing": {
"enabled": "yes",
"installed_version": "0.10.1",
"types": "filesystem"
},
"files_trashbin": {
"enabled": "yes",
"installed_version": "0.9.1",
"types": "filesystem"
},
"files_versions": {
"enabled": "yes",
"installed_version": "1.3.0",
"types": "filesystem"
},
"files_videoplayer": {
"enabled": "yes",
"installed_version": "0.9.8",
"types": ""
},
"firstrunwizard": {
"enabled": "yes",
"installed_version": "1.1",
"ocsid": "166055",
"types": ""
},
"gallery": {
"enabled": "yes",
"installed_version": "16.0.2",
"signed": "true",
"types": ""
},
"market": {
"enabled": "yes",
"installed_version": "0.2.3",
"types": ""
},
"notifications": {
"enabled": "yes",
"installed_version": "0.3.2",
"types": "logging"
},
"provisioning_api": {
"enabled": "yes",
"installed_version": "0.5.0",
"types": "prevent_group_restriction"
},
"richdocuments": {
"enabled": "yes",
"installed_version": "2.0.5",
"signed": "true",
"types": "prevent_group_restriction",
"wopi_url": "https:\/\/office.xxxx.xyz"
},
"systemtags": {
"enabled": "yes",
"installed_version": "0.3.0",
"types": "logging"
},
"templateeditor": {
"enabled": "yes",
"installed_version": "0.2",
"types": ""
},
"theme-example": {
"enabled": "no",
"installed_version": "1.0.0",
"types": "theme"
},
"theme-lrn": {
"enabled": "yes",
"installed_version": "1.0.0",
"types": "theme"
},
"updatenotification": {
"enabled": "yes",
"installed_version": "0.2.1",
"types": ""
},
"user_ldap": {
"enabled": "yes",
"installed_version": "0.10.0",
"signed": "true",
"types": "authentication"
}
}
}

Thanks


took too long login
Login fails "You took too long to login, please try again now"
#2

Hi,

did you change anything lately?

Is anything in the owncloud.log file or the apache2 - access log or error log?


#3

In I added memcache settings but it worked for about a day. Also add the fail2ban settings according to the documentation and after seen this problem i disabled fail2ban, but no change.

owncloud.log

{"reqId":"F861P7KlA1BsyPUcBCYP","level":2,"time":"2018-03-14T09:22:10+00:00","remoteAddr":"192.248.4.91","user":"--","app":"core","method":"POST","url":"\/index.php\/heartbeat","message":"Trusted domain error. \"192.248.4.91\" tried to access using \"x.y.y.z\" as host."}
{"reqId":"GKOATW3AmBwmAIRP8gaC","level":2,"time":"2018-03-14T09:37:10+00:00","remoteAddr":"192.248.4.91","user":"--","app":"core","method":"POST","url":"\/index.php\/heartbeat","message":"Trusted domain error. \"192.248.4.91\" tried to access using \"x.y.y.z\" as host."}
{"reqId":"QafiKJTkksk3NDucKXHQ","level":2,"time":"2018-03-14T09:52:11+00:00","remoteAddr":"192.248.4.91","user":"--","app":"core","method":"POST","url":"\/index.php\/heartbeat","message":"Trusted domain error. \"192.248.4.91\" tried to access using \"x.y.y.z\" as host."}
{"reqId":"abvg9Oe1gG8Wf9jobpKe","level":2,"time":"2018-03-14T10:45:08+00:00","remoteAddr":"209.126.136.4","user":"--","app":"core","method":"GET","url":"\/","message":"Trusted domain error. \"209.126.136.4\" tried to access using \"x.y.y.z\" as host."}

apache access log

a.b.c.d - - [14/Mar/2018:17:20:38 +0530] "GET / HTTP/1.1" 302 4049 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:38 +0530] "GET /index.php/login HTTP/1.1" 200 3025 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:38 +0530] "GET /index.php/core/js/oc.js?v=6f0b0d0abcd0b10875252a020f6b3a2d HTTP/1.1" 200 3598 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:39 +0530] "GET / HTTP/1.1" 302 843 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:39 +0530] "GET /core/vendor/browser-update/browser-update.js?=1521028239483 HTTP/1.1" 200 11624 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 1013_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:42 +0530] "POST /index.php/login HTTP/1.1" 200 3070 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:42 +0530] "GET /index.php/core/js/oc.js?v=6f0b0d0abcd0b10875252a020f6b3a2d HTTP/1.1" 200 3598 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:43 +0530] "GET /core/vendor/browser-update/browser-update.js?=1521028242986 HTTP/1.1" 200 11624 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 1013_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36" - - [14/Mar/2018:17:20:38 +0530] "GET / HTTP/1.1" 302 4049 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:38 +0530] "GET /index.php/login HTTP/1.1" 200 3025 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:38 +0530] "GET /index.php/core/js/oc.js?v=6f0b0d0abcd0b10875252a020f6b3a2d HTTP/1.1" 200 3598 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:39 +0530] "GET / HTTP/1.1" 302 843 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:39 +0530] "GET /core/vendor/browser-update/browser-update.js?=1521028239483 HTTP/1.1" 200 11624 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 1013_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:42 +0530] "POST /index.php/login HTTP/1.1" 200 3070 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:42 +0530] "GET /index.php/core/js/oc.js?v=6f0b0d0abcd0b10875252a020f6b3a2d HTTP/1.1" 200 3598 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"
a.b.c.d - - [14/Mar/2018:17:20:43 +0530] "GET /core/vendor/browser-update/browser-update.js?=1521028242986 HTTP/1.1" 200 11624 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 1013_3) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.186 Safari/537.36"

error log doesnt get populated when I try to login.

Also I understood that the error in owncloud.log comes because of accessing the system via IP address. Anyway that log also doesn't show anything when I tried to log in.

Thanks


#4

I see

Trusted domain error

Can you solve this in your config.php?

also try to disable caching and see if it works, also try to empty your cache - try another browser.


#5

I add the IP address to the trusted list and also disabled caching. but there were no difference.
I also tried with multiple browsers.

After that I changed the loglevel to 0 and now I see CSRF error as following,

{"reqId":"uB0dnpRg4rxVbrMiJ5Co","level":0,"time":"2018-03-14T12:59:58+00:00","remoteAddr":"a.b.c.d","user":"--","app":"no app in context","method":"POST","url":"\/index.php\/login","message":"CSRF check failed"}
{"reqId":"Tx4C80zcuTaI2zuPSrDM","level":0,"time":"2018-03-14T13:00:00+00:00","remoteAddr":"a.b.c.d","user":"--","app":"no app in context","method":"POST","url":"\/index.php\/login","message":"CSRF check failed"}
{"reqId":"krlRhPSAn9RWqTidYxUy","level":0,"time":"2018-03-14T13:00:01+00:00","remoteAddr":"","user":"--","app":"cron","method":"--","url":"--","message":"Started background job of class : OC\Authentication\Token\DefaultTokenCleanupJob with arguments : "}
{"reqId":"krlRhPSAn9RWqTidYxUy","level":1,"time":"2018-03-14T13:00:01+00:00","remoteAddr":"","user":"--","app":"cron","method":"--","url":"--","message":"Invalidating tokens older than 2018-03-13T13:00:01+00:00"}
{"reqId":"krlRhPSAn9RWqTidYxUy","level":0,"time":"2018-03-14T13:00:01+00:00","remoteAddr":"","user":"--","app":"cron","method":"--","url":"--","message":"Finished background job, the job took : 0 seconds, this job is an instance of class : OC\Authentication\Token\DefaultTokenCleanupJob with arguments : "}

can you suggest what I can do
Thanks


#6

You could disable this check in your config.php:

'csrf.disabled' => true,

https://doc.owncloud.com/server/10.0/admin_manual/configuration/server/config_sample_php_parameters.html?highlight=csrf#user-experience


#7

I disabled the check but now a new error comes as "Internal Server Error"

log file

{"reqId":"Ih7Jg6Db87dBTdCMzCaj","level":2,"time":"2018-03-14T14:20:51+00:00","remoteAddr":"a.b.c.d","user":"--","app":"core","method":"POST","url":"\/index.php\/login","message":"Login failed: '' (Remote IP: 'a.b.c.d')"}
{"reqId":"Ih7Jg6Db87dBTdCMzCaj","level":3,"time":"2018-03-14T14:20:51+00:00","remoteAddr":"a.b.c.d","user":"--","app":"index","method":"POST","url":"\/index.php\/login","message":"Exception: {\"Exception\":\"InvalidArgumentException\",\"Message\":\"$email cannot be empty\",\"Code\":0,\"Trace\":\"#0 \\/var\\/www\\/owncloud\\/core\\/Controller\\/LoginController.php(203): OC\\User\\Manager->getByEmail(NULL)\n#1 [internal function]: OC\\Core\\Controller\\LoginController->tryLogin(*** sensitive parameters replaced ***)\n#2 \\/var\\/www\\/owncloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php(159): call_user_func_array(Array, Array)\n#3 \\/var\\/www\\/owncloud\\/lib\\/private\\/AppFramework\\/Http\\/Dispatcher.php(89): OC\\AppFramework\\Http\\Dispatcher->executeController(Object(OC\\Core\\Controller\\LoginController), 'tryLogin')\n#4 \\/var\\/www\\/owncloud\\/lib\\/private\\/AppFramework\\/App.php(103): OC\\AppFramework\\Http\\Dispatcher->dispatch(Object(OC\\Core\\Controller\\LoginController), 'tryLogin')\n#5 \\/var\\/www\\/owncloud\\/lib\\/private\\/AppFramework\\/Routing\\/RouteActionHandler.php(46): OC\\AppFramework\\App::main('LoginController', 'tryLogin', Object(OC\\AppFramework\\DependencyInjection\\DIContainer), Array)\n#6 [internal function]: OC\\AppFramework\\Routing\\RouteActionHandler->_invoke(Array)\n#7 \\/var\\/www\\/owncloud\\/lib\\/private\\/Route\\/Router.php(342): calluser_func(Object(OC\\AppFramework\\Routing\\RouteActionHandler), Array)\n#8 \\/var\\/www\\/owncloud\\/lib\\/base.php(913): OC\\Route\\Router->match('\\/login')\n#9 \\/var\\/www\\/owncloud\\/index.php(55): OC::handleRequest()\n#10 {main}\",\"File\":\"\\/var\\/www\\/owncloud\\/lib\\/private\\/User\\/Manager.php\",\"Line\":427}"}

I am sure on my user credentials, checked with two accounts. one admin and the other a normal user. Also it says something about a missing emails but my users have email addresses


#8

Do you have authentication by email enabled?


#9

I think I havent,

my new config is

"system": {
"instanceid": "ocq1tbj45qou",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"xxxx.xyz",
"a.b.c.d"
],
"datadirectory": "\/var\/www\/lrndata",
"overwrite.cli.url": "http:\/\/xxxx.xyz\/",
"dbtype": "mysql",
"version": "10.0.7.2",
"dbname": "oclearndb",
"dbhost": "localhost",
"dbtableprefix": "oc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"logtimezone": "UTC",
"installed": true,
"mail_smtpmode": "smtp",
"mail_smtpauthtype": "PLAIN",
"ldapIgnoreNamingRules": false,
"mail_from_address": "REMOVED SENSITIVE VALUE",
"mail_domain": "REMOVED SENSITIVE VALUE",
"mail_smtpport": "587",
"mail_smtphost": "REMOVED SENSITIVE VALUE",
"maintenance": false,
"debug": false,
"loglevel": 0,
"csrf.disabled": true
},


#10

can you try to login with the email instead of the username?


#11

I tried by using the email, but still no difference.

same error pops in the log file


#12

can you try to disable your custom theme app and then try to login?


#13

I disabled the custom theme but still the same


#14

are you trying to login with a local user or an LDAP user?

If LDAP user - can you show the the LDAP config.

Also can you try "sudo -u www-data php occ user:sync -l"

then you will see the backands, and then do "sudo -u www-data php occ user:sync ""

Instead of enter the LDAP proxy


#15

No i haven't yet configured ldap. So I'm trying with my local users.


#16

so login with email address doesn't work, and login with username doesn't work.

can you try to login to your database and check the oc_accounts table, maybe you have made an error and the email address is different.


#17

oc_accounts table contains the correct data.


#18

I am also running in to this issue but this only happen when am using a Chrome base browser like Vilvaldi. If I use IE to access the same oc-server-domain everything works fine. It's pretty strange. In my logs it does report the same "CSRF check failed" error. As long as I can connect via different apps am ok with it. But definity there is a bug within Chrome base browser or Owncloud.

Let me know if you find the solutions

Br,


#19

Hi,

I couldnot resolve the issue. Therefore, I purged and removed all packages installed including the db. Then the reinstallation still works. Yet I couldnt find the issue as the second time I did all the things I did in first install.


#20

chmod 777 /var/lib/php/session
给这个文件夹权限就可以了
!!