[Support] Linuxserver.io - Nextcloud


Recommended Posts

My Nextcloud (24.0.4.1) container has been running fine for a while, but just recently it's been unable to sync new PC files to the server. This happened when I copied a couple of small files (2MB-4MB) to a synced folder on my Win 10 PC. The new files are not being synced (I get the small red x icon in the lower left of the file icon). In the error logs, I get continuous messages like this:

 

2022/08/19 15:01:05 [error] 183#183: *825 FastCGI sent in stderr: "PHP message: PHP Notice:  fwrite(): write of 1798 bytes failed with errno=28 No space left on device in /config/www/nextcloud/lib/private/Log/File.php on line 89" while reading response header from upstream, client: 172.18.0.3, server: _, request: "GET /index.php/css/user_status/62ab-0e7b-user-status-menu.css?v=41545bc493ea402b7a9b19b640ab406b-6b0fbc6d-2 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "the hostname I use"

 

The line 89 mentioned above reads:

fwrite($handle, $entry."\n");

 

Here's that line 89 in context in this extract from File.php (8th line down):

	public function write(string $app, $message, int $level) {
		$entry = $this->logDetailsAsJSON($app, $message, $level);
		$handle = @fopen($this->logFile, 'a');
		if ($this->logFileMode > 0 && is_file($this->logFile) && (fileperms($this->logFile) & 0777) != $this->logFileMode) {
			@chmod($this->logFile, $this->logFileMode);
		}
		if ($handle) {
			fwrite($handle, $entry."\n");
			fclose($handle);
		} else {
			// Fall back to error_log
			error_log($entry);
		}
		if (php_sapi_name() === 'cli-server') {
			if (!\is_string($message)) {
				$message = json_encode($message);
			}
			error_log($message, 4);
		}
	}

 

I have no experience in this, so please bear with me. From the error message it seems that something has run out of space, but I have no idea where. My Unraid dashboard Memory section tells me that only 65% of the docker image is used and Log is showing only 1%. My array has plenty of free space, cache disk (where the container appdata sits) has 50GB free space.

 

Googling hasn't produced anything that seems to help/work. I really don't think I changed anything - other than updating containers and plugins on my Unraid machine. Any advice or suggestions would be greatly appreciated.

 

 

 

Link to comment
15 hours ago, sonofdbn said:

My Nextcloud (24.0.4.1) container has been running fine for a while, but just recently it's been unable to sync new PC files to the server. This happened when I copied a couple of small files (2MB-4MB) to a synced folder on my Win 10 PC. The new files are not being synced (I get the small red x icon in the lower left of the file icon). In the error logs, I get continuous messages like this:

 

2022/08/19 15:01:05 [error] 183#183: *825 FastCGI sent in stderr: "PHP message: PHP Notice:  fwrite(): write of 1798 bytes failed with errno=28 No space left on device in /config/www/nextcloud/lib/private/Log/File.php on line 89" while reading response header from upstream, client: 172.18.0.3, server: _, request: "GET /index.php/css/user_status/62ab-0e7b-user-status-menu.css?v=41545bc493ea402b7a9b19b640ab406b-6b0fbc6d-2 HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "the hostname I use"

 

The line 89 mentioned above reads:

fwrite($handle, $entry."\n");

 

Here's that line 89 in context in this extract from File.php (8th line down):

	public function write(string $app, $message, int $level) {
		$entry = $this->logDetailsAsJSON($app, $message, $level);
		$handle = @fopen($this->logFile, 'a');
		if ($this->logFileMode > 0 && is_file($this->logFile) && (fileperms($this->logFile) & 0777) != $this->logFileMode) {
			@chmod($this->logFile, $this->logFileMode);
		}
		if ($handle) {
			fwrite($handle, $entry."\n");
			fclose($handle);
		} else {
			// Fall back to error_log
			error_log($entry);
		}
		if (php_sapi_name() === 'cli-server') {
			if (!\is_string($message)) {
				$message = json_encode($message);
			}
			error_log($message, 4);
		}
	}

 

