Nextcloud version: 23.0.3.2
Operating system and version: Ubuntu 21.10 (GNU/Linux 5.13.0-37-generic x86_64)
Apache or nginx version: 2.4.48
PHP version: 8.0.8
Is this the first time you’ve seen this error? Yes
Summary
After a fresh install, the login page just loops (reloads the same page), so I can’t login.
If I could just get some help to make the logs show something (anything) useful, I’d be stoked.
Steps to Replicate
- Visit any nextcloud web page (except version.php, status.php and robots.txt)
- It redirects to the /login page
- Enter the username & password of either an admin or a non-admin user
- Click “Login” button
- The page refreshes and you’re back at the same /login page
Background
The installation is freshly re-installed after an initial install that worked fine for a while until I botched it up for some reason, so I reinstalled it by deleting and recreating the MariaDB database and emptying the /var/www/nextcloud folder and reinstalling. So I’m pretty sure it’s a clean install. I have not been able to successfully login yet.
What I’ve tried:
- Creating a non-admin user via
occ
and logging in with that - Flushing browser cache
- Private browsing mode
- Using a different browser (Firefox & Chrome)
- Login with a device
- Restarting Apache & MariaDB
sudo chown -R www-data:www-data /var/www
occ check
occ maintenance:repair
occ maintenance:update:htaccess
occ maintenance:mimetype:update-js
occ maintenance:mimetype:update-db
occ maintenance:theme:update
occ update:check
- Disabling as many apps as possible via
occ app:disable
- Searching the net for anything interesting in the logs
Troubleshooting Info
- The weirdest bit is that although I’ve turned all (NextCloud, Apache and PHP) logging up the the max and the logs are still way too quiet. Although I can write to php_errors.log via a throw command in a standalone PHP script, the php_errors.log file is suspiciously empty.
- I always call
occ
as the www-data user, as per the doco - Browser console reports that the following modules are deprecated, stating “please ship your own, this will be removed in Nextcloud 20”: global jQuery, global $, Backbone, Handlebars
- Browser console also reports:
No OC found
Proxying an event bus of version 2.1.1 with 1.3.0
- /version.php - times out
- /robots.txt - works
- /status.php - works, returning:
{"installed":true,"maintenance":false,"needsDbUpgrade":false,"version":"23.0.3.2","versionstring":"23.0.3","edition":"","productname":"Nextcloud","extendedSupport":false}
- The server is only accessible locally on my LAN for now (will harden later)
- I have a fairly strict Adblocker/VPN/firewall for the internet connection, but nothings blocked that I can see
- I installed a LetsEncrypt SSL using certbot
- I set up a cron job to call cron.php
- At one point I had a CSP error but this is now gone: “Content Security Policy: The page’s settings blocked the loading of a resource at …/favicon.ico” (default-src)
Nextcloud.log
…contains nothing but the result of cron job
{"reqId":"xxx","level":0,"time":"2022-03-29T21:30:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Run OCA\\Files\\BackgroundJob\\CleanupFileLocks job with ID 28","userAgent":"--","version":"23.0.3.2"}
{"reqId":"xxx","level":0,"time":"2022-03-29T21:30:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Finished OCA\\Files\\BackgroundJob\\CleanupFileLocks job with ID 28 in 0 seconds","userAgent":"--","version":"23.0.3.2"}
{"reqId":"xxx","level":0,"time":"2022-03-29T21:30:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Run OC\\Authentication\\Token\\DefaultTokenCleanupJob job with ID 30","userAgent":"--","version":"23.0.3.2"}
{"reqId":"xxx","level":0,"time":"2022-03-29T21:30:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Invalidating session tokens older than 2022-03-28T21:30:02+00:00","userAgent":"--","version":"23.0.3.2"}
{"reqId":"xxx","level":0,"time":"2022-03-29T21:30:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Invalidating remembered session tokens older than 2022-03-14T21:30:02+00:00","userAgent":"--","version":"23.0.3.2"}
{"reqId":"xxx","level":0,"time":"2022-03-29T21:30:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Invalidating session tokens older than 2022-03-28T21:30:02+00:00","userAgent":"--","version":"23.0.3.2"}
{"reqId":"xxx","level":0,"time":"2022-03-29T21:30:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Invalidating remembered session tokens older than 2022-03-14T21:30:02+00:00","userAgent":"--","version":"23.0.3.2"}
{"reqId":"xxx","level":0,"time":"2022-03-29T21:30:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Finished OC\\Authentication\\Token\\DefaultTokenCleanupJob job with ID 30 in 0 seconds","userAgent":"--","version":"23.0.3.2"}
{"reqId":"xxx","level":0,"time":"2022-03-29T21:30:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Run OC\\Log\\Rotate job with ID 31","userAgent":"--","version":"23.0.3.2"}
{"reqId":"xxx","level":0,"time":"2022-03-29T21:30:02+00:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"Finished OC\\Log\\Rotate job with ID 31 in 0 seconds","userAgent":"--","version":"23.0.3.2"}
/var/www/nextcloud/config/config.php
<?php
$CONFIG = array (
'instanceid' => 'xxx',
'overwrite.cli.url' => 'https://xxx.yy/',
'htaccess.RewriteBase' => '/',
'trusted_domains' =>
array (
0 => 'xxx.yy'
),
'datadirectory' => '/var/www/nextcloud/data',
'dbtype' => 'mysql',
'version' => '23.0.3.2',
'dbname' => 'xxx',
'dbhost' => 'xxx',
'dbport' => '',
'mysql.utf8mb4' => true,
'dbuser' => 'xxx',
'dbpassword' => 'xxx',
'maintenance' => false,
'log_type' => 'file',
'logfile' => '/var/www/nextcloud/nextcloud.log',
'loglevel' => 0,
'passwordsalt' => 'xxx',
'secret' => 'xxx',
'dbtableprefix' => 'xxx',
'installed' => true,
'maintenance_window_start' => 3,
'debug' => true,
'data-fingerprint' => 'xxx',
);
/var/log/apache2/error.log
[Wed Mar 30 00:00:02.558457 2022] [mpm_prefork:notice] [pid 140033] AH00163: Apache/2.4.48 (Ubuntu) OpenSSL/1.1.1l configured -- resuming normal operations
[Wed Mar 30 00:00:02.558515 2022] [core:notice] [pid 140033] AH00094: Command line: '/usr/sbin/apache2'
[Wed Mar 30 05:54:25.357784 2022] [mpm_prefork:notice] [pid 140033] AH00170: caught SIGWINCH, shutting down gracefully
[Wed Mar 30 05:54:25.640895 2022] [mpm_prefork:notice] [pid 143024] AH00163: Apache/2.4.48 (Ubuntu) OpenSSL/1.1.1l configured -- resuming normal operations
[Wed Mar 30 05:54:25.641018 2022] [core:notice] [pid 143024] AH00094: Command line: '/usr/sbin/apache2'
Config for the only enabled Apache site
<VirtualHost *:443>
DocumentRoot /var/www/nextcloud/
ServerName xxx.yy
<Directory /var/www/nextcloud/>
Require all granted
AllowOverride All
Options FollowSymLinks MultiViews
<IfModule mod_dav.c>
Dav off
</IfModule>
</Directory>
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/xxx.yy/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/xxx.yy/privkey.pem
</VirtualHost>