Iām really wondering if it might have something to do with the installation changing the newly created admin user somewhere. Just a thought, because the issue has to do with logging in. Honestly, the installation instructions are not the clearest to follow if you ask me, I think some more of the installation could be better automated.
OK, my domain doc root is here -
/var/www/mydomain
Iām unzipping/installing nextcloud here -
/var/www/nextcloud
But Iāve also installed nextcloud directly under the doc root but still have the same problem, so that I also do not understand -
/var/www/mydomain/nextcloud
Regardless of one or the other I always prior to accessing per web browser, I change the ownership on the nextcloud directory structure to www-data:www-data. Permissions I do not bother changing, because as far as I know they are set right especially with the ownership set to www-data:www-data.
Oh, and I have of course the Apache Alias set according the /var/www/nextcloud directory.
i meant: apparently you are installing it anew over and over again to an existing system. or did i get you wrong again?
and so i wanted to get to know where and how itās hostedā¦
Please post the complete vhost config.
Yes, it is on the same existing system, every time, but like Iām saying, Iām cleaning everything up before each attempt (as far as I can tell anyway). The system is Ubuntu 16.04 LTS
Let me answer Thomas_Stein and maybe/hopefully you can find something there.
OK
in /etc/apache2/sites-enabled/010-mydomain.conf
I have -
<VirtualHost 192.168.1.102:80>
ServerName mydomain.com
ServerAlias www.mydomain.com
ServerAdmin webmaster@mydomain.com
DocumentRoot /var/www/mydomain
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
Include conf-available/nextcloud.conf
</VirtualHost>
In my conf-available/nextcloud.conf
I have -
Alias "/mycloud" "/var/www/nextcloud/"
<Directory "/var/www/nextcloud/">
Options +FollowSymlinks
AllowOverride All
<IfModule mod_dav.c>
Dav off
</IfModule>
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
</Directory>
<Directory "/var/www/nextcloud/data/">
Options +FollowSymlinks
Require all granted
</Directory>
My nextcloud.conf
file as above is the current config, but I have also tried a couple of other changes, of course without success.
Iāve noticed not all of the Apache directive statements show up in these posts, especially not the closing.
OK, now the same thing is happening that happened last night. I seemed to have logged in, but there is a message that says - Problem loading page, reloading ā¦
and then a large white dialog screen shows up and says - This content failed to load. - disappears, comes back, disappears ā¦
I guess something is wrong with your apache config. Canāt you just use the plain config suggested by the nextcloud guys? For testing purposes?
Is there supposed to be an āappsā directory here? I added it myself because of an āerrorā message -
/var/www/nextcloud/settings# ll
total 108
drwxrwx--- 15 www-data www-data 4096 Sep 27 14:12 ./
drwxrwx--- 15 www-data www-data 4096 Sep 27 12:23 ../
drwxrwx--- 2 www-data www-data 4096 Sep 19 21:12 Activity/
drwxrwx--- 2 www-data www-data 4096 Sep 19 21:12 ajax/
-rw-rw---- 1 www-data www-data 5318 Sep 19 21:12 Application.php
drwxrwx--- 2 www-data www-data 4096 Sep 27 14:12 apps/
drwxrwx--- 2 www-data www-data 4096 Sep 19 21:12 BackgroundJobs/
drwxrwx--- 2 www-data www-data 4096 Sep 19 21:12 Controller/
drwxrwx--- 2 www-data www-data 4096 Sep 19 21:12 css/
-rw-rw---- 1 www-data www-data 2049 Sep 19 21:12 help.php
-rw-rw---- 1 www-data www-data 7139 Sep 19 21:12 Hooks.php
drwxrwx--- 2 www-data www-data 4096 Sep 19 21:12 img/
drwxrwx--- 3 www-data www-data 4096 Sep 19 21:12 js/
drwxrwx--- 2 www-data www-data 4096 Sep 19 21:12 l10n/
drwxrwx--- 2 www-data www-data 4096 Sep 19 21:12 Mailer/
drwxrwx--- 2 www-data www-data 4096 Sep 19 21:12 Middleware/
-rw-rw---- 1 www-data www-data 11768 Sep 19 21:12 personal.php
-rw-rw---- 1 www-data www-data 6800 Sep 19 21:12 routes.php
drwxrwx--- 4 www-data www-data 4096 Sep 19 21:12 templates/
drwxrwx--- 3 www-data www-data 4096 Sep 19 21:12 tests/
-rw-rw---- 1 www-data www-data 5089 Sep 19 21:12 users.php
Should there be any other directories here in /var/www/nextcloud/settings/
??? Like maybe āpersonalā ???
Thatās exactly what I did, believe me.
When I try to update my (admin) personal data (like the email address) Iām asked to authenticate, but authentication fails. Password has to be correct because it canāt be much simpler.
Oh, and I get - āError while loading browser sessions and device tokensā - now when I try to refresh the browser.
Well at some point it gets rather ineffective trying to solve the problem via forum. It would be best if some experienced admin would login your machine and checked.
plus
thereās absolutely no reason being frustrated with nextcloud since it seems to be an inconsitency (somehow) with your own environment so far.
iām sure if youād run NC in a virtual machine on the same host (a real fresh install on a fesh system) you would succeed.
but since this doesnāt seem to be any option we tried our best to help you getting your problems solved. but wellsā¦ i canāt help you further, iām really sorry.
plus:
i just read this HELP : Nextcloud 11 loop login and wanted you to test this out. maybe it will help you as wellā¦
So when you start fresh, does that mean deleting NC and starting again, or wiping the server and reinstalling? Just curious.
Iāve seen some hiccups from users following my guide, but never a dumpster fire as big as what youāre facing at the moment!
i think i read it between the lines: NOT wiping server and reinstalling.
These questions need more than assumptions
JimmyKater - thanks for your efforts, but yes there is reason for frustration, and yes there is a consistency - the login keeps looping (a problem that others have had, also with previous versions of NC), and no, the permissions /var/lib/php/session are not the problem in my case. I monitored the directory and can see that PHP is writing itās session tokens there when I access the login screen.
Let me take a moment to re-explain my issue, from the beginning -
- I had NC version 10.0.x (?) installed on my Ubuntu 16.04.2 Server. The install went fairly well and worked.
- I wanted to upgrade that version, but that went faul, so I de-installed NC and dropped the NC database, including the db and user entries in the mysql database.
- No, I did not wipe out the entire server platform and re-install. I only de-installed NC as I just mentioned in #2.
- I tried a fresh install of NC, which essentially went well until I tried to login. Thatās when I first experienced the login loop.
- I started to āgoogleā the issue and found it was happening to others as well, and on other systems (eg CentOS), but at the same time I decided to install NC on my desktop machine, which never had NC installed on it before, and experienced the same login loop. My desktop machine is Ubuntu 16.04.2 as well, Desktop version of course. I use this machine as my web-app development platform as well. This is where Iāve been for over a week now.
Soā¦
- Iāve deleted the NC directory. Dropped the NC database and removed the NC related entries in the mysql db and user tables. Restarted the mysql server.
- Unzipped the NC 12.0.3.3 into the same location as my previous attempted install. Changed ownership to www-data:www-data on the entire NC directory structure.
- Made sure (again) that my PHP had what it needed, and configured my Apache 2.4.18 with an Alias pointing to the NC install path, which is just outside the VHost doc-root. This is fine because otherwise I would not be getting the initial NC (Wizard) screen. Iām leaving the NC data directory at itās default location.
- I enter new data in the Wizard form - new Admin user and PW, mysql db admin user and PW, new NC db name and ālocalhostā with port. The Wizard finishes without any apparent glitch.
- I get the login screen and enter the new Admin username and PW, and BAM, wouldnāt you know it, it simply returns me to the login prompt.
- Iāve cleared my browser cache a couple of times, no help. I thought, maybe itās a problem with the Chromium version I have installed so I tried Firefox, same problem.
Iām wondering if there was a software package upgrade that might be causing the problem, but thereās no real way for me to check that. My PHP is the current 7.0.22 from Ubuntu. I only install the available software packages from Ubuntu, on both server and desktop.
So, I really appreciate all of your efforts, and if you/we can ever find the cause, Iāll be really great-full. I really like Nextcloud, and need a cloud service/solution.
Thanks again, Robert
Iāve just seen the guide you used for installation. The permission settings are from the old documentation and not compatible with the updater app.
In general, do a backup of your system before you run an upgrade. In case it doesnāt work, you can revert to the previous version immediately and run further tests on other systems (or check on the bugtracker if this is a known problem).
If you change too many things at the same time, it is very hard to figure out what is wrong even for experienced users. There could be other updates or coincidences which might cause this problem. At some point it is probably easier to start with a fresh system, ideally you know all the steps and start from a known system (fresh ubuntu image, ā¦) so others can reproduce this problem. Virtual Machines can be very nice as you can take snapshots on the way. LXC, XEN, ā¦ (makes it also easier to move an existing installation to a different host).
Sorry to bump such an old thread but being that this is one of the top results when searching for this error, and that I ran into it on the latest version of Nextcloud at the time of writing (13.0.2.1), I thought it might be relevant to those who may be experiencing this in 2018.
My problem turned out to be local DNS.
I was accessing the machine by hostname in my browser which works without issue for a number of other services that I currrently host on my home network. This includes complex things like GitLab behind an NGINX reverse proxy to simple ICMP and SSH. It did not occur to me to try accessing directly by IP, but when I added the IP as a trusted domain and connected that way, everything began working as expected.
Some background on my setup in case others are in a similar situation.
I am running nextcloud from the latest docker image and migrated from an existing install on a different machine. I used more or less the default settings, except I configured an external MariaDB instance for the database. I use dnsmasq for local network hostname resolution.
My new machine has multiple NICs and my plan was to try to use dnsmasq for failover in case one of those was unavailable. I have not yet worked out a solution for this, but I just wanted to make people aware of another possible cause for this issue other than the PHP session directory permissions that most sites seem to suggest, which in my case wasnāt the issue. In fact, that directory didnāt even exist in the docker image I was using.
Just for the record, as part of my troubleshooting, I did create a new docker container with completely default settings minus setting a port so I could actually reach NC from outside the container and I was still getting issues. I think thatās about as default as you can get so I know itās not any custom configuration I may have done to nextcloud. The install wizard would finish and I could even log in, but I got the white screen with āThis content failed to loadā and āError while loading browser sessions and device tokensā when I navigated to the settings.
I know my setup isnāt exactly typical but maybe this will help someone else.