Pull up the container's console and check the available storage from the container's side - just 'df -h' will show you something like:

Filesystem         Size  Used Avail Use% Mounted on
overlay             80G   30G   51G  37% /
tmpfs               64M     0   64M   0% /dev
tmpfs               24G     0   24G   0% /sys/fs/cgroup
shm                 64M     0   64M   0% /dev/shm
shfs                91T   61T   30T  68% /data

 

If nothing there's showing near full, do the same from your unraid terminal. Depending on what's full, it may be as simple as a restart of the container, up to possibly remounting a tmpfs volume with a larger capacity specified - whatever the case, finding out what's full should give you the breadcrumb trail needed to research and correct it.

 

If nothing is legitimately showing 'full', I'd increase the nextcloud logging level and reattempt.

Edit - assuming you've verified you've got all your array disks set to available to the share mounted to the /data dir of course, though I'm sure you've covered that lol. Doesn't matter how much free space you have in the array if the nextcloud containers share isn't allowed to use em all hehehe

Edited by BVD
Link to comment
On 8/20/2022 at 3:35 AM, patm95 said:

Tried updating Nextcloud. I am stuck at level 6 and not proceeding. 

 

Log is as follows:

 

cont-init: info: running /etc/cont-init.d/99-custom-files
cont-init: info: /etc/cont-init.d/99-custom-files exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mods-package-install: starting
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun cron (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun php-fpm (no readiness notification)
s6-rc: info: service legacy-services successfully started
s6-rc: info: service 99-ci-service-check: starting
s6-rc: info: service 99-ci-service-check successfully started
[custom-init] no custom files found exiting...
[ls.io-init] done.
Could not open input file: /config/www/nextcloud/cron.php
Could not open input file: /config/www/nextcloud/cron.php

 

Any ideas on how to proceed?


Thank you.

 

 

Have you checked permissions for the files it's specifying issues accessing? Confirmed that the container is running as that expected user account?

Link to comment
On 8/18/2022 at 2:36 PM, Snipe3000 said:

I'm running into this exact issue, but restarting it has not yet fixed it.

 

This sounds like a DB or data consistency issue, especially given it happened after (I assume you had to do a hard reset) reboot. Have you tried restoring a backup and starting the container pointing to that backup (restoring both the DB and the nextcloud appdata being a requirement here as both are dependencies), and if so, does it fail at the same point? If it does, I'd start looking into methods to verify the integrity of your database, as well as the troubleshooting documentation from nextcloud re: their appdata dir and DB indices.

Link to comment
19 hours ago, BVD said:

 

Pull up the container's console and check the available storage from the container's side - just 'df -h' will show you something like:

Filesystem         Size  Used Avail Use% Mounted on
overlay             80G   30G   51G  37% /
tmpfs               64M     0   64M   0% /dev
tmpfs               24G     0   24G   0% /sys/fs/cgroup
shm                 64M     0   64M   0% /dev/shm
shfs                91T   61T   30T  68% /data

 

If nothing there's showing near full, do the same from your unraid terminal. Depending on what's full, it may be as simple as a restart of the container, up to possibly remounting a tmpfs volume with a larger capacity specified - whatever the case, finding out what's full should give you the breadcrumb trail needed to research and correct it.

 

If nothing is legitimately showing 'full', I'd increase the nextcloud logging level and reattempt.

Edit - assuming you've verified you've got all your array disks set to available to the share mounted to the /data dir of course, though I'm sure you've covered that lol. Doesn't matter how much free space you have in the array if the nextcloud containers share isn't allowed to use em all hehehe

 

Thanks for the suggestions. I checked, but everything looks OK. (Sure, some storage said 100% use, but it was a rounding issue - when you have an 8TB disk you can still have 34GB free even though usage is 100% allowing for overhead).

 

But I was encouraged to check further, and wonder if it's not a permissions problem. Using WinSCP (I'm not a Linux person) I was that the owner of the folders in my Nextcloud data was "nobody" - seems quite common and expected, so no issues there. But the rights of the folders vary: either A) rwxr-xrwx (0757) or B) rwxr-x--- (0750). These are the folders on Unraid that are synced with folders on my Windows PC. Don't know why they would be different, and, if one is "better" than another. Or are these different permissions expected?

 

