Server: Nextcloud 16.0.1 Login Loop

Created on 26 May 2019  路  4Comments  路  Source: nextcloud/server

Steps to reproduce

  1. Downloaded Next Cloud Server Package, 16.0.1
  2. Installed with nginx, php-fpm 7.3
  3. Able to see initial setup page
  4. Configure admin password and set to use mariadb
  5. Greeted by login page
  6. Attempt to Login, get redirected to .com/login?redirect_url=/apps/files/ and get another login page

Expected behaviour

To login as the admin account that was just created, and be greeted by the main dashboard

Actual behaviour

redirects to .com/login?redirect_url=/apps/files/. nextcloud.log shows no activity during login process even when set to info. Debug shows some information.

Server configuration

Operating system:
CentOS Linux release 7.6.1810 (Core)

Web server:
nginx version: nginx/1.12.2

Database:
mysql Ver 15.1 Distrib 5.5.60-MariaDB, for Linux (x86_64) using readline 5.1

PHP version:
PHP 7.3.5

Nextcloud version: (see Nextcloud admin page)
Cannot see the admin page but i downloaded 16.0.1

Updated from an older Nextcloud/ownCloud or fresh install:
Fresh Install

Where did you install Nextcloud from:
https://nextcloud.com/install/#instructions-server

Signing status:
Cannot Log in

List of activated apps:
Enabled:

  • accessibility: 1.2.0
  • activity: 2.9.1
  • bruteforcesettings: 1.3.0
  • cloud_federation_api: 0.2.0
  • comments: 1.6.0
  • dav: 1.9.2
  • federatedfilesharing: 1.6.0
  • federation: 1.6.0
  • files: 1.11.0
  • files_pdfviewer: 1.5.0
  • files_rightclick: 0.13.0
  • files_sharing: 1.8.0
  • files_texteditor: 2.8.0
  • files_trashbin: 1.6.0
  • files_versions: 1.9.0
  • files_videoplayer: 1.5.0
  • firstrunwizard: 2.5.0
  • gallery: 18.3.0
  • logreader: 2.1.0
  • lookup_server_connector: 1.4.0
  • nextcloud_announcements: 1.5.0
  • notifications: 2.4.1
  • oauth2: 1.4.2
  • password_policy: 1.6.0
  • privacy: 1.0.0
  • provisioning_api: 1.6.0
  • recommendations: 0.4.0
  • serverinfo: 1.6.0
  • sharebymail: 1.6.0
  • support: 1.0.0
  • survey_client: 1.4.0
  • systemtags: 1.6.0
  • theming: 1.7.0
  • twofactor_backupcodes: 1.5.0
  • updatenotification: 1.6.0
  • viewer: 1.0.0
  • workflowengine: 1.6.0
    Disabled:
  • admin_audit
  • encryption
  • files_external
  • user_ldap

Nextcloud configuration:
{
"system": {
"instanceid": "REMOVED SENSITIVE VALUE",
"passwordsalt": "REMOVED SENSITIVE VALUE",
"secret": "REMOVED SENSITIVE VALUE",
"trusted_domains": [
"cloud.domain1.com"
],
"datadirectory": "REMOVED SENSITIVE VALUE",
"dbtype": "mysql",
"version": "16.0.1.1",
"overwrite.cli.url": "https:\/\/cloud.domain1.com",
"dbname": "REMOVED SENSITIVE VALUE",
"dbhost": "REMOVED SENSITIVE VALUE",
"dbport": "",
"dbtableprefix": "oc_",
"dbuser": "REMOVED SENSITIVE VALUE",
"dbpassword": "REMOVED SENSITIVE VALUE",
"installed": true,
"tempdirectory": "\/var\/www\/nextcloud\/data\/tmp"
}
}

Are you using external storage, if yes which one: local/smb/sftp/...
It is mounted drive, so local

Are you using encryption: yes/no
have not set it up, i assume no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No

Client configuration

Browser:
Firefox 67.0 && Chromium Version 74.0.3729.157

Operating system:
Arch Linux

Logs

Web server error log

Empty

Nextcloud log (data/nextcloud.log)

