Nextcloud datadir changed after starting the new container

Hi,
this is a thread that I already started on github, but open it here again. ovpc was helping me there already. The original error was:

I wanted to upgrade to Buster, downloaded the recently updated Docker container, stopped my old container, pulled the new one and started it with the same parameters as the previous one.
The container starts, I can go in (bash) and ncp-config works as well, but the nextcloud is not reachable.
I ran ncp-update and got this:

ncp-update
Downloading updates
Performing updates
Hit:1 http://deb.debian.org/debian buster InRelease
Hit:2 http://security.debian.org/debian-security buster/updates InRelease
Hit:3 http://deb.debian.org/debian buster-updates InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree
Reading state information... Done
exfat-utils is already the newest version (1.3.0-1).
exfat-fuse is already the newest version (1.3.0-1).
php-smbclient is already the newest version (0.9.0-3+b1).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
Reading package lists... Done
Building dependency tree
Reading state information... Done
lsb-release is already the newest version (10.2019051400).
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
NextCloudPi updated to version v1.15.3

So far so good, but it still doesn’t work, fixing permissions got me this error:

Running nc-fix-permissions
PHP Warning:  fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /data/nextcloud/lib/private/Log/File.php on line 140
{"reqId":"OUC9h4lV91mp62DVNwle","level":3,"time":"2019-07-30T06:19:34+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(\/media\/USBdrive\/ncdata\/files_encryption\/OC_DEFAULT_MODULE\/pubShare_737add2d.publicKey): failed to open stream: No such file or directory at \/data\/nextcloud\/lib\/private\/Files\/Storage\/Local.php#284","userAgent":"--","version":"15.0.8.1"}
PHP Warning:  fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /data/nextcloud/lib/private/Log/File.php on line 140
{"reqId":"OUC9h4lV91mp62DVNwle","level":3,"time":"2019-07-30T06:19:34+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(\/media\/USBdrive\/ncdata\/files_encryption\/OC_DEFAULT_MODULE\/pubShare_737add2d.privateKey): failed to open stream: No such file or directory at \/data\/nextcloud\/lib\/private\/Files\/Storage\/Local.php#284","userAgent":"--","version":"15.0.8.1"}
PHP Warning:  fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /data/nextcloud/lib/private/Log/File.php on line 140
{"reqId":"OUC9h4lV91mp62DVNwle","level":3,"time":"2019-07-30T06:19:44+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(\/media\/USBdrive\/ncdata\/files_encryption\/OC_DEFAULT_MODULE\/master_737add2d.publicKey): failed to open stream: No such file or directory at \/data\/nextcloud\/lib\/private\/Files\/Storage\/Local.php#284","userAgent":"--","version":"15.0.8.1"}
PHP Warning:  fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /data/nextcloud/lib/private/Log/File.php on line 140
{"reqId":"OUC9h4lV91mp62DVNwle","level":3,"time":"2019-07-30T06:19:44+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(\/media\/USBdrive\/ncdata\/files_encryption\/OC_DEFAULT_MODULE\/master_737add2d.privateKey): failed to open stream: No such file or directory at \/data\/nextcloud\/lib\/private\/Files\/Storage\/Local.php#284","userAgent":"--","version":"15.0.8.1"}
PHP Warning:  fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /data/nextcloud/lib/private/Log/File.php on line 140
{"reqId":"OUC9h4lV91mp62DVNwle","level":3,"time":"2019-07-30T06:19:44+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fileperms(): stat failed for \/media\/USBdrive\/ncdata\/nextcloud.log at \/data\/nextcloud\/lib\/private\/Log\/File.php#140","userAgent":"--","version":"15.0.8.1"}
{"reqId":"OUC9h4lV91mp62DVNwle","level":3,"time":"2019-07-30T06:19:44+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"chmod(): No such file or directory at \/data\/nextcloud\/lib\/private\/Log\/File.php#141","userAgent":"--","version":"15.0.8.1"}
data directory not found
Done. Press any key...

Well, as I said before, I started it with the same parameters, -v /media/data/nextcloud:/data, which worked before. Now both (the stopped container) and the new have wrong location settings, it seems…

Is that a known bug and is it easily fixable?

Last but not least the nc-info (the ports are supposed to be closed!):

Running nc-info
Gathering information...
PHP Warning:  fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /data/nextcloud/lib/private/Log/File.php on line 140
{"reqId":"Mp5SfaLVMvEflkCqPjB1","level":3,"time":"2019-07-30T06:22:08+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(\/media\/USBdrive\/ncdata\/files_encryption\/OC_DEFAULT_MODULE\/pubShare_737add2d.publicKey): failed to open stream: No such file or directory at \/data\/nextcloud\/lib\/private\/Files\/Storage\/Local.php#284","userAgent":"--","version":"15.0.8.1"}
PHP Warning:  fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /data/nextcloud/lib/private/Log/File.php on line 140
{"reqId":"Mp5SfaLVMvEflkCqPjB1","level":3,"time":"2019-07-30T06:22:08+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(\/media\/USBdrive\/ncdata\/files_encryption\/OC_DEFAULT_MODULE\/pubShare_737add2d.privateKey): failed to open stream: No such file or directory at \/data\/nextcloud\/lib\/private\/Files\/Storage\/Local.php#284","userAgent":"--","version":"15.0.8.1"}
PHP Warning:  fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /data/nextcloud/lib/private/Log/File.php on line 140
{"reqId":"Mp5SfaLVMvEflkCqPjB1","level":3,"time":"2019-07-30T06:22:13+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(\/media\/USBdrive\/ncdata\/files_encryption\/OC_DEFAULT_MODULE\/master_737add2d.publicKey): failed to open stream: No such file or directory at \/data\/nextcloud\/lib\/private\/Files\/Storage\/Local.php#284","userAgent":"--","version":"15.0.8.1"}
PHP Warning:  fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /data/nextcloud/lib/private/Log/File.php on line 140
{"reqId":"Mp5SfaLVMvEflkCqPjB1","level":3,"time":"2019-07-30T06:22:14+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fopen(\/media\/USBdrive\/ncdata\/files_encryption\/OC_DEFAULT_MODULE\/master_737add2d.privateKey): failed to open stream: No such file or directory at \/data\/nextcloud\/lib\/private\/Files\/Storage\/Local.php#284","userAgent":"--","version":"15.0.8.1"}
PHP Warning:  fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /data/nextcloud/lib/private/Log/File.php on line 140
{"reqId":"Mp5SfaLVMvEflkCqPjB1","level":3,"time":"2019-07-30T06:22:14+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fileperms(): stat failed for \/media\/USBdrive\/ncdata\/nextcloud.log at \/data\/nextcloud\/lib\/private\/Log\/File.php#140","userAgent":"--","version":"15.0.8.1"}
{"reqId":"Mp5SfaLVMvEflkCqPjB1","level":3,"time":"2019-07-30T06:22:14+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"chmod(): No such file or directory at \/data\/nextcloud\/lib\/private\/Log\/File.php#141","userAgent":"--","version":"15.0.8.1"}
NextCloudPi version  v1.15.3
NextCloudPi image    NextCloudPi_docker_07-20-19
distribution         Debian GNU/Linux 10 \n \l
automount            no
USB devices          sda
datadir              /media/USBdrive/ncdata (doesn't exist)
rootfs usage         4.2G/59G
swapfile             none
dbdir                /data/database
Nextcloud check      error
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
Postfix service      up
internet check       ok
port check 80        closed
port check 443       closed
IP                   172.17.0.2
gateway              172.17.0.1
interface            eth0
certificates         none
NAT loopback         no
uptime               35days

A bit of history here: I created the nextcloudpi before I knew Docker and on that instance the datadir was /media/USBdrive. After switching to Docker I didn’t want to change too much and imported a backup of the NCP instance from before, which resulted in a Nextcloud that had the datadir in USBdrive.
All worked fine and even though it doesn’t look so nice to have the datadir in /media/USBdrive, it was working.

Now I changed my docker command:
This was my previous docker command, used it several times with the old docker container:
sudo docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v /media/data/nextcloud:/data -v /media/data/backup:/media/backup --name nextcloudpi_ag5 ownyourbits/nextcloudpi-armhf

Now I used after finding the nc-data-dir:
sudo docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v /media/data/nextcloud:/data -v /media/data/backup:/media/backup -v /media/data/files/ncdata:/media/USBdrive --name nextcloudpi_ag7 ownyourbits/nextcloudpi-armhf

I get no errors anymore, but a 503 Service Unavailable when I want to open NC.

I’m a bit lost, tried to work on the config.php, but no real success on that side either.

I’d be really glad for help!

When I want to restore a backup in a completely new, clean container I get an error as well, same thing with the data-dir:

Running nc-restore
check free space...
extracting backup file /media/backup/nextcloud-bkp_20190729_1564369203.tar.gz...
restore files...
Stopping redis-server: redis-server.
Starting redis-server: redis-server.
restore database...
no datadir found in backup
PHP Warning:  fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /data/nextcloud/lib/private/Log/File.php on line 140
{"reqId":"ElHLOc6Pd4QDZkRdTGiS","level":3,"time":"2019-07-30T09:17:47+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fileperms(): stat failed for \/media\/USBdrive\/ncdata\/nextcloud.log at \/data\/nextcloud\/lib\/private\/Log\/File.php#140","userAgent":"--","version":"15.0.8.1"}
{"reqId":"ElHLOc6Pd4QDZkRdTGiS","level":2,"time":"2019-07-30T09:17:47+00:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Temporary directory \/var\/www\/nextcloud\/data\/tmp is not present or writable","userAgent":"--","version":"15.0.8.1"}
Your data directory is invalid
Ensure there is a file called ".ocdata" in the root of the data directory.

Cannot create "data" directory
This can usually be fixed by giving the webserver write access to the root directory. See https://docs.nextcloud.com/server/15/go.php?to=admin-dir_permissions

An unhandled exception has been thrown:
Exception: Environment not properly prepared. in /data/nextcloud/lib/private/Console/Application.php:166
Stack trace:
#0 /data/nextcloud/console.php(95): OC\Console\Application->loadCommands(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#1 /data/nextcloud/occ(11): require_once('/data/nextcloud...')
#2 {main}PHP Warning:  fileperms(): stat failed for /media/USBdrive/ncdata/nextcloud.log in /data/nextcloud/lib/private/Log/File.php on line 140
{"reqId":"ElHLOc6Pd4QDZkRdTGiS","level":3,"time":"2019-07-30T09:17:47+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"fileperms(): stat failed for \/media\/USBdrive\/ncdata\/nextcloud.log at \/data\/nextcloud\/lib\/private\/Log\/File.php#140","userAgent":"--","version":"15.0.8.1"}
{"reqId":"ElHLOc6Pd4QDZkRdTGiS","level":3,"time":"2019-07-30T09:17:47+00:00","remoteAddr":"","user":"--","app":"PHP","method":"","url":"--","message":"chmod(): No such file or directory at \/data\/nextcloud\/lib\/private\/Log\/File.php#141","userAgent":"--","version":"15.0.8.1"}
Cleanup...
Done. Press any key...

<–! Paste this in GitHub report -->

NextCloudPi diagnostics

NextCloudPi version  v1.15.3
NextCloudPi image    NextCloudPi_docker_07-20-19
distribution         Debian GNU/Linux 10 \n \l
automount            no
USB devices          sda sdb 
datadir              /data/nextcloud/data
data in SD           yes
data filesystem      ext2/ext3
data disk usage      271G/1.8T
rootfs usage         271G/1.8T
swapfile             /dev/zram7
dbdir                /data/database
Nextcloud check      ok
Nextcloud version    16.0.3.0
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
Postfix service      up
internet check       ok
port check 80        closed
port check 443       closed
IP                   ***REMOVED SENSITIVE VALUE***
gateway              ***REMOVED SENSITIVE VALUE***
interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
uptime               14:36

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "11": "109.192.131.78",
            "1": "192.168.0.150",
            "5": "nextcloudpi.local",
            "7": "nextcloudpi",
            "8": "nextcloudpi.lan",
            "20": "192.168.0.150",
            "21": "nextcloud.local",
            "22": "192.168.1.15"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "16.0.3.0",
        "overwrite.cli.url": "http:\/\/localhost",
        "dbname": "***REMOVED SENSITIVE VALUE***",
        "dbhost": "***REMOVED SENSITIVE VALUE***",
        "dbport": "",
        "dbtableprefix": "oc_",
        "mysql.utf8mb4": true,
        "dbuser": "***REMOVED SENSITIVE VALUE***",
        "dbpassword": "***REMOVED SENSITIVE VALUE***",
        "installed": true,
        "instanceid": "***REMOVED SENSITIVE VALUE***",
        "memcache.local": "\\OC\\Memcache\\Redis",
        "memcache.locking": "\\OC\\Memcache\\Redis",
        "redis": {
            "host": "***REMOVED SENSITIVE VALUE***",
            "port": 0,
            "timeout": 0,
            "password": "***REMOVED SENSITIVE VALUE***"
        },
        "tempdirectory": "\/var\/www\/nextcloud\/data\/tmp",
        "mail_smtpmode": "sendmail",
        "mail_smtpauthtype": "LOGIN",
        "mail_from_address": "***REMOVED SENSITIVE VALUE***",
        "mail_domain": "***REMOVED SENSITIVE VALUE***",
        "overwriteprotocol": "https",
        "maintenance": false,
        "loglevel": 2,
        "theme": "",
        "jpeg_quality": "60",
        "preview_max_x": "2048",
        "preview_max_y": "2048"
    }
}

HTTPd logs

[Mon Jul 29 22:06:15.119054 2019] [ssl:error] [pid 95:tid 3069787568] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Mon Jul 29 22:06:15.155577 2019] [ssl:error] [pid 96:tid 3069787568] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 7B1ADC5242212CB2C5779C0A5FFC7D26B3EB9E05 / notbefore: Jul 20 21:57:13 2019 GMT / notafter: Jul 17 21:57:13 2029 GMT]
[Mon Jul 29 22:06:15.155635 2019] [ssl:error] [pid 96:tid 3069787568] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Mon Jul 29 22:06:15.160787 2019] [mpm_event:notice] [pid 96:tid 3069787568] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1c configured -- resuming normal operations
[Mon Jul 29 22:06:15.160892 2019] [core:notice] [pid 96:tid 3069787568] AH00094: Command line: '/usr/sbin/apache2'
[Tue Jul 30 08:46:01.265826 2019] [authz_host:error] [pid 99:tid 2757202976] [client 192.168.0.70:41934] AH01753: access check of 'localhost' to / failed, reason: unable to get the remote host name
[Tue Jul 30 08:46:02.905265 2019] [authz_host:error] [pid 99:tid 2757202976] [client 192.168.0.70:41934] AH01753: access check of 'localhost' to / failed, reason: unable to get the remote host name
[Tue Jul 30 08:46:03.035598 2019] [authz_host:error] [pid 99:tid 2757202976] [client 192.168.0.70:41934] AH01753: access check of 'localhost' to / failed, reason: unable to get the remote host name
[Tue Jul 30 08:46:03.051100 2019] [authz_host:error] [pid 99:tid 2757202976] [client 192.168.0.70:41934] AH01753: access check of 'localhost' to /index.php failed, reason: unable to get the remote host name
[Tue Jul 30 08:46:03.099088 2019] [authz_host:error] [pid 99:tid 2757202976] [client 192.168.0.70:41934] AH01753: access check of 'localhost' to /index.php failed, reason: unable to get the remote host name
[Tue Jul 30 08:46:03.099430 2019] [proxy:error] [pid 99:tid 2757202976] (2)No such file or directory: AH02454: FCGI: attempt to connect to Unix domain socket /run/php/php7.2-fpm.sock (*) failed
[Tue Jul 30 08:46:03.099460 2019] [proxy_fcgi:error] [pid 99:tid 2757202976] [client 192.168.0.70:41934] AH01079: failed to make connection to backend: httpd-UDS
[Tue Jul 30 08:46:03.141435 2019] [authz_host:error] [pid 99:tid 2757202976] [client 192.168.0.70:41934] AH01753: access check of 'localhost' to /favicon.ico failed, reason: unable to get the remote host name
[Tue Jul 30 12:34:13.626309 2019] [mpm_event:notice] [pid 96:tid 3069787568] AH00492: caught SIGWINCH, shutting down gracefully
[Tue Jul 30 12:34:23.161724 2019] [ssl:error] [pid 96:tid 3070041520] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 7B1ADC5242212CB2C5779C0A5FFC7D26B3EB9E05 / notbefore: Jul 20 21:57:13 2019 GMT / notafter: Jul 17 21:57:13 2029 GMT]
[Tue Jul 30 12:34:23.161753 2019] [ssl:error] [pid 96:tid 3070041520] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Tue Jul 30 12:34:23.187625 2019] [ssl:error] [pid 97:tid 3070041520] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 7B1ADC5242212CB2C5779C0A5FFC7D26B3EB9E05 / notbefore: Jul 20 21:57:13 2019 GMT / notafter: Jul 17 21:57:13 2029 GMT]
[Tue Jul 30 12:34:23.187659 2019] [ssl:error] [pid 97:tid 3070041520] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Tue Jul 30 12:34:23.195003 2019] [mpm_event:notice] [pid 97:tid 3070041520] AH00489: Apache/2.4.38 (Debian) OpenSSL/1.1.1c configured -- resuming normal operations
[Tue Jul 30 12:34:23.195221 2019] [core:notice] [pid 97:tid 3070041520] AH00094: Command line: '/usr/sbin/apache2'