I seem to have inconsistent results when I test the syncing. I thought at first that new files were not syncing to 0750 folders, but were syncing to 0757 folders, but this seems not to be the case. But it's getting late here; I'll test a bit more tomorrow.

Link to comment

I have just ran a CLI upgrade (sudo -u abc php updater.phar) and now cannot access the nextcloud Web UI. 

 

Any suggestions?

 

Here is what I see on the Log: 

 

s6-rc: info: service legacy-services: stopping
s6-svwait: fatal: supervisor died
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service init-services: stopping
s6-rc: info: service 00-legacy: stopping
s6-rc: info: service init-services successfully stopped
s6-rc: info: service init-mods-end: stopping
s6-rc: info: service 00-legacy successfully stopped
s6-rc: info: service init-mods-end successfully stopped
s6-rc: info: service init-mods-package-install: stopping
s6-rc: info: service init-mods-package-install successfully stopped
s6-rc: info: service init-mods: stopping
s6-rc: info: service init-mods successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service 00-legacy: starting
s6-rc: info: service 00-legacy successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/01-envfile
cont-init: info: /etc/cont-init.d/01-envfile exited 0
cont-init: info: running /etc/cont-init.d/02-tamper-check
cont-init: info: /etc/cont-init.d/02-tamper-check exited 0
cont-init: info: running /etc/cont-init.d/10-adduser
cont-init: info: /etc/cont-init.d/10-adduser exited 0
cont-init: info: running /etc/cont-init.d/20-config
cont-init: info: /etc/cont-init.d/20-config exited 0
cont-init: info: running /etc/cont-init.d/30-keygen
cont-init: info: /etc/cont-init.d/30-keygen exited 0
cont-init: info: running /etc/cont-init.d/40-config
cont-init: info: /etc/cont-init.d/40-config exited 0
cont-init: info: running /etc/cont-init.d/50-install
cont-init: info: /etc/cont-init.d/50-install exited 0
cont-init: info: running /etc/cont-init.d/60-memcache
cont-init: info: /etc/cont-init.d/60-memcache exited 0
cont-init: info: running /etc/cont-init.d/70-aliases
cont-init: info: /etc/cont-init.d/70-aliases exited 0
cont-init: info: running /etc/cont-init.d/90-custom-folders
cont-init: info: /etc/cont-init.d/90-custom-folders exited 0
cont-init: info: running /etc/cont-init.d/99-custom-files
cont-init: info: /etc/cont-init.d/99-custom-files exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mods-package-install: starting
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun cron (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun php-fpm (no readiness notification)
s6-rc: info: service legacy-services successfully started
s6-rc: info: service 99-ci-service-check: starting
s6-rc: info: service 99-ci-service-check successfully started
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    99
User gid:    100
-------------------------------------

using keys found in /config/keys
[custom-init] no custom files found exiting...
[ls.io-init] done.

Link to comment
8 hours ago, sonofdbn said:

 

Thanks for the suggestions. I checked, but everything looks OK. (Sure, some storage said 100% use, but it was a rounding issue - when you have an 8TB disk you can still have 34GB free even though usage is 100% allowing for overhead).

 

But I was encouraged to check further, and wonder if it's not a permissions problem. Using WinSCP (I'm not a Linux person) I was that the owner of the folders in my Nextcloud data was "nobody" - seems quite common and expected, so no issues there. But the rights of the folders vary: either A) rwxr-xrwx (0757) or B) rwxr-x--- (0750). These are the folders on Unraid that are synced with folders on my Windows PC. Don't know why they would be different, and, if one is "better" than another. Or are these different permissions expected?

 

