Nextcloud 13: VM Freezes when installing App

Hello There,

I’ve got some Problems with the Nextcloud Server that I dont really understand.

First of all: When installing as Snap, everything is fine. But there are several Reasons why, after a successful proof, we want Nextcloud being installed directly in a Linux VM.

Everytime I install Nextcloud and install any App that was not installed beforde (not deactivated), the complete VM Crashes without logging anything.

I tried different Versions of Apache, PHP, Mysql/MariadB, Debian/Ubuntu.

For one Time, I could install an app after doing occ maintenance:repair.
But for the second App I wanted to install, the Problem came back and remained for every App.

Nextcloud version actual: 13.0.2 before with same problem: 13.0.1, 13.0.0, 12.0.7
Operating system and version actual: Ubuntu 18.04, before: Ubuntu 16.04, Ubuntu 17.10, Debian 8, Debian 9
Apache or nginx version actual: Apache 2.4.29
PHP version actual: 7.2.3, before: 7.1, 7.0

Is this the first time you’ve seen this error? Y:

Steps to replicate it:

  1. Login with Admin Group User
  2. Try to activate an App that was not installed before
  3. VM completely freezes

The output of your Nextcloud log in Admin > Logging:

Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) a few seconds ago
Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) 3 minutes ago
Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) 3 minutes ago
Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) 5 minutes ago
Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) 5 minutes ago
Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) 5 minutes ago
Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) 5 minutes ago
Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) 5 minutes ago
Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) 5 minutes ago
Error index Exception: The requested uri(/core/doc/user/_static/) cannot be processed by the script ‘/nextcloud/index.php’) 5 minutes ago
Error index Exception: The requested uri(/.well-known/posh/xmpp-client.json) cannot be processed by the script ‘/nextcloud/index.php’) 18 hours ago
Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) 18 hours ago
Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) 18 hours ago
Error index Exception: The requested uri(/.well-known/posh/xmpp-client.json) cannot be processed by the script ‘/nextcloud/index.php’) 18 hours ago
Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) 19 hours ago
Warning core Login failed: ‘123’ (Remote IP: ‘xxx’) 19 hours ago
Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) 19 hours ago
Error index Exception: The requested uri(/data/.ocdata) cannot be processed by the script ‘/nextcloud/index.php’) 19 hours ago
Warning core Login failed: ‘123’ (Remote IP: ‘xxx.xxx’) 19 hours ago
Warning core Login failed: ‘123’ (Remote IP: ‘xxx’)

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

<?php
$CONFIG = array (
  'instanceid' => 'oc8yv8bz0wgn',
  'passwordsalt' => 'x',
  'secret' => '+x',
  'trusted_domains' => 
  array (
    0 => 'x',
    1 => 'x,
  ),
  'datadirectory' => '/var/www/nextcloud/data',
  'overwrite.cli.url' => 'https://192.168.x.x/nextcloud/',
  'dbtype' => 'mysql',
  'version' => '13.0.2.1',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'dbuser',
  'dbpassword' => 'dbpassword',
  'installed' => true,
  'maintenance' => false,
);

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

Fri May 11 15:58:18.777531 2018] [ssl:warn] [pid 1310] AH01909: 127.0.1.1:443:0 server certificate does NOT include an ID which matches the server name
[Fri May 11 15:58:18.777891 2018] [mpm_prefork:notice] [pid 1310] AH00163: Apache/2.4.29 (Ubuntu) OpenSSL/1.1.0g configured -- resuming normal operations
[Fri May 11 15:58:18.777897 2018] [core:notice] [pid 1310] AH00094: Command line: '/usr/sbin/apache2'
[Fri May 11 15:58:45.750898 2018] [autoindex:error] [pid 2463] [client 192.168.x:56162] AH01276: Cannot serve directory /var/www/nextcloud/core/doc/user/_static/: No matching DirectoryIndex (index$
[Fri May 11 15:58:55.868046 2018] [authz_core:error] [pid 2493] [client 192.168.2.134:56276] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri May 11 15:59:01.584210 2018] [authz_core:error] [pid 2462] [client 192.168.2.134:56326] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri May 11 15:59:06.245144 2018] [authz_core:error] [pid 2548] [client 192.168.2.134:56304] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri May 11 15:59:13.973628 2018] [authz_core:error] [pid 2463] [client 192.168.2.134:56528] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri May 11 15:59:25.415326 2018] [authz_core:error] [pid 2548] [client 192.168.2.134:56652] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri May 11 15:59:28.925319 2018] [authz_core:error] [pid 2463] [client 192.168.2.134:56658] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri May 11 16:01:03.644164 2018] [authz_core:error] [pid 2548] [client 192.168.2.134:57820] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri May 11 16:01:07.314798 2018] [authz_core:error] [pid 2461] [client 192.168.2.134:57854] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata
[Fri May 11 16:03:53.632773 2018] [authz_core:error] [pid 2460] [client 192.168.2.134:34622] AH01630: client denied by server configuration: /var/www/nextcloud/data/.ocdata