loglevel = Debug or 0
did ```tail -fn0 /var/www/nextcloud/data/nextcloud.log```` and attempted to login

{"reqId":"I9zLlyRDSFIdm8FJHQKq","level":0,"time":"2019-05-26T07:58:55+00:00","remoteAddr":"37.120.130.4","user":"--","app":"cron","method":"GET","url":"\/cron.php","message":"Run OCA\Survey_Client\BackgroundJobs\AdminNotification job with ID 12","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko\/20100101 Firefox\/66.0","version":"16.0.1.1"}
{"reqId":"I9zLlyRDSFIdm8FJHQKq","level":0,"time":"2019-05-26T07:58:55+00:00","remoteAddr":"37.120.130.4","user":"--","app":"cron","method":"GET","url":"\/cron.php","message":"Finished OCA\Survey_Client\BackgroundJobs\AdminNotification job with ID 12 in 0 seconds","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko\/20100101 Firefox\/66.0","version":"16.0.1.1"}
{"reqId":"ApAe0efuNkxBVnUeZLfh","level":0,"time":"2019-05-26T07:59:28+00:00","remoteAddr":"37.120.130.4","user":"--","app":"core","method":"GET","url":"\/apps\/files\/","message":{"Exception":"OC\AppFramework\Middleware\Security\Exceptions\NotLoggedInException","Message":"Current user is not logged in","Code":401,"Trace":[{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Middleware\/MiddlewareDispatcher.php","line":95,"function":"beforeController","class":"OC\AppFramework\Middleware\Security\SecurityMiddleware","type":"->","args":[{"__class__":"OCA\Files\Controller\ViewController"},"index"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Http\/Dispatcher.php","line":97,"function":"beforeController","class":"OC\AppFramework\Middleware\MiddlewareDispatcher","type":"->","args":[{"__class__":"OCA\Files\Controller\ViewController"},"index"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/App.php","line":126,"function":"dispatch","class":"OC\AppFramework\Http\Dispatcher","type":"->","args":[{"__class__":"OCA\Files\Controller\ViewController"},"index"]},{"file":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Routing\/RouteActionHandler.php","line":47,"function":"main","class":"OC\AppFramework\App","type":"::","args":["ViewController","index",{"__class__":"OC\AppFramework\DependencyInjection\DIContainer"},{"_route":"files.view.index"}]},{"function":"__invoke","class":"OC\AppFramework\Routing\RouteActionHandler","type":"->","args":[{"_route":"files.view.index"}]},{"file":"\/var\/www\/nextcloud\/lib\/private\/Route\/Router.php","line":297,"function":"call_user_func","args":[{"__class__":"OC\AppFramework\Routing\RouteActionHandler"},{"_route":"files.view.index"}]},{"file":"\/var\/www\/nextcloud\/lib\/base.php","line":975,"function":"match","class":"OC\Route\Router","type":"->","args":["\/apps\/files\/"]},{"file":"\/var\/www\/nextcloud\/index.php","line":42,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"\/var\/www\/nextcloud\/lib\/private\/AppFramework\/Middleware\/Security\/SecurityMiddleware.php","Line":143,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko\/20100101 Firefox\/66.0","version":"16.0.1.1"}
{"reqId":"lvwyXCJThP2mxqlOu55v","level":0,"time":"2019-05-26T07:59:29+00:00","remoteAddr":"37.120.130.4","user":"--","app":"cron","method":"GET","url":"\/cron.php","message":"Run OCA\Files\BackgroundJob\ScanFiles job with ID 13","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko\/20100101 Firefox\/66.0","version":"16.0.1.1"}
{"reqId":"lvwyXCJThP2mxqlOu55v","level":0,"time":"2019-05-26T07:59:29+00:00","remoteAddr":"37.120.130.4","user":"--","app":"cron","method":"GET","url":"\/cron.php","message":"Finished OCA\Files\BackgroundJob\ScanFiles job with ID 13 in 0 seconds","userAgent":"Mozilla\/5.0 (Windows NT 10.0; Win64; x64; rv:66.0) Gecko\/20100101 Firefox\/66.0","version":"16.0.1.1"}

Browser log

JQMIGRATE: Migrate is installed, version 1.4.1 main.js:278:531
Source map error: SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data
Resource URL: https://cloud.harmonygardencafe.com/core/js/dist/main.js?v=90f2442c-0
Source Map URL: main.js.map

Thank you for your help

0. Needs triage bug

All 4 comments

As this seems to be a setup issue I would like to ask you to raise your question in the forums: https://help.nextcloud.com

Usually you see a behavior like this if the session directory is not writable by php.

There's also #13431 :(

I use Redis for PHP session. I have the same problem, but I suspect that this is a compatibility issue between PHP 7.3.6 and Redis(5.0.5).
In the case of PHP 7.3, throw an error in the following PHP session_start() line. If this is PHP7.1 or 7.2, no error occurs and login does not loop. *It might have happened, but it worked with PHP7.3.3 and PHP7.3.5 without problems.
Of course, this problem doesn't occur if I don't use Redis for PHP session.

<?php
session_start();
echo "save_handler=" . ini_get("session.save_handler") . "\n";
echo "save_path=" . ini_get("session.save_path") . "\n";
echo "session_id=" . session_id() . "\n";
$_SESSION['libname'] = "PhpRedis";
?>

@Bables55 If you think this bug is related to nextcloud please open a new issue.

Was this page helpful?
0 / 5 - 0 ratings