I seem to have inconsistent results when I test the syncing. I thought at first that new files were not syncing to 0750 folders, but were syncing to 0757 folders, but this seems not to be the case. But it's getting late here; I'll test a bit more tomorrow.

 

This sounds like a space issue - you're at something like 0.4% free space, and even if that equates to multiple GB of space, you have to take into account the fact that the filesystem has journaling/maintenance to address that uses your free space to do so. Any filesystem (and each disk contains a single unique filesystem - unraid just presents the array as a single namespace for it) starts acting more and more wonky the closer you get to capacity; even for write-once-read-many things like you'd typically put on the unraid array, 3% is the bare minimum I'd want free (5% is better).

 

Add more capacity, and I'm near certain your issue will go away.

Edited by BVD
Link to comment
5 hours ago, levster said:

I have just ran a CLI upgrade (sudo -u abc php updater.phar) and now cannot access the nextcloud Web UI. 

 

Any suggestions?

 

Here is what I see on the Log: 

 

s6-rc: info: service legacy-services: stopping
s6-svwait: fatal: supervisor died
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service init-services: stopping
s6-rc: info: service 00-legacy: stopping
s6-rc: info: service init-services successfully stopped
s6-rc: info: service init-mods-end: stopping
s6-rc: info: service 00-legacy successfully stopped
s6-rc: info: service init-mods-end successfully stopped
s6-rc: info: service init-mods-package-install: stopping
s6-rc: info: service init-mods-package-install successfully stopped
s6-rc: info: service init-mods: stopping
s6-rc: info: service init-mods successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service 00-legacy: starting
s6-rc: info: service 00-legacy successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/01-envfile
cont-init: info: /etc/cont-init.d/01-envfile exited 0
cont-init: info: running /etc/cont-init.d/02-tamper-check
cont-init: info: /etc/cont-init.d/02-tamper-check exited 0
cont-init: info: running /etc/cont-init.d/10-adduser
cont-init: info: /etc/cont-init.d/10-adduser exited 0
cont-init: info: running /etc/cont-init.d/20-config
cont-init: info: /etc/cont-init.d/20-config exited 0
cont-init: info: running /etc/cont-init.d/30-keygen
cont-init: info: /etc/cont-init.d/30-keygen exited 0
cont-init: info: running /etc/cont-init.d/40-config
cont-init: info: /etc/cont-init.d/40-config exited 0
cont-init: info: running /etc/cont-init.d/50-install
cont-init: info: /etc/cont-init.d/50-install exited 0
cont-init: info: running /etc/cont-init.d/60-memcache
cont-init: info: /etc/cont-init.d/60-memcache exited 0
cont-init: info: running /etc/cont-init.d/70-aliases
cont-init: info: /etc/cont-init.d/70-aliases exited 0
cont-init: info: running /etc/cont-init.d/90-custom-folders
cont-init: info: /etc/cont-init.d/90-custom-folders exited 0
cont-init: info: running /etc/cont-init.d/99-custom-files
cont-init: info: /etc/cont-init.d/99-custom-files exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mods-package-install: starting
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun cron (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun php-fpm (no readiness notification)
s6-rc: info: service legacy-services successfully started
s6-rc: info: service 99-ci-service-check: starting
s6-rc: info: service 99-ci-service-check successfully started
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    99
User gid:    100
-------------------------------------

using keys found in /config/keys
[custom-init] no custom files found exiting...
[ls.io-init] done.

 

Why'd you use sudo? All that should be required is just the command 'updater.phar' - to rule out permissions issues having been introduced, I'd restore the app and DB from backup and re-run normally, just in case.

 

If you're looking for further help, you'll want to increase the logging level of nextcloud from the cli, restart the container, then post up what you're seeing.

Link to comment
14 hours ago, BVD said:

 

This sounds like a space issue - you're at something like 0.4% free space, and even if that equates to multiple GB of space, you have to take into account the fact that the filesystem has journaling/maintenance to address that uses your free space to do so. Any filesystem (and each disk contains a single unique filesystem - unraid just presents the array as a single namespace for it) starts acting more and more wonky the closer you get to capacity; even for write-once-read-many things like you'd typically put on the unraid array, 3% is the bare minimum I'd want free (5% is better).

 

Add more capacity, and I'm near certain your issue will go away.

 

I think space was indeed the problem. My Disk 1 was very full, so I deleted some stuff. Didn't touch Nextcloud, but next time I looked, everything was working. Thanks very much for the help.

Link to comment
On 8/22/2022 at 9:38 AM, levster said:

I have just ran a CLI upgrade (sudo -u abc php updater.phar) and now cannot access the nextcloud Web UI. 

 

Any suggestions?

 

Here is what I see on the Log: 

 

s6-rc: info: service legacy-services: stopping
s6-svwait: fatal: supervisor died
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service init-services: stopping
s6-rc: info: service 00-legacy: stopping
s6-rc: info: service init-services successfully stopped
s6-rc: info: service init-mods-end: stopping
s6-rc: info: service 00-legacy successfully stopped
s6-rc: info: service init-mods-end successfully stopped
s6-rc: info: service init-mods-package-install: stopping
s6-rc: info: service init-mods-package-install successfully stopped
s6-rc: info: service init-mods: stopping
s6-rc: info: service init-mods successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service 00-legacy: starting
s6-rc: info: service 00-legacy successfully started
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
cont-init: info: running /etc/cont-init.d/01-envfile
cont-init: info: /etc/cont-init.d/01-envfile exited 0
cont-init: info: running /etc/cont-init.d/02-tamper-check
cont-init: info: /etc/cont-init.d/02-tamper-check exited 0
cont-init: info: running /etc/cont-init.d/10-adduser
cont-init: info: /etc/cont-init.d/10-adduser exited 0
cont-init: info: running /etc/cont-init.d/20-config
cont-init: info: /etc/cont-init.d/20-config exited 0
cont-init: info: running /etc/cont-init.d/30-keygen
cont-init: info: /etc/cont-init.d/30-keygen exited 0
cont-init: info: running /etc/cont-init.d/40-config
cont-init: info: /etc/cont-init.d/40-config exited 0
cont-init: info: running /etc/cont-init.d/50-install
cont-init: info: /etc/cont-init.d/50-install exited 0
cont-init: info: running /etc/cont-init.d/60-memcache
cont-init: info: /etc/cont-init.d/60-memcache exited 0
cont-init: info: running /etc/cont-init.d/70-aliases
cont-init: info: /etc/cont-init.d/70-aliases exited 0
cont-init: info: running /etc/cont-init.d/90-custom-folders
cont-init: info: /etc/cont-init.d/90-custom-folders exited 0
cont-init: info: running /etc/cont-init.d/99-custom-files
cont-init: info: /etc/cont-init.d/99-custom-files exited 0
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service init-mods: starting
s6-rc: info: service init-mods successfully started
s6-rc: info: service init-mods-package-install: starting
s6-rc: info: service init-mods-package-install successfully started
s6-rc: info: service init-mods-end: starting
s6-rc: info: service init-mods-end successfully started
s6-rc: info: service init-services: starting
s6-rc: info: service init-services successfully started
s6-rc: info: service legacy-services: starting
services-up: info: copying legacy longrun cron (no readiness notification)
services-up: info: copying legacy longrun nginx (no readiness notification)
services-up: info: copying legacy longrun php-fpm (no readiness notification)
s6-rc: info: service legacy-services successfully started
s6-rc: info: service 99-ci-service-check: starting
s6-rc: info: service 99-ci-service-check successfully started
usermod: no changes

-------------------------------------
          _         ()
         | |  ___   _    __
         | | / __| | |  /  \
         | | \__ \ | | | () |
         |_| |___/ |_|  \__/


Brought to you by linuxserver.io
-------------------------------------

To support LSIO projects visit:
https://www.linuxserver.io/donate/
-------------------------------------
GID/UID
-------------------------------------

User uid:    99
User gid:    100
-------------------------------------

using keys found in /config/keys
[custom-init] no custom files found exiting...
[ls.io-init] done.

 

I seem to be having the same issue. Any luck solving?

Link to comment
On 6/8/2022 at 6:38 PM, Yak said:

Tried updating to 24.0.1 using docker exec -it nextcloud updater.phar in a terminal.

 

All seemed to run ok and then I get the following error about an unhandled exception when the occ upgrade is executed

 

Update of code successful.

Should the "occ upgrade" command be executed? [Y/n] 
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Setting log level to debug
Repair step: Repair MySQL collation
Repair info: All tables already have the correct collation -> nothing to do
Repair step: Repair SQLite autoincrement
Repair step: Copy data from accounts table when migrating from ownCloud
Repair step: Drop account terms table when migrating from ownCloud
Updating database schema
Updated database
An unhandled exception has been thrown:
TypeError: fwrite() expects parameter 1 to be resource, bool given in /config/www/nextcloud/lib/private/Security/CertificateManager.php:161
Stack trace:
#0 /config/www/nextcloud/lib/private/Security/CertificateManager.php(161): fwrite()
#1 /config/www/nextcloud/lib/private/Security/CertificateManager.php(247): OC\Security\CertificateManager->createCertificateBundle()
#2 /config/www/nextcloud/lib/private/Http/Client/Client.php(127): OC\Security\CertificateManager->getAbsoluteBundlePath()
#3 /config/www/nextcloud/lib/private/Http/Client/Client.php(74): OC\Http\Client\Client->getCertBundle()
#4 /config/www/nextcloud/lib/private/Http/Client/Client.php(218): OC\Http\Client\Client->buildRequestOptions()
#5 /config/www/nextcloud/lib/private/App/AppStore/Fetcher/Fetcher.php(120): OC\Http\Client\Client->get()
#6 /config/www/nextcloud/lib/private/App/AppStore/Fetcher/AppFetcher.php(87): OC\App\AppStore\Fetcher\Fetcher->fetch()
#7 /config/www/nextcloud/lib/private/App/AppStore/Fetcher/Fetcher.php(192): OC\App\AppStore\Fetcher\AppFetcher->fetch()
#8 /config/www/nextcloud/lib/private/App/AppStore/Fetcher/AppFetcher.php(188): OC\App\AppStore\Fetcher\Fetcher->get()
#9 /config/www/nextcloud/lib/private/Installer.php(422): OC\App\AppStore\Fetcher\AppFetcher->get()
#10 /config/www/nextcloud/lib/private/Updater.php(413): OC\Installer->isUpdateAvailable()
#11 /config/www/nextcloud/lib/private/Updater.php(274): OC\Updater->upgradeAppStoreApps()
#12 /config/www/nextcloud/lib/private/Updater.php(133): OC\Updater->doUpgrade()
#13 /config/www/nextcloud/core/Command/Upgrade.php(235): OC\Updater->upgrade()
#14 /config/www/nextcloud/3rdparty/symfony/console/Command/Command.php(255): OC\Core\Command\Upgrade->execute()
#15 /config/www/nextcloud/3rdparty/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run()
#16 /config/www/nextcloud/3rdparty/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#17 /config/www/nextcloud/3rdparty/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun()
#18 /config/www/nextcloud/lib/private/Console/Application.php(211): Symfony\Component\Console\Application->run()
#19 /config/www/nextcloud/console.php(99): OC\Console\Application->run()
#20 /config/www/nextcloud/occ(11): require_once('/config/www/nex...')
#21 {main}
Keep maintenance mode active? [y/N] 
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Maintenance mode disabled

Maintenance mode is disabled

 

Then when trying to log into the web UI I get:

 

Where do I even begin?

 

EDIT:

Tried the OCC Upgrade command and have the same error

Also tried sudo -u abc php occ maintenance:repair and running upgrade again but still getting the same error

 

 


Did you or someone else get this fixed?
I seem to have exactly the same error...

Link to comment
34 minutes ago, Piottreck said:


Did you or someone else get this fixed?
I seem to have exactly the same error...

 

On 8/22/2022 at 5:32 PM, BVD said:

 

Why'd you use sudo? All that should be required is just the command 'updater.phar' - to rule out permissions issues having been introduced, I'd restore the app and DB from backup and re-run normally, just in case.

 

If you're looking for further help, you'll want to increase the logging level of nextcloud from the cli, restart the container, then post up what you're seeing.

 

Link to comment
6 hours ago, BVD said:

 

 

I saw your earlier post, but I can't figure out how to up my logging level in nextcloud. I used the unraid terminal to look at /nextcloud/www/nextcloud/config/config.php but I didn't see anything there that showed the current logging level. Can you please point me in the right direction on where to find the file to edit that value?

Link to comment

When I try to update the Nextcloud container from within the Nextcloud UI, it always errors out at "Delete old files". Is there a way to fix this? This is what it looks like:

 

Delete old files
Parsing response failed.
Show detailed response
<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.20.2</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

 

Simply waiting does not fix it.

 

By the time this error occurs, it's deleted most of the files inside my nextcloud appdata directory, and I have to retrieve the backup from the nextcloud data share.

 

To further illustrate, see the attached image.

img925.png

Edited by Stubbs
Link to comment
4 minutes ago, Stubbs said:

When I try to update the Nextcloud container from within the Nextcloud UI, it always errors out at "Delete old files". Is there a way to fix this? This is what it looks like:

 

Delete old files
Parsing response failed.
Show detailed response
<html>
<head><title>504 Gateway Time-out</title></head>
<body>
<center><h1>504 Gateway Time-out</h1></center>
<hr><center>nginx/1.20.2</center>
</body>
</html>
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->
<!-- a padding to disable MSIE and Chrome friendly error page -->

 

Simply waiting does not fix it.

 

By the time this error occurs, it's deleted most of the files inside my nextcloud appdata directory, and I have to retrieve the backup from the nextcloud data share.

 

To further illustrate, see the attached image.

img925.png

Read post number 1; instructions to manually upgraded are provided. Many/Most don’t seem to have luck upgrading with GUI. 

  • Thanks 2
Link to comment
13 minutes ago, Stubbs said:

When I try to update the Nextcloud container from within the Nextcloud UI, it always errors out at "Delete old files". Is there a way to fix this?

 

With anything more than a tiny number of files, the GUI updater typically eventually will timeout due to hitting php's active worker time limit - use the CLI instead, and you'll likely have a much better experience 👍

  • Thanks 1
Link to comment
25 minutes ago, blaine07 said:

Read post number 1; instructions to manually upgraded are provided. Many/Most don’t seem to have luck upgrading with GUI. 

 

15 minutes ago, BVD said:

 

With anything more than a tiny number of files, the GUI updater typically eventually will timeout due to hitting php's active worker time limit - use the CLI instead, and you'll likely have a much better experience 👍

 

You were right, worked just fine through the CLI. Thanks.

 

The web based updater has given me so many problems in the past. Finally I never have to use it again.

  • Upvote 1
Link to comment

So I followed SpaceInvader One's nextcloud setup and am using Nextcloud with mariadb/swag/duckdns.  It was working flawlessly for several months and then something happened (not nextcloud related) and I had to adjust some network settings.  I reverted everything back to the original; however, for some reason, whenever I try to load the nexcloud gui, I get an "unable to connect" message.  Everything is running fine and I have ports forwarded appropriately, etc.  Is there some easy docker commands which might help me highlight the issue.  Without nuking everything above and start over, I am at a loss for how to troubleshoot this issue.  As mentioned, it ran just fine for many months until I was trying to set up Remote Support for Unraid.  I ended up deciding against this (after adjusting various settings) and believe I reverted everything back.  Port Forwarding appears to be fine and as originally set up. 

 

Thanks in advance.  Happy to answer any questions about the setup if needed.

Edited by Hawkins12
Link to comment

Hello, since Weeks I get some Errors in Logs and Upload fails with Android Client and WebDAV.

 

Nextcloud 24.04 (but also with 24.03) + Postgresql14+ Redis and SWAG

 

[webdav] Fatal: InvalidArgumentException: X-OC-MTime header must be a valid positive integer at <<closure>>

 0. /config/www/nextcloud/apps/dav/lib/Connector/Sabre/Node.php line 458
    OCA\DAV\Connector\Sabre\MtimeSanitizer::sanitizeMtime()
 1. /config/www/nextcloud/apps/dav/lib/Connector/Sabre/File.php line 379
    OCA\DAV\Connector\Sabre\Node->sanitizeMtime()
 2. /config/www/nextcloud/apps/dav/lib/Connector/Sabre/Directory.php line 164
    OCA\DAV\Connector\Sabre\File->put()
 3. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 1098
    OCA\DAV\Connector\Sabre\Directory->createFile()
 4. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/CorePlugin.php line 504
    Sabre\DAV\Server->createFile()
 5. /config/www/nextcloud/3rdparty/sabre/event/lib/WildcardEmitterTrait.php line 89
    Sabre\DAV\CorePlugin->httpPut()
 6. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 472
    Sabre\DAV\Server->emit()
 7. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 253
    Sabre\DAV\Server->invokeMethod()
 8. /config/www/nextcloud/3rdparty/sabre/dav/lib/DAV/Server.php line 321
    Sabre\DAV\Server->start()
 9. /config/www/nextcloud/apps/dav/lib/Server.php line 358
    Sabre\DAV\Server->exec()
10. /config/www/nextcloud/apps/dav/appinfo/v2/remote.php line 35
    OCA\DAV\Server->exec()
11. /config/www/nextcloud/remote.php line 166
    require_once("/config/www/nex ... p")

PUT /remote.php/dav/files/xxxmar/Filesync%20Pixel%205/GIF/VID-20181028-WA0014.mp4
from 99.123.100.241 by xxxmar at 2022-08-30T15:42:24+00:00

 

I only find this, but dont know how I could do this within an Unraid Docker?

How to fix the error invalid or negative modification date

 

May someone could help?

Edited by backfmar
Link to comment

Howdy all,

It seems that my nextcloud is fragile! :) I was not even working on nextcloud and it broke. In fact, I was learning how to setup a Windows VM. ;) I don't know what I did but now it won't start. Looking at the logs I see this: 

 

