After migration no login possible

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 16.0.5.1
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04 server
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.29
PHP version (eg, 7.1): 7.2.24

The issue you are facing:
After migration to a new server (old was ubuntu 14.04) I cannot login anymore, neither web nor any client. database is set up again and seems to be fine. I’m runnig plesk. Wherever I try it seems I do have the right permissions…

Is this the first time you’ve seen this error? (Y/N):
yes

Steps to replicate it:

  1. try to login

The output of your Nextcloud log in Admin > Logging:

{"reqId":"XdmhlmplNFaEtaUqyYz3lgAAAAU","level":2,"time":"2019-11-23T21:16:31+00:00","remoteAddr":"92.218.116.68","user":"--","app":"core","method":"POST","url":"\/index.php\/login?user=domhans","message":"Login failed: 'domhans' (Remote IP: '92.218.116.68')","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko\/20100101 Firefox\/70.0","version":"16.0.5.1"}
{"reqId":"XdmhlmplNFaEtaUqyYz3lgAAAAU","level":1,"time":"2019-11-23T21:16:56+00:00","remoteAddr":"92.218.116.68","user":"--","app":"core","method":"POST","url":"\/index.php\/login?user=domhans","message":"Bruteforce attempt from \"92.218.116.68\" detected for action \"login\".","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko\/20100101 Firefox\/70.0","version":"16.0.5.1"}
{"reqId":"Xdmi4bQBo0OOk@A6FRfdkQAAAAE","level":2,"time":"2019-11-23T21:22:02+00:00","remoteAddr":"92.218.116.68","user":"--","app":"core","method":"POST","url":"\/index.php\/login?user=domhans","message":"Login failed: 'domhans' (Remote IP: '92.218.116.68')","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko\/20100101 Firefox\/70.0","version":"16.0.5.1"}
{"reqId":"Xdmi4bQBo0OOk@A6FRfdkQAAAAE","level":1,"time":"2019-11-23T21:22:27+00:00","remoteAddr":"92.218.116.68","user":"--","app":"core","method":"POST","url":"\/index.php\/login?user=domhans","message":"Bruteforce attempt from \"92.218.116.68\" detected for action \"login\".","userAgent":"Mozilla\/5.0 (X11; Ubuntu; Linux x86_64; rv:70.0) Gecko\/20100101 Firefox\/70.0","version":"16.0.5.1"}

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '...',
  'passwordsalt' => '...',
  'secret' => '...',
  'trusted_domains' =>
  array (
    0 => '...',
  ),
  'datadirectory' => '/var/www/vhosts/domhans.de/OwnCloudData',
  'overwrite.cli.url' => '...',
  'dbtype' => 'mysql',
  'version' => '16.0.5.1',
  'dbname' => 'owncloud',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'domhans',
  'dbpassword' => '...',
  'installed' => true,
  'theme' => '',
  'maintenance' => false,
  'forcessl' => true,
  'forceSSLforSubdomains' => true,
  'loglevel' => 0,
  'trashbin_retention_obligation' => 'auto',
  'appstore.experimental.enabled' => false,
  'debug' => true,
  'updater.release.channel' => 'stable',
  'app_install_overwrite' =>
  array (
    0 => 'calendar',
  ),
);

The output of your Apache/nginx/system log in /var/log/____:

::1 - - [23/Nov/2019:22:21:19 +0100] "OPTIONS * HTTP/1.0" 200 110 "-" "Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 (internal dummy connection)"
::1 - - [23/Nov/2019:22:21:20 +0100] "OPTIONS * HTTP/1.0" 200 110 "-" "Apache/2.4.29 (Ubuntu) OpenSSL/1.1.1 mod_fcgid/2.3.9 (internal dummy connection)"

I seem to have the same problem Passwords don't work after server migration

Have you tried to clear the bruteforce table? as described here:

I tried this, no success. But thanks.
Anything else I could try?