Database logs

2019-07-30 12:34:23 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2019-07-30 12:34:23 0 [Note] InnoDB: Number of pools: 1
2019-07-30 12:34:23 0 [Note] InnoDB: Using generic crc32 instructions
2019-07-30 12:34:23 0 [Note] InnoDB: Initializing buffer pool, total size = 896M, instances = 1, chunk size = 128M
2019-07-30 12:34:23 0 [Note] InnoDB: Completed initialization of buffer pool
2019-07-30 12:34:23 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2019-07-30 12:34:23 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2019-07-30 12:34:23 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2019-07-30 12:34:23 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2019-07-30 12:34:24 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2019-07-30 12:34:24 0 [Note] InnoDB: Waiting for purge to start
2019-07-30 12:34:24 0 [Note] InnoDB: 10.3.15 started; log sequence number 1884894762; transaction id 10684942
2019-07-30 12:34:24 0 [Note] InnoDB: Loading buffer pool(s) from /data/database/ib_buffer_pool
2019-07-30 12:34:24 0 [Note] Plugin 'FEEDBACK' is disabled.
2019-07-30 12:34:24 0 [Note] InnoDB: Buffer pool(s) load completed at 190730 12:34:24
2019-07-30 12:34:24 0 [Note] Server socket created on IP: '127.0.0.1'.
2019-07-30 12:34:24 0 [Note] Reading of all Master_info entries succeded
2019-07-30 12:34:24 0 [Note] Added new Master_info '' to hash table
2019-07-30 12:34:24 0 [Note] mysqld: ready for connections.
Version: '10.3.15-MariaDB-1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 10

