Nextcloud version : 23.0.2
Operating system and version : docker instance
Apache or nginx version : nginx on nextcloud docker + nginx with letsencrypt for reverse proxy
PHP version : 7.4
Context :
- I successfully migrated from version 21 to 23, system was up and running fine
- I decided to migrate the db from mariadb to pgsql (running both in a separate docker instance). Migration appeared to work fine
- I manually updated my conf.php in order to change db hostname/user/password
Error :
Unfortunately I am now having a login loop even if I put in the right credentials.
It tries to connect and looks like it is working but after ~30 seconds it gets back to the login page.
I have tried to login several times and now nextcloud thinks I am trying to bruteforce
Do you guys have any idea what I should look at to get it back working ?
Here is my config.php :
<?php
$CONFIG = array (
'memcache.local' => '\\OC\\Memcache\\APCu',
'datadirectory' => '/data',
'trusted_proxies' =>
array (
0 => 'letsencrypt',
),
'overwritewebroot' => '/nextcloud',
'overwrite.cli.url' => 'https://mydomain.com/nextcloud',
'trusted_domains' =>
array (
0 => 'mydomain.com',
),
'instanceid' => 'ocuc82sk26kc',
'passwordsalt' => '***',
'secret' => '***,
'dbtype' => 'pgsql',
'version' => '23.0.2.1',
'dbname' => 'nextcloud_db',
'dbhost' => 'nextcloud_db',
'dbport' => '5432',
'dbtableprefix' => 'oc_',
'dbuser' => '***',
'dbpassword' => '***',
'installed' => true,
'maintenance' => false,
'loglevel' => 0,
...
);
outpout of nextcloud.log (normal manual login)
{'reqId':'U2Lkj23TB1ARBuiM3gpS','level':1,'time':'2022-02-26T09:32:19+00:00','remoteAddr':'192.168.1.1','user':'--','app':'no app in context','method':'POST','url':'/nextcloud/index.php','message':'IP address throttled because it reached the attempts limit in the last 30 minutes [action: login, delay: 25000, ip: 192.168.1.1]','userAgent':'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0','version':'23.0.2.1'}
{'reqId':'U2Lkj23TB1ARBuiM3gpS','level':2,'time':'2022-02-26T09:32:45+00:00','remoteAddr':'192.168.1.1','user':'--','app':'no app in context','method':'POST','url':'/nextcloud/index.php','message':'Login failed: djelizou (Remote IP: 192.168.1.1)','userAgent':'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0','version':'23.0.2.1'}
{'reqId':'U2Lkj23TB1ARBuiM3gpS','level':1,'time':'2022-02-26T09:33:10+00:00','remoteAddr':'192.168.1.1','user':'--','app':'core','method':'POST','url':'/nextcloud/index.php','message':'Bruteforce attempt from \'192.168.1.1\' detected for action \'login\'.','userAgent':'Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:97.0) Gecko/20100101 Firefox/97.0','version':'23.0.2.1'}
outpout of nextcloud.log (ios app / webdabv)
{'reqId':'G6GLegUgmrPdhKYhNNhI','level':0,'time':'2022-02-26T11:58:01+00:00','remoteAddr':'192.168.1.1','user':'--','app':'no app in context','method':'GET','url':'/nextcloud/ocs/v2.php/cloud/user?format=json','message':'Token is not valid: Token does not exist','userAgent':'Mozilla/5.0 (iOS) Nextcloud-iOS/4.2.2','version':'23.0.2.1','exception':{'Exception':'OC\\Authentication\\Exceptions\\InvalidTokenException','Message':'Token does not exist','Code':0,'Trace':[{'file':'/config/www/nextcloud/lib/private/Authentication/Token/Manager.php','line':146,'function':'getToken','class':'OC\\Authentication\\Token\\DefaultTokenProvider','type':'->','args':['*** sensitive parameters replaced ***']},{'file':'/config/www/nextcloud/lib/private/User/Session.php','line':531,'function':'getToken','class':'OC\\Authentication\\Token\\Manager','type':'->','args':['*** sensitive parameters replaced ***']},{'file':'/config/www/nextcloud/lib/private/User/Session.php','line':447,'function':'isTokenPassword','class':'OC\\User\\Session','type':'->','args':['*** sensitive parameters replaced ***']},{'file':'/config/www/nextcloud/lib/private/User/Session.php','line':584,'function':'logClientIn','class':'OC\\User\\Session','type':'->','args':['*** sensitive parameters replaced ***']},{'file':'/config/www/nextcloud/lib/base.php','line':1057,'function':'tryBasicAuthLogin','class':'OC\\User\\Session','type':'->'},{'file':'/config/www/nextcloud/ocs/v1.php','line':59,'function':'handleLogin','class':'OC','type':'::'},{'file':'/config/www/nextcloud/ocs/v2.php','line':23,'args':['/config/www/nextcloud/ocs/v1.php'],'function':'require_once'}],'File':'/config/www/nextcloud/lib/private/Authentication/Token/DefaultTokenProvider.php','Line':150,'Previous':{'Exception':'OCP\\AppFramework\\Db\\DoesNotExistException','Message':'token does not exist','Code':0,'Trace':[{'file':'/config/www/nextcloud/lib/private/Authentication/Token/DefaultTokenProvider.php','line':148,'function':'getToken','class':'OC\\Authentication\\Token\\DefaultTokenMapper','type':'->','args':['*** sensitive parameters replaced ***']},{'file':'/config/www/nextcloud/lib/private/Authentication/Token/Manager.php','line':146,'function':'getToken','class':'OC\\Authentication\\Token\\DefaultTokenProvider','type':'->','args':['*** sensitive parameters replaced ***']},{'file':'/config/www/nextcloud/lib/private/User/Session.php','line':531,'function':'getToken','class':'OC\\Authentication\\Token\\Manager','type':'->','args':['*** sensitive parameters replaced ***']},{'file':'/config/www/nextcloud/lib/private/User/Session.php','line':447,'function':'isTokenPassword','class':'OC\\User\\Session','type':'->','args':['*** sensitive parameters replaced ***']},{'file':'/config/www/nextcloud/lib/private/User/Session.php','line':584,'function':'logClientIn','class':'OC\\User\\Session','type':'->','args':['*** sensitive parameters replaced ***']},{'file':'/config/www/nextcloud/lib/base.php','line':1057,'function':'tryBasicAuthLogin','class':'OC\\User\\Session','type':'->'},{'file':'/config/www/nextcloud/ocs/v1.php','line':59,'function':'handleLogin','class':'OC','type':'::'},{'file':'/config/www/nextcloud/ocs/v2.php','line':23,'args':['/config/www/nextcloud/ocs/v1.php'],'function':'require_once'}],'File':'/config/www/nextcloud/lib/private/Authentication/Token/DefaultTokenMapper.php','Line':93},'CustomMessage':'Token is not valid: Token does not exist'}}
I checked the error.log on var/lib/nginx/logs for both my nextcloud docker and reverse proxy and it’s empty.
Any help on my problem would be appreciated