Also changed Admin password manually, no success…

I finally tried to manually upgrade nextcloud to 16.0.6. Upgrade worked without errors but still no login possible.
Here is another output of the nextcloud log:

{“reqId”:“XfH932JOihpUpEyuSjqWuwAAAAk”,“level”:0,“time”:“2019-12-12T08:44:15+00:00”,“remoteAddr”:“88.77.7.40”,“user”:“–”,“app”:“webdav”,“method”:“PROPFIND”,“url”:“/remote.php/dav/”,“message”:{“Exception”:“Sabre\DAV\Exception\NotAuthenticated”,“Message”:“No public access to this resource., No ‘Authorization: Basic’ header found. Either the client didn’t send one, or the server is misconfigured, No ‘Authorization: Bearer’ header found. Either the client didn’t send one, or the server is mis-configured, No ‘Authorization: Basic’ header found. Either the client didn’t send one, or the server is misconfigured”,“Code”:0,“Trace”:[{“function”:“beforeMethod”,“class”:“Sabre\DAV\Auth\Plugin”,“type”:“->”,“args”:[{“absoluteUrl”:“https://owncloud.domhans.de/remote.php/dav/”,“class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]},{“file”:“/var/www/vhosts/domhans.de/owncloud.domhans.de/3rdparty/sabre/event/lib/EventEmitterTrait.php”,“line”:105,“function”:“call_user_func_array”,“args”:[[{“autoRequireLogin”:true,“class”:“Sabre\DAV\Auth\Plugin”},“beforeMethod”],[{“absoluteUrl”:“https://owncloud.domhans.de/remote.php/dav/”,“class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]]},{“file”:“/var/www/vhosts/domhans.de/owncloud.domhans.de/3rdparty/sabre/dav/lib/DAV/Server.php”,“line”:466,“function”:“emit”,“class”:“Sabre\Event\EventEmitter”,“type”:“->”,“args”:[“beforeMethod”,[{“absoluteUrl”:“https://owncloud.domhans.de/remote.php/dav/”,“class”:“Sabre\HTTP\Request”},{“class”:“Sabre\HTTP\Response”}]]},{“file”:“/var/www/vhosts/domhans.de/owncloud.domhans.de/3rdparty/sabre/dav/lib/DAV/Server.php”,“line”:254,“function”:“invokeMethod”,“class”:“Sabre\DAV\Server”,“type”:“->”,“args”:[{“absoluteUrl”:“https://owncloud.domhans.de/remote.php/dav/”,“class”:"Sabrnextcloud.log

I still have no access to my nextcloud server. not by webaccess nor client , nothing. Is there anyone with an idea what I could try?
Is there any useful information i could provide?

Thanks
dom

Please exactly explain how you try to access Nextcloud. Please also provide a screenshot of the browser message being displayed. Are there still brute force messages being logged as mentioned at the beginning?

When I try to access my nextcloud installation via firefox I get the ususla login in screen. after trying to login with a valid username and password I get the following screen

then after a second try it turns to this

When I clear the oc_bruteforce_attempts table I got the first error again.

When I try to access via the nextcloud client I am redirected to this screen

I assume it is a redirection issue but all I tried was not successful.

I wonder why you use a domain named “owncloud.domhans.de” although you want to access Nextcloud? Have you tried to reset the password of the user “domhans” using the occ tool?

the domain is kinda historical since I started with owncloud long before the fork nextcloud existed… no reason to change domain so far.

yes, I reseted the password. I also created a new user and tested sha hash passwords. I did also change the admin password …

I am almost sure either apache2 settings or php settings are wrong somewhere, I am running plesk with multiple websites on my server, but I had a similar setting running on my old server without problems.
unfortunately I did not backup all php and apache2 config files to check for possible errors. And I pretty much tried every possible solution that seemed appropriate to me I found on the web. Feeling a bit desperate.

But thanks for trying to help! Highly appreciated!