Doctrine\DBAL\Exception: Failed to connect to the database: An exception occurred in the driver: SQLSTATE[HY000] [2002] Host is unreachable in /config/www/nextcloud/lib/private/DB/Connection.php:139

 

I see others have had this error but didn't see if they figured out how to fix this. 

Link to comment

Not to my knowledge. I restarted it multiple times. I noticed that it had an update, since it wasn't working anyways, i updated it and the database. 

 

Turned out to be a ip issue.  changed unraid's ip to static to match it's reserved ip. I recently changed motherboard so that was the issue. 

Edited by Sabot
Link to comment
1 hour ago, Sabot said:

Not to my knowledge. I restarted it multiple times. I noticed that it had an update, since it wasn't working anyways, i updated it and the database. 

 

 

Databases have specific schema requirements, often necessitating a dump/restore as part of their update process - I'd recommend researching your specific db container's update process in order to correct this after rolling back your DB container image to the expected/previous version and restoring a backup of your nextcloud+db instances.

 

Additionally, you never want to restart a DB container without first stopping any container which relies upon it for it's metadata/storage. Doing so is similar to pulling the boot drive from an active Windows machine - it may be fine after, though depending on it's in-memory state at the time, it may become corrupted.

 

Once you've restored your backups/container image(s), you can walk through the container update process for your DB.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.