Nextcloud logs

{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:18+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::info: Repair info: SCSS cache cleared","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:18+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::info: Repair info: JS cache cleared","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:18+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Clear every generated avatar on major updates","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:18+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add preview background cleanup job","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:18+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Queue a one-time job to cleanup old backups of the updater","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:18+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Repair pending cron jobs","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:18+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::info: Repair info: No need to repair pending cron jobs.","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:18+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Extract the vcard uid and store it in the db","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:18+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Cleanup invalid photocache files for carddav","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:18+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add background job to cleanup login flow v2 tokens","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:18+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Remove potentially over exposing share links","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:18+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::info: Repair info: No need to remove link shares.","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:18+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Cleanup cypress files from viewer app","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:33+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:45+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"16.0.2.1"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:45+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"--","version":"16.0.3.0"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:45+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"--","version":"16.0.3.0"}
{"reqId":"0YyBG5aQhk4aIqdhd4yb","level":1,"time":"2019-07-19T06:56:45+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"16.0.3.0"}
{"reqId":"XTmFF8CoAJYAAABq@x4AAABQ","level":3,"time":"2019-07-25T12:37:01+02:00","remoteAddr":"192.168.0.48","user":"mobert","app":"no app in context","method":"PUT","url":"\/remote.php\/dav\/uploads\/mobert\/6432e9abcda5cad8e039daaabc0dd169\/0000000000000000-0000000005238525","message":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"expected filesize 5238525 got 147456","Code":0,"Trace":[{"file":"\/data\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"\/data\/nextcloud\/apps\/dav\/lib\/Upload\/UploadFolder.php","line":45,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["0000000000000000-0000000005238525",null]},{"file":"\/data\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1096,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["0000000000000000-0000000005238525",null]},{"file":"\/data\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["uploads\/mobert\/6432e9abcda5cad8e039daaabc0dd169\/0000000000000000-0000000005238525",null,null]},{"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https:\/\/192.168.0.150\/remote.php\/dav\/uploads\/mobert\/6432e9abcda5cad8e039daaabc0dd169\/0000000000000000-0000000005238525","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/data\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPut"],[{"absoluteUrl":"https:\/\/192.168.0.150\/remote.php\/dav\/uploads\/mobert\/6432e9abcda5cad8e039daaabc0dd169\/0000000000000000-0000000005238525","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/data\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PUT",[{"absoluteUrl":"https:\/\/192.168.0.150\/remote.php\/dav\/uploads\/mobert\/6432e9abcda5cad8e039daaabc0dd169\/0000000000000000-0000000005238525","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/data\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/192.168.0.150\/remote.php\/dav\/uploads\/mobert\/6432e9abcda5cad8e039daaabc0dd169\/0000000000000000-0000000005238525","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/data\/nextcloud\/apps\/dav\/lib\/Server.php","line":316,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/data\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/data\/nextcloud\/remote.php","line":163,"args":["\/data\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/data\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php","Line":227,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Android) Nextcloud-android\/3.7.0","version":"16.0.3.0"}
{"reqId":"XTmFF8CoAJYAAABq@x4AAABQ","level":4,"time":"2019-07-25T12:37:01+02:00","remoteAddr":"192.168.0.48","user":"mobert","app":"webdav","method":"PUT","url":"\/remote.php\/dav\/uploads\/mobert\/6432e9abcda5cad8e039daaabc0dd169\/0000000000000000-0000000005238525","message":{"Exception":"Sabre\\DAV\\Exception\\BadRequest","Message":"expected filesize 5238525 got 147456","Code":0,"Trace":[{"file":"\/data\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/Directory.php","line":156,"function":"put","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[null]},{"file":"\/data\/nextcloud\/apps\/dav\/lib\/Upload\/UploadFolder.php","line":45,"function":"createFile","class":"OCA\\DAV\\Connector\\Sabre\\Directory","type":"->","args":["0000000000000000-0000000005238525",null]},{"file":"\/data\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":1096,"function":"createFile","class":"OCA\\DAV\\Upload\\UploadFolder","type":"->","args":["0000000000000000-0000000005238525",null]},{"file":"\/data\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/CorePlugin.php","line":525,"function":"createFile","class":"Sabre\\DAV\\Server","type":"->","args":["uploads\/mobert\/6432e9abcda5cad8e039daaabc0dd169\/0000000000000000-0000000005238525",null,null]},{"function":"httpPut","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[{"absoluteUrl":"https:\/\/192.168.0.150\/remote.php\/dav\/uploads\/mobert\/6432e9abcda5cad8e039daaabc0dd169\/0000000000000000-0000000005238525","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/data\/nextcloud\/3rdparty\/sabre\/event\/lib\/EventEmitterTrait.php","line":105,"function":"call_user_func_array","args":[[{"__class__":"Sabre\\DAV\\CorePlugin"},"httpPut"],[{"absoluteUrl":"https:\/\/192.168.0.150\/remote.php\/dav\/uploads\/mobert\/6432e9abcda5cad8e039daaabc0dd169\/0000000000000000-0000000005238525","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/data\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":479,"function":"emit","class":"Sabre\\Event\\EventEmitter","type":"->","args":["method:PUT",[{"absoluteUrl":"https:\/\/192.168.0.150\/remote.php\/dav\/uploads\/mobert\/6432e9abcda5cad8e039daaabc0dd169\/0000000000000000-0000000005238525","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]]},{"file":"\/data\/nextcloud\/3rdparty\/sabre\/dav\/lib\/DAV\/Server.php","line":254,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[{"absoluteUrl":"https:\/\/192.168.0.150\/remote.php\/dav\/uploads\/mobert\/6432e9abcda5cad8e039daaabc0dd169\/0000000000000000-0000000005238525","__class__":"Sabre\\HTTP\\Request"},{"__class__":"Sabre\\HTTP\\Response"}]},{"file":"\/data\/nextcloud\/apps\/dav\/lib\/Server.php","line":316,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"\/data\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"\/data\/nextcloud\/remote.php","line":163,"args":["\/data\/nextcloud\/apps\/dav\/appinfo\/v2\/remote.php"],"function":"require_once"}],"File":"\/data\/nextcloud\/apps\/dav\/lib\/Connector\/Sabre\/File.php","Line":227,"CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Android) Nextcloud-android\/3.7.0","version":"16.0.3.0"}

It looks like there is an issue with the ssl certificate? (HTTPd logs)

I have no certificate, it shouldn’t be the certificate, worked without it for all the time. (local machine)

Talking about the problem right now in the telegram group. It might be something with

/run/php/php7.2-fpm.sock

I have php7.3-fpm.sock installed

Maybe this helps you:

I created two new files by editing these two:

/etc/apache2/conf-available/php7.2-fpm.conf
/etc/apache2/conf-enabled/php7.2-fpm.conf

I replaced the php7.2-fpm.conf in the files with php7.3-fpm.conf and saved them as php7.3-fpm.conf (kept the 7.2 version as backup, in case it’s wrong.

Now I only have the data-dir error left :smiley:

Maybe I’m misreading, but it looks like you don’t have the Nextcloud web root on a named Docker volume. Have you lost your config.php?

You are going to need to elaborate on “fixing permissions.”

I have a named container, in fact it’s even the same name as the previous container I had running with NCP (Stretch).
The config.php is still there, I can send a snippet later. There were/are basically two problems:

  1. When starting the container with the usual run command it doesn’t recognise my data-dir anymore. It worked super smooth before. Note: the data-dir in this case is in /media/USBstick/ as I had the NCP on a RPI for a while running without docker and it was the automount thing, in the end I just imported a backup and it stayed in /media/USBstick… But it worked all the time with the previous container and I figured it would be only cosmetic.
  2. After I changed the data-dir in the config.php, I got the other error about php 7.2 while I had 7.3 installed. That was fixable. The files are still a mystery…

The fixing permissions error was just because I figured it would be usefull to run “fixing permissions” before writing here and the error I got was the same as for most other things I tried in ncp-config

I guess I keep my other NCP on Stretch for a bit longer, because using the backup didn’t help in this case either…

Maybe I don’t get your post correctly, what are you asking exactly?

The NCP I was writing about runs again, the files are somehow lost, I will look into that today (as they actually exist in the folder). But the calendar and Deck was the most important to be able to work again.

Thanks everyone for the help!

What I’m saying is, I don’t see a Docker volume in the above that covers /var/www. Is your Nextcloud config.php in one of the above mounted volumes?

you need to stop and remove the old container

Yes, my config.php is in /media/data/nextcloud/nextcloud/config/. Don’t ask me how that goes into /var/www/ later, but the thing is, that it worked all the time and only with the new docker image it stopped working. Probably my mistake, but still strange.

Learned that now, even though I though Docker has the benifit of having several container next to each other… Misunderstanding…
Thank you!