Nobody has any Idea? Could really need help

Could have something to do with ownership of /var/www/nextcloud/ Should be nextcloud. My best guess, not the expert in this. Haven’t seen it before, but I’m using nginx.

The owner ist www-data. Is it wrong? I will have a Look at the working SNAP Installation and its ownerships

I Set all folders to chmod 777. Still Same Problem

My apologies, did it on top of my head. It should be www-data indeed.
The only other thing I could spot is the Apache error regarding the certificate. Is it a self-signed certificate perhaps? Perhaps you can try the let’s encrypt one? And include the servername?

Anyone else, feel free to chime in. My experience is still limited.

I’ve used the Nextcloud 13 installation documentation here: https://www.c-rieger.de/nextcloud-installation-guide-advanced/

The Apache Error occurs because i Accessed directly via the internal IP.

I have a running letsencrpyt where everyrhing is Green in Firefox and even tried without SSL.

I Used the Same documentation.

I forgot to say… I even tried another esxi Host.

A quick Google resulted in a thread with some solution regarding the error in the Apache log:

Perhaps you can try those solutions.

Thanks a Lot. That seems to be the only article about any nextcloud issue i didnt read before :slight_smile:

The good Side, I will Be a nextcloud Professional soon.

THANK YOU MAN !!!

That was the Problem. I messed up with my permissions, but now, everything works finde.

But very strange. How can the whole Virtual Machine just freeze without logging anything, just because of a wrong directory? The moment I clicked “install app”, CPU, harddisk all went to zero and the vm freezed. Strange.

You are welcome.

It is hard and very expensive to build an application ‘Fool’ proof. Too many environmental variables. The VM freezing likely happened because of the application looping in some way and the VM running out of resources. This can be memory, CPU or something else. Most likely there will be something in your -syslog- either around the moment of the ‘freeze’ or when you restarted.

1 Like

I also checked. The syslog does not contain anything. Nothing responds any more the second i click on “Install app”. Crazy.

Hi Sotan, i have the same problem too. What for permission on wich folder are messed up?

Hi @Sotan and @Tom112, I too am experiencing this issue on one of my two servers, any idea what is wrong and needs to be fixed?

Hi again. I found out that if I disable the REDIS-cache in config.php and then install one app I can now run app installations again even with the REDIS-cache enabled. Maybe that helps?

It’s not a good idea to disable Redis Cache as it handles all the caching for the VM, including file locks and such.

Regarding the original issue, I never saw that error before., and I can’t reproduce it on the latest version as well with the steps to reproduce provided in the original post. To be certain that all permissions are set correctly make sure to run the built in update script: sudo bash /var/scripts/update.sh

Ok, well that was just for testing purposes while we get our servers working in a correct fashion.

I tried to run the script you suggested but that was not present in our machine, can I download it somewhere?

Also, maybe a description of our issue helps:
We have two VM:s running on ESXi mounted through NFS. (iSCSI previously, no difference wrt this issue).
These two VM:s are then setup using Ubuntu 18.04LTS Server and a basic install of Nextcloud v14.0.0 according to the installation procedures in the manual.
Sometimes (most of the time) when we try to download apps in nextcloud (through web gui or cli, both fail) the machine completely hangs (100% CPU, not responsive at all, we have to reboot the VM). This also applies to upgrades, one is now on 14.0.3 and the other is stuck at 14.0.0, both behave the same though.
Since this is a complete hang I cannot get any log output or similar, but I suspect it might be related to slow responses (or not response at all?) from the update server or something similar, but how that can completely hang the machine is still not known to me.

Apparently we are not alone with this issue, do you have anything else we can try?

@Lofwyr Since you are not using the Nextcloud VM you don’t have that script. It’s only for the VM users.

And regarding setting up your server correctly, just run these scripts, sit back and relax, and voila - your server is correctly setup. :slight_smile:

You can also choose to install any of the VMs that we have in store: https://www.hanssonit.se/nextcloud-vm/

Thanks for trying to help out, It turns out our problem was not related to the scripts at all, rather we were running a “too new” ubuntu server on a too old ESXi host which caused the a crash in the network driver for some rare cases, like sending data over the network… :wink:
Solved by choosing an older version of vm-hardware in the settings (VM Version 11).

More info here for others finding this issue and hopefully being helped through it:
https://bugzilla.kernel.org/show_bug.cgi?id=191201