nextcloudpi icon indicating copy to clipboard operation
nextcloudpi copied to clipboard

Docker-compose fails to restart

Open sunjam opened this issue 1 year ago • 10 comments

Steps to re-create

  1. docker-compose up -d using the official compose script
  2. nc-update for ncp or nextcloud to a newer version
  3. docker-compose down
  4. docker-compose up
$ docker-compose up
Creating network "nextcloudpi_default" with the default driver
Creating nextcloudpi ... done
Attaching to nextcloudpi
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | bash: /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh: No such file or directory
nextcloudpi    | /usr/local/etc/library.sh: line 220: ${3:}: bad substitution
nextcloudpi    | Starting Redis
nextcloudpi    | Starting Cron
nextcloudpi    | Starting Postfix
nextcloudpi    | ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)
nextcloudpi    | Init done

sunjam avatar Sep 22 '22 23:09 sunjam

I've also tried this compose file I adapted from the run command.

version: '3.3'
services:
    nextcloudpi:
        container_name: nextcloudpi
        image: ownyourbits/nextcloudpi
        ports:
            - '4443:4443'
            - '443:443'
            - '80:80'
        volumes:
            - '/path/to/ncdata:/data'
        restart: unless-stopped

sunjam avatar Sep 22 '22 23:09 sunjam

So I'll leave a report of what I've found so far when reproducing this and also testing out what it might be

The update of NCP and upgrade of NC works within the docker container, after using docker-compose down && docker-compose up -d, stopping the running container and then starting it up again it is back on the previous version of NCP v1.48.3 with PHP 7.4 and NC v.24.0.4 upgrade still remaining and the docker instance can no longer locate the /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh file makinng the database crash. Creating this file and restarting the container with docker-compose restart nextclodupi resolves this bit but then there is an upgrade for NC and the apps waiting that needs to be done with ncc upgrade.

Missing file
└࿓❯ sudo docker-compose logs
Attaching to nextcloudpi
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | bash: /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh: No such file or directory
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  2:36:30 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 220 ...
nextcloudpi    | 2022-09-23  2:36:30 0 [Warning] Can't create test file /var/lib/mysql/5b901702e8e8.lower-test
nextcloudpi    | mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2 "No such file or directory")
nextcloudpi    | 2022-09-23  2:36:30 0 [ERROR] Aborting
After adding the missing file
└࿓❯ sudo docker exec -it nextcloudpi bash
root@5b901702e8e8:/# nano /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh
bash: nano: command not found
root@5b901702e8e8:/# cat > /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh <<'EQ'
> #! /bin/bash

set -e
source /usr/local/etc/library.sh

if [[ "$1" == "--defaults" ]]
then
  echo "INFO: Restoring template to default settings" >&2
  DB_DIR=/var/lib/mysql
else
  if [[ "$DOCKERBUILD" -eq 1 ]]
  then
    echo "INFO: Docker build detected." >&2
    DB_DIR=/data-ro/database
  elif is_docker
  then
    echo "INFO: Docker container detected." >&2
    DB_DIR=/data/database
  else
    DB_DIR="$(source "${BINDIR}/CONFIG/nc-database.sh"; tmpl_db_dir)"
  fi
fi

# configure MariaDB (UTF8 4 byte support)
cat <<EOF
[mysqld]
datadir = ${DB_DIR?}
EOF
> EQ
root@5b901702e8e8:/# cat /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh
#! /bin/bash

set -e
source /usr/local/etc/library.sh

if [[ "$1" == "--defaults" ]]
then
  echo "INFO: Restoring template to default settings" >&2
  DB_DIR=/var/lib/mysql
else
  if [[ "$DOCKERBUILD" -eq 1 ]]
  then
    echo "INFO: Docker build detected." >&2
    DB_DIR=/data-ro/database
  elif is_docker
  then
    echo "INFO: Docker container detected." >&2
    DB_DIR=/data/database
  else
    DB_DIR="$(source "${BINDIR}/CONFIG/nc-database.sh"; tmpl_db_dir)"
  fi
fi

# configure MariaDB (UTF8 4 byte support)
cat <<EOF
[mysqld]
datadir = ${DB_DIR?}
EOF
root@5b901702e8e8:/# chmod +x /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh
root@5b901702e8e8:/# exit
exit
┌─ 🖼🖌️ 🎨♬ 🌸#️⃣ 🔮
│ ~/docker_stuffz/ncp 
└࿓❯ sudo docker-compose restart nextcloudpi
Restarting nextcloudpi ... done
┌─ 🖼🖌️ 🎨♬ 🌸#️⃣ 🔮
│ ~/docker_stuffz/ncp 
└࿓❯ sudo docker-compose logs
Attaching to nextcloudpi
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | bash: /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh: No such file or directory
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  2:36:30 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 220 ...
nextcloudpi    | 2022-09-23  2:36:30 0 [Warning] Can't create test file /var/lib/mysql/5b901702e8e8.lower-test
nextcloudpi    | mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2 "No such file or directory")
nextcloudpi    | 2022-09-23  2:36:30 0 [ERROR] Aborting
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | httpd (pid 109) already running
nextcloudpi    | INFO: Docker build detected.
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  2:48:28 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 139 ...
nextcloudpi    | 2022-09-23  2:48:29 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23  2:48:29 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Initializing buffer pool, total size = 268435456, chunk size = 134217728
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] InnoDB: 128 rollback segments are active.
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] InnoDB: 10.5.15 started; log sequence number 1303516; transaction id 1922
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] InnoDB: Loading buffer pool(s) from /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] Server socket created on IP: '127.0.0.1'.
nextcloudpi    | 2022-09-23  2:48:37 0 [Note] Reading of all Master_info entries succeeded
nextcloudpi    | 2022-09-23  2:48:37 0 [Note] Added new Master_info '' to hash table
nextcloudpi    | 2022-09-23  2:48:37 0 [Note] mysqld: ready for connections.
nextcloudpi    | Version: '10.5.15-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
nextcloudpi    | Starting Redis
nextcloudpi    | Starting Cron
nextcloudpi    | Starting Postfix
nextcloudpi    | postsuper: Renamed to match inode number: 1 message
nextcloudpi    | postsuper: warning: QUEUE FILE NAMES WERE CHANGED TO MATCH INODE NUMBERS
nextcloudpi    | Provisioning
nextcloudpi    | Provisioning Redis password
nextcloudpi    | Updating NextCloud config with Redis password
nextcloudpi    | Provisioning MariaDB password
nextcloudpi    | Updating NextCloud config with MariaDB password
nextcloudpi    | Running nc-limits
nextcloudpi    | 2022-09-23  2:48:43 0 [Note] InnoDB: Buffer pool(s) load completed at 220923  2:48:43
nextcloudpi    | Using 2972838912 for PHP max memory
nextcloudpi    | Using 6 PHP threads
nextcloudpi    | INFO: Restoring template to default settings
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] Event Scheduler: Purging the queue. 0 events
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] InnoDB: FTS optimize thread exiting.
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] InnoDB: Starting shutdown...
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] InnoDB: Dumping buffer pool(s) to /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] InnoDB: Buffer pool(s) dump completed at 220923  2:48:48
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] InnoDB: Shutdown completed; log sequence number 1303528; transaction id 1924
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] mysqld: Shutdown complete
nextcloudpi    | 
nextcloudpi    | Stopping MariaDB database server: mariadbd.
nextcloudpi    | Starting MariaDB database server: mariadbd.
nextcloudpi    | Clearing opcache...
nextcloudpi    | Done.
nextcloudpi    | Stopping redis-server: redis-server.
nextcloudpi    | Starting redis-server: redis-server.
nextcloudpi    | Starting notify_push daemon
nextcloudpi    | Configuring Domain
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 11 set to string xx.xxx.xxx.xxx
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 1 set to string 172.26.0.2
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 14 set to string 5b901702e8e8
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | 
nextcloudpi    |                                                                  
nextcloudpi    |   There are no commands defined in the "notify_push" namespace.  
nextcloudpi    |                                                                  
nextcloudpi    | 
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 6 set to string 192.168.178.15
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | 
nextcloudpi    |                                                                  
nextcloudpi    |   There are no commands defined in the "notify_push" namespace.  
nextcloudpi    |                                                                  
nextcloudpi    | 
nextcloudpi    | Init done
nextcloudpi    | stopping Cron...
nextcloudpi    | stopping Redis...
nextcloudpi    | stopping Postfix...
nextcloudpi    | stopping HPB...
nextcloudpi    | stopping logs...
nextcloudpi    | tail: no process found
nextcloudpi    | Stopping apache
nextcloudpi    | httpd (pid 109?) not running
nextcloudpi    | Stopping PHP-fpm
nextcloudpi    | Stopping mariaDB
nextcloudpi    | LAMP cleanup complete
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | httpd (pid 109) already running
nextcloudpi    | /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh: line 1: $'\E[200~#!': command not found
nextcloudpi    | INFO: Docker build detected.
nextcloudpi    | /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh: line 28: warning: here-document at line 25 delimited by end-of-file (wanted `EOF')
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 144 ...
nextcloudpi    | 2022-09-23  2:50:21 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23  2:50:21 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Initializing buffer pool, total size = 1073741824, chunk size = 134217728
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: 128 rollback segments are active.
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: 10.5.15 started; log sequence number 1303540; transaction id 1922
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Loading buffer pool(s) from /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23  2:50:21 0 [ERROR] mysqld: unknown option '--EOF~'
nextcloudpi    | 2022-09-23  2:50:21 0 [ERROR] Aborting
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | httpd (pid 109) already running
nextcloudpi    | INFO: Docker build detected.
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 143 ...
nextcloudpi    | 2022-09-23  2:51:53 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23  2:51:53 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Initializing buffer pool, total size = 1073741824, chunk size = 134217728
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: 128 rollback segments are active.
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: 10.5.15 started; log sequence number 1303568; transaction id 1922
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Loading buffer pool(s) from /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] Server socket created on IP: '127.0.0.1'.
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Buffer pool(s) load completed at 220923  2:51:53
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] Reading of all Master_info entries succeeded
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] Added new Master_info '' to hash table
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] mysqld: ready for connections.
nextcloudpi    | Version: '10.5.15-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
nextcloudpi    | Starting Redis
nextcloudpi    | Starting Cron
nextcloudpi    | Starting Postfix
nextcloudpi    | Provisioning
nextcloudpi    | Provisioning Redis password
nextcloudpi    | Updating NextCloud config with Redis password
nextcloudpi    | Provisioning MariaDB password
nextcloudpi    | Updating NextCloud config with MariaDB password
nextcloudpi    | Running nc-limits
nextcloudpi    | Using 2972838912 for PHP max memory
nextcloudpi    | Using 6 PHP threads
nextcloudpi    | INFO: Restoring template to default settings
nextcloudpi    | Stopping redis-server: redis-server.
nextcloudpi    | Starting redis-server: redis-server.
nextcloudpi    | Starting notify_push daemon
nextcloudpi    | Configuring Domain
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 11 set to string xx.xxx.xxx.xx
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 1 set to string 172.26.0.2
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 14 set to string 5b901702e8e8
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | 
nextcloudpi    |                                                                  
nextcloudpi    |   There are no commands defined in the "notify_push" namespace.  
nextcloudpi    |                                                                  
nextcloudpi    | 
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 6 set to string 192.168.178.15
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | 
nextcloudpi    |                                                                  
nextcloudpi    |   There are no commands defined in the "notify_push" namespace.  
nextcloudpi    |                                                                  
nextcloudpi    | 
nextcloudpi    | Init done
┌─ 🖼🖌️ 🎨♬ 🌸#️⃣ 🔮
│ ~/docker_stuffz/ncp 
└࿓❯ sudo docker exec -it nextcloudpi bash
root@5b901702e8e8:/# ncc upgrade
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
Turned on maintenance mode
Updating database schema
Updated database
Updating <federation> ...
Updated <federation> to 1.14.0
Updating <lookup_server_connector> ...
Updated <lookup_server_connector> to 1.12.0
Updating <oauth2> ...
Updated <oauth2> to 1.12.0
Updating <password_policy> ...
Updated <password_policy> to 1.14.0
Updating <files> ...
Updated <files> to 1.19.0
Updating <activity> ...
Updated <activity> to 2.16.0
Updating <circles> ...
Updated <circles> to 24.0.1
Updating <cloud_federation_api> ...
Updated <cloud_federation_api> to 1.7.0
Updating <dav> ...
Fix broken values of calendar objects

 Done
    0/0 [->--------------------------]   0%
Clean up old calendar subscriptions from deleted users that were not cleaned-up
 Done
    0/0 [----->----------------------]   0%
Updated <dav> to 1.22.0
Updating <files_sharing> ...
Updated <files_sharing> to 1.16.2
Updating <files_trashbin> ...
Updated <files_trashbin> to 1.14.0
Updating <files_versions> ...
Updated <files_versions> to 1.17.0
Updating <sharebymail> ...
Updated <sharebymail> to 1.14.0
Updating <workflowengine> ...
Updated <workflowengine> to 2.6.0
Updating <comments> ...
Updated <comments> to 1.14.0
Updating <firstrunwizard> ...
Updated <firstrunwizard> to 2.13.0
Updating <nextcloud_announcements> ...
Updated <nextcloud_announcements> to 1.13.0
Updating <notifications> ...
Updated <notifications> to 2.12.0
Updating <systemtags> ...
Updated <systemtags> to 1.14.0
Updating <theming> ...
Updated <theming> to 1.15.0
Updating <accessibility> ...
Migrate old user config
 Done
    1/1 [============================] 100%
Updated <accessibility> to 1.10.0
Updating <calendar> ...
Updated <calendar> to 3.5.0
Updating <contacts> ...
Updated <contacts> to 4.2.1
Updating <contactsinteraction> ...
Updated <contactsinteraction> to 1.5.0
Updating <dashboard> ...
Updated <dashboard> to 7.4.0
Updating <federatedfilesharing> ...
Updated <federatedfilesharing> to 1.14.0
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 2.5.0
Updating <files_rightclick> ...
Updated <files_rightclick> to 1.3.0
Updating <files_videoplayer> ...
Updated <files_videoplayer> to 1.13.0
Updating <logreader> ...
Updated <logreader> to 2.9.0
Updating <news> ...
Updated <news> to 18.1.1
Updating <notes> ...
Updated <notes> to 4.5.1
Updating <photos> ...
Updated <photos> to 1.6.0
Updating <privacy> ...
Updated <privacy> to 1.8.0
Updating <provisioning_api> ...
Updated <provisioning_api> to 1.14.0
Updating <recommendations> ...
Updated <recommendations> to 1.3.0
Updating <serverinfo> ...
Updated <serverinfo> to 1.14.0
Updating <settings> ...
Updated <settings> to 1.6.0
Updating <support> ...
Updated <support> to 1.7.0
Updating <survey_client> ...
Updated <survey_client> to 1.12.0
Updating <text> ...
Updated <text> to 3.5.1
Updating <twofactor_backupcodes> ...
Updated <twofactor_backupcodes> to 1.13.0
Updating <user_status> ...
Updated <user_status> to 1.4.0
Updating <viewer> ...
Updated <viewer> to 1.8.0
Updating <weather_status> ...
Updated <weather_status> to 1.4.0
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level
root@5b901702e8e8:/# ncp-report
<--! Paste this in GitHub report -->

<details>
<summary>NextCloudPi diagnostics</summary>

NextCloudPi version v1.50.0 NextCloudPi image NextCloudPi_docker_07-25-22 OS Debian GNU/Linux 11. 5.10.0-18-arm64 (aarch64) automount no USB devices sda datadir /data/nextcloud/data data in SD yes data filesystem ext2/ext3 data disk usage 413G/3.6T rootfs usage 413G/3.6T swapfile /dev/sda3 dbdir /data-ro/database Nextcloud check ok Nextcloud version 24.0.4.1 HTTPD service down PHP service up MariaDB service up Redis service up HPB service down Postfix service up Internet check ok public IP REMOVED SENSITIVE VALUE public IP REMOVED SENSITIVE VALUE Port check 80 closed Port check 443 closed IP REMOVED SENSITIVE VALUE Gateway 172.26.0.1 Interface eth0 certificates REMOVED SENSITIVE VALUE NAT loopback no Uptime 1:55

</details>


<details>
<summary>Nextcloud configuration</summary>

{ "system": { "passwordsalt": "REMOVED SENSITIVE VALUE", "secret": "REMOVED SENSITIVE VALUE", "trusted_domains": { "0": "localhost", "7": "nextcloudpi", "5": "nextcloudpi.local", "8": "nextcloudpi.lan", "3": "nextcloudpi", "1": "172.26.0.2", "14": "5b901702e8e8", "20": "192.168.178.15", "21": "berrybox.local", "6": "192.168.178.15" }, "datadirectory": "REMOVED SENSITIVE VALUE", "dbtype": "mysql", "version": "24.0.4.1", "overwrite.cli.url": "https://nextcloudpi/", "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", "preview_max_x": "2048", "preview_max_y": "2048", "jpeg_quality": "60", "overwriteprotocol": "https", "trusted_proxies": "REMOVED SENSITIVE VALUE", "maintenance": false, "theme": "", "loglevel": 2 } }

</details>


<details>
<summary>HTTPd logs</summary>

[Fri Sep 23 02:36:29.852701 2022] [ssl:error] [pid 108:tid 281473130434576] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 23143B52EBF7118A5B2B476430281DD5D68ED7BD / notbefore: Jul 25 20:22:10 2022 GMT / notafter: Jul 22 20:22:10 2032 GMT] [Fri Sep 23 02:36:29.852773 2022] [ssl:error] [pid 108:tid 281473130434576] AH02604: Unable to configure certificate localhost:4443:0 for stapling [Fri Sep 23 02:36:29.875933 2022] [ssl:error] [pid 109:tid 281473130434576] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 23143B52EBF7118A5B2B476430281DD5D68ED7BD / notbefore: Jul 25 20:22:10 2022 GMT / notafter: Jul 22 20:22:10 2032 GMT] [Fri Sep 23 02:36:29.876002 2022] [ssl:error] [pid 109:tid 281473130434576] AH02604: Unable to configure certificate localhost:4443:0 for stapling [Fri Sep 23 02:36:29.881325 2022] [mpm_event:notice] [pid 109:tid 281473130434576] AH00489: Apache/2.4.54 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations [Fri Sep 23 02:36:29.881445 2022] [core:notice] [pid 109:tid 281473130434576] AH00094: Command line: '/usr/sbin/apache2'

</details>


<details>
<summary>Database logs</summary>

tail: cannot open '/var/log/mysql/*.log' for reading: No such file or directory

</details>


<details>
<summary>Nextcloud logs</summary>

{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Repair::step: Repair step: Reset generated avatar flag","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Repair::step: Repair step: Keep legacy encryption enabled","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Repair::step: Repair step: Check encryption key format","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Repair::step: Repair step: Remove old dashboard app config data","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Repair::step: Repair step: Add job to cleanup the bruteforce entries","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Repair::step: Repair step: Queue a one-time job to check for user uploaded certificates","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Repair::step: Repair step: Repair DAV shares","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \OC\Repair::step: Symfony\Component\EventDispatcher\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Repair::step: Repair step: Add background job to set the lookup server share state for users","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:15+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:15+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Updater::updateEnd: Update successful","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:15+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}} {"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:15+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\OC\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}

</details>

Some ncp-report output from within the container through the process

  • After stopping and starting container
└࿓❯ sudo docker-compose logs
Attaching to nextcloudpi
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | bash: /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh: No such file or directory
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  2:01:21 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 179 ...
nextcloudpi    | 2022-09-23  2:01:21 0 [ERROR] mysqld: Can't create/write to file '/var/lib/mysql/aria_log_control' (Errcode: 13 "Permission denied")
nextcloudpi    | 2022-09-23  2:01:21 0 [ERROR] mysqld: Got error 'Can't create file' when trying to use aria control file '/var/lib/mysql/aria_log_control'
nextcloudpi    | 2022-09-23  2:01:21 0 [ERROR] Plugin 'Aria' init function returned error.
nextcloudpi    | 2022-09-23  2:01:21 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
nextcloudpi    | 2022-09-23  2:01:21 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23  2:01:21 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23  2:01:21 0 [Note] InnoDB: The first innodb_system data file 'ibdata1' did not exist. A new tablespace will be created!
nextcloudpi    | 2022-09-23  2:01:21 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23  2:01:21 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23  2:01:21 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23  2:01:21 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23  2:01:21 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23  2:01:21 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23  2:01:21 0 [Note] InnoDB: Initializing buffer pool, total size = 268435456, chunk size = 134217728
nextcloudpi    | 2022-09-23  2:01:21 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23  2:01:21 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
nextcloudpi    | 2022-09-23  2:01:21 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
nextcloudpi    | 2022-09-23  2:01:21 0 [ERROR] InnoDB: Operating system error number 13 in a file operation.
nextcloudpi    | 2022-09-23  2:01:21 0 [ERROR] InnoDB: The error means mysqld does not have the access rights to the directory.
nextcloudpi    | 2022-09-23  2:01:21 0 [ERROR] InnoDB: Cannot open datafile './ibdata1'
nextcloudpi    | 2022-09-23  2:01:21 0 [ERROR] InnoDB: Could not open or create the system tablespace. If you tried to add new data files to the system tablespace, and it failed here, you should now edit innodb_data_file_path in my.cnf back to what it was, and remove the new ibdata files InnoDB created in this failed attempt. InnoDB only wrote those files full of zeros, but did not yet use them in any way. But be careful: do not remove old data files which contain your precious data!
nextcloudpi    | 2022-09-23  2:01:21 0 [ERROR] InnoDB: Database creation was aborted with error Cannot open a file. You may need to delete the ibdata1 file before trying to start up again.
nextcloudpi    | 2022-09-23  2:01:21 0 [Note] InnoDB: Starting shutdown...
nextcloudpi    | 2022-09-23  2:01:22 0 [ERROR] Plugin 'InnoDB' init function returned error.
nextcloudpi    | 2022-09-23  2:01:22 0 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.
nextcloudpi    | 2022-09-23  2:01:22 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23  2:01:22 0 [ERROR] Could not open mysql.plugin table: "Table 'mysql.plugin' doesn't exist". Some plugins may be not loaded
nextcloudpi    | 2022-09-23  2:01:22 0 [ERROR] Failed to initialize plugins.
nextcloudpi    | 2022-09-23  2:01:22 0 [ERROR] Aborting
  • PHP version when container is back up with docker-compose up -d
root@07d3e89eb6e1:/# php -v
PHP 7.4.30 (cli) (built: Jul  7 2022 15:51:43) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.30, Copyright (c), by Zend Technologies
root@07d3e89eb6e1:/# ncp-report
NextCloudPi version  v1.48.3
NextCloudPi image    NextCloudPi_docker_07-25-22
OS                   Debian GNU/Linux 11. 5.10.0-18-arm64 (aarch64)
automount            no
USB devices          sda 
datadir              /data/nextcloud/data
data in SD           yes
data filesystem      ext2/ext3
data disk usage      412G/3.6T
rootfs usage         412G/3.6T
swapfile             /dev/sda3
dbdir                 (doesn't exist)
Nextcloud check      error
HTTPD service        up
PHP service          up
MariaDB service      down
Redis service        down
HPB service          down
Postfix service      down
Internet check       ok
public IP            ***REMOVED SENSITIVE VALUE***
public IP            ***REMOVED SENSITIVE VALUE***
Port check 80        closed
Port check 443       closed
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              172.22.0.1
Interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               1:06
  • After running ncp-update again within the container, and you can see that the database has been restored within the dbdir of ncp-report
NextCloudPi version  v1.50.0
NextCloudPi image    NextCloudPi_docker_07-25-22
OS                   Debian GNU/Linux 11. 5.10.0-18-arm64 (aarch64)
automount            no
USB devices          sda 
datadir              /data/nextcloud/data
data in SD           yes
data filesystem      ext2/ext3
data disk usage      412G/3.6T
rootfs usage         412G/3.6T
swapfile             /dev/sda3
dbdir                /data-ro/database
Nextcloud check      ok
Nextcloud version    24.0.4.1
HTTPD service        down
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
Internet check       ok
public IP            ***REMOVED SENSITIVE VALUE***
public IP            ***REMOVED SENSITIVE VALUE***
Port check 80        closed
Port check 443       closed
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              172.22.0.1
Interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               1:15
  • Restarting the container after ncp-update with docker-compose restart nextcloudpi fixes mariadb so mysqld is active and waiting for connections again
`docker-compose logs`
nextcloudpi    | stopping Cron...
nextcloudpi    | stopping Redis...
nextcloudpi    | stopping Postfix...
nextcloudpi    | stopping HPB...
nextcloudpi    | 2022-09-23  3:05:03 11 [Warning] Aborted connection 11 to db: 'nextcloud' user: 'ncadmin' host: 'localhost' (Got an error reading communication packets)
nextcloudpi    | stopping logs...
nextcloudpi    | tail: no process found
nextcloudpi    | Stopping apache
nextcloudpi    | Stopping PHP-fpm
nextcloudpi    | Stopping mariaDB
nextcloudpi    | 2022-09-23  3:05:04 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
nextcloudpi    | 2022-09-23  3:05:04 0 [Note] Event Scheduler: Purging the queue. 0 events
nextcloudpi    | 2022-09-23  3:05:04 0 [Note] InnoDB: FTS optimize thread exiting.
nextcloudpi    | 2022-09-23  3:05:05 0 [Note] InnoDB: Starting shutdown...
nextcloudpi    | 2022-09-23  3:05:05 0 [Note] InnoDB: Dumping buffer pool(s) to /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  3:05:05 0 [Note] InnoDB: Buffer pool(s) dump completed at 220923  3:05:05
nextcloudpi    | 2022-09-23  3:05:06 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
nextcloudpi    | 2022-09-23  3:05:06 0 [Note] InnoDB: Shutdown completed; log sequence number 1759593; transaction id 3506
nextcloudpi    | 2022-09-23  3:05:06 0 [Note] mysqld: Shutdown complete
nextcloudpi    | 
nextcloudpi    | LAMP cleanup complete
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | httpd (pid 109) already running
nextcloudpi    | INFO: Docker build detected.
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 144 ...
nextcloudpi    | 2022-09-23  3:05:11 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23  3:05:11 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Initializing buffer pool, total size = 1073741824, chunk size = 134217728
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: 128 rollback segments are active.
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: 10.5.15 started; log sequence number 1759593; transaction id 3507
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Loading buffer pool(s) from /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] Server socket created on IP: '127.0.0.1'.
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Buffer pool(s) load completed at 220923  3:05:11
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] Reading of all Master_info entries succeeded
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] Added new Master_info '' to hash table
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] mysqld: ready for connections.
nextcloudpi    | Version: '10.5.15-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
nextcloudpi    | Starting Redis
nextcloudpi    | Starting Cron
nextcloudpi    | Starting Postfix
nextcloudpi    | Provisioning
nextcloudpi    | Provisioning Redis password
nextcloudpi    | Updating NextCloud config with Redis password
nextcloudpi    | Provisioning MariaDB password
nextcloudpi    | Updating NextCloud config with MariaDB password
nextcloudpi    | Running nc-limits
nextcloudpi    | Using 2972838912 for PHP max memory
  • ncp-report after a container restart, where the container is back to PHP version 7.4
`ncp-report` logs
NextCloudPi diagnostics

NextCloudPi version  v1.50.0
NextCloudPi image    NextCloudPi_docker_07-25-22
OS                   Debian GNU/Linux 11. 5.10.0-18-arm64 (aarch64)
automount            no
USB devices          sda 
datadir              /data/nextcloud/data
data in SD           yes
data filesystem      ext2/ext3
data disk usage      413G/3.6T
rootfs usage         413G/3.6T
swapfile             /dev/sda3
dbdir                /data-ro/database
Nextcloud check      ok
Nextcloud version    24.0.4.1
HTTPD service        down
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
Internet check       ok
public IP            ***REMOVED SENSITIVE VALUE***
public IP            ***REMOVED SENSITIVE VALUE***
Port check 80        closed
Port check 443       closed
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              172.26.0.1
Interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               2:09

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "7": "nextcloudpi",
            "5": "nextcloudpi.local",
            "8": "nextcloudpi.lan",
            "3": "nextcloudpi",
            "1": "172.26.0.2",
            "14": "5b901702e8e8",
            "20": "192.168.178.15",
            "21": "berrybox.local",
            "6": "192.168.178.15"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "24.0.4.1",
        "overwrite.cli.url": "https:\/\/nextcloudpi\/",
        "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***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***",
        "maintenance": false,
        "theme": "",
        "loglevel": 2
    }
}

HTTPd logs

[Fri Sep 23 02:36:29.852701 2022] [ssl:error] [pid 108:tid 281473130434576] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 23143B52EBF7118A5B2B476430281DD5D68ED7BD / notbefore: Jul 25 20:22:10 2022 GMT / notafter: Jul 22 20:22:10 2032 GMT]
[Fri Sep 23 02:36:29.852773 2022] [ssl:error] [pid 108:tid 281473130434576] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Fri Sep 23 02:36:29.875933 2022] [ssl:error] [pid 109:tid 281473130434576] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 23143B52EBF7118A5B2B476430281DD5D68ED7BD / notbefore: Jul 25 20:22:10 2022 GMT / notafter: Jul 22 20:22:10 2032 GMT]
[Fri Sep 23 02:36:29.876002 2022] [ssl:error] [pid 109:tid 281473130434576] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Fri Sep 23 02:36:29.881325 2022] [mpm_event:notice] [pid 109:tid 281473130434576] AH00489: Apache/2.4.54 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Fri Sep 23 02:36:29.881445 2022] [core:notice] [pid 109:tid 281473130434576] AH00094: Command line: '/usr/sbin/apache2'

Database logs

tail: cannot open '/var/log/mysql/*.log' for reading: No such file or directory

Nextcloud logs

{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Reset generated avatar flag","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Keep legacy encryption enabled","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Check encryption key format","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Remove old dashboard app config data","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add job to cleanup the bruteforce entries","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Queue a one-time job to check for user uploaded certificates","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Repair DAV shares","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add background job to set the lookup server share state for users","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:07+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:15+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:15+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:15+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"CXdqqBnRGEI6fEy3ycXF","level":1,"time":"2022-09-23T02:53:15+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}

ZendaiOwl avatar Sep 23 '22 00:09 ZendaiOwl

Also found unresolved environment variable in /etc/apache2/apache2.conf

Ran export APACHE_RUN_DIR="/var/run/apache2" prior

root@5b901702e8e8:/# apache2
[Fri Sep 23 03:29:18.283924 2022] [core:warn] [pid 5766] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Fri Sep 23 03:29:18.284082 2022] [core:warn] [pid 5766] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Fri Sep 23 03:29:18.284096 2022] [core:warn] [pid 5766] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Fri Sep 23 03:29:18.284125 2022] [core:warn] [pid 5766] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Fri Sep 23 03:29:18.301726 2022] [core:warn] [pid 5766:tid 281473781760016] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
cat `/etc/apache2/apache2.conf`
root@5b901702e8e8:/# cat /etc/apache2/apache2.conf
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#	/etc/apache2/
#	|-- apache2.conf
#	|	`--  ports.conf
#	|-- mods-enabled
#	|	|-- *.load
#	|	`-- *.conf
#	|-- conf-enabled
#	|	`-- *.conf
# 	`-- sites-enabled
#	 	`-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
#   together by including all remaining configuration files when starting up the
#   web server.
#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, or virtual host configurations,
#   respectively.
#
#   They are activated by symlinking available configuration files from their
#   respective *-available/ counterparts. These should be managed by using our
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
#   the default configuration, apache2 needs to be started/stopped with
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
#   work with the default configuration.


# Global configuration
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#Mutex file:${APACHE_LOCK_DIR} default

#
# The directory where shm and other runtime files will be stored.
#

DefaultRuntimeDir ${APACHE_RUN_DIR}

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5


# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

# Include list of ports to listen on
Include ports.conf


# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
	Options FollowSymLinks
	AllowOverride None
	Require all denied
</Directory>

<Directory /usr/share>
	AllowOverride None
	Require all granted
</Directory>

<Directory /var/www/>
	Options Indexes FollowSymLinks
	AllowOverride None
	Require all granted
</Directory>

#<Directory /srv/>
#	Options Indexes FollowSymLinks
#	AllowOverride None
#	Require all granted
#</Directory>




# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
	Require all denied
</FilesMatch>


#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
ServerName localhost
<IfModule mod_security2.c>
  SecServerSignature " "
</IfModule>
root@5b901702e8e8:/# service apache2 restart
Restarting Apache httpd web server: apache2 failed!
root@5b901702e8e8:/# service apache2 stop   
Stopping Apache httpd web server: apache2.
root@5b901702e8e8:/# service apache2 start
Starting Apache httpd web server: apache2.
root@5b901702e8e8:/# apache2
[Fri Sep 23 03:22:53.233158 2022] [core:warn] [pid 4808] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
root@5b901702e8e8:/# apache2ctl
Usage: /usr/sbin/apache2ctl start|stop|restart|graceful|graceful-stop|configtest|status|fullstatus|help
       /usr/sbin/apache2ctl <apache2 args>
       /usr/sbin/apache2ctl -h            (for help on <apache2 args>)
root@5b901702e8e8:/# apache2ctl restart
root@5b901702e8e8:/# apache2
[Fri Sep 23 03:23:46.645630 2022] [core:warn] [pid 4922] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
root@5b901702e8e8:/# sed -i 's|ServerRoot "/etc/apache2"|#ServerRoot "/etc/apache2"|g' /etc/apache2/apache2.conf
root@5b901702e8e8:/# a2dismod php7.4
ERROR: Module php7.4 does not exist!
root@5b901702e8e8:/# a2enmod php8.1
ERROR: Module php8.1 does not exist!
root@5b901702e8e8:/# a2enmod php8.0
ERROR: Module php8.0 does not exist!
root@5b901702e8e8:/# a2enmod php7.4
ERROR: Module php7.4 does not exist!
root@5b901702e8e8:/# a2enmod php   
ERROR: Module php does not exist!
root@5b901702e8e8:/# apache2
apache2     apache2ctl  
root@5b901702e8e8:/# apache2 --help
[Fri Sep 23 03:24:45.258762 2022] [core:warn] [pid 5061] AH00111: Config variable ${APACHE_RUN_DIR} is not defined
apache2: Syntax error on line 80 of /etc/apache2/apache2.conf: DefaultRuntimeDir must be a valid directory, absolute or relative to ServerRoot
root@5b901702e8e8:/# apache2 a2enmod php7.4
Usage: apache2 [-D name] [-d directory] [-f file]
               [-C "directive"] [-c "directive"]
               [-k start|restart|graceful|graceful-stop|stop]
               [-v] [-V] [-h] [-l] [-L] [-t] [-T] [-S] [-X]
Options:
  -D name            : define a name for use in <IfDefine name> directives
  -d directory       : specify an alternate initial ServerRoot
  -f file            : specify an alternate ServerConfigFile
  -C "directive"     : process directive before reading config files
  -c "directive"     : process directive after reading config files
  -e level           : show startup errors of level (see LogLevel)
  -E file            : log startup errors to file
  -v                 : show version number
  -V                 : show compile settings
  -h                 : list available command line options (this page)
  -l                 : list compiled in modules
  -L                 : list available configuration directives
  -t -D DUMP_VHOSTS  : show parsed vhost settings
  -t -D DUMP_RUN_CFG : show parsed run settings
  -S                 : a synonym for -t -D DUMP_VHOSTS -D DUMP_RUN_CFG
  -t -D DUMP_MODULES : show all loaded modules 
  -M                 : a synonym for -t -D DUMP_MODULES
  -t -D DUMP_INCLUDES: show all included configuration files
  -t                 : run syntax check for config files
  -T                 : start without DocumentRoot(s) check
  -X                 : debug mode (only one worker, do not detach)
root@5b901702e8e8:/# export APACHE_RUN_DIR="/var/run/apache2"
root@5b901702e8e8:/# service apache2 start
Starting Apache httpd web server: apache2.
root@5b901702e8e8:/# service apache2 status
apache2 is running.
root@5b901702e8e8:/# apache2
[Fri Sep 23 03:25:32.614274 2022] [core:warn] [pid 5314] AH00111: Config variable ${APACHE_PID_FILE} is not defined
[Fri Sep 23 03:25:32.614434 2022] [core:warn] [pid 5314] AH00111: Config variable ${APACHE_RUN_USER} is not defined
[Fri Sep 23 03:25:32.614449 2022] [core:warn] [pid 5314] AH00111: Config variable ${APACHE_RUN_GROUP} is not defined
[Fri Sep 23 03:25:32.614478 2022] [core:warn] [pid 5314] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
[Fri Sep 23 03:25:32.631964 2022] [core:warn] [pid 5314:tid 281473110872080] AH00111: Config variable ${APACHE_LOG_DIR} is not defined
AH00543: apache2: bad user name ${APACHE_RUN_USER}
root@5b901702e8e8:/# cat /etc/apache2/apache2.conf
# This is the main Apache server configuration file.  It contains the
# configuration directives that give the server its instructions.
# See http://httpd.apache.org/docs/2.4/ for detailed information about
# the directives and /usr/share/doc/apache2/README.Debian about Debian specific
# hints.
#
#
# Summary of how the Apache 2 configuration works in Debian:
# The Apache 2 web server configuration in Debian is quite different to
# upstream's suggested way to configure the web server. This is because Debian's
# default Apache2 installation attempts to make adding and removing modules,
# virtual hosts, and extra configuration directives as flexible as possible, in
# order to make automating the changes and administering the server as easy as
# possible.

# It is split into several files forming the configuration hierarchy outlined
# below, all located in the /etc/apache2/ directory:
#
#	/etc/apache2/
#	|-- apache2.conf
#	|	`--  ports.conf
#	|-- mods-enabled
#	|	|-- *.load
#	|	`-- *.conf
#	|-- conf-enabled
#	|	`-- *.conf
# 	`-- sites-enabled
#	 	`-- *.conf
#
#
# * apache2.conf is the main configuration file (this file). It puts the pieces
#   together by including all remaining configuration files when starting up the
#   web server.
#
# * ports.conf is always included from the main configuration file. It is
#   supposed to determine listening ports for incoming connections which can be
#   customized anytime.
#
# * Configuration files in the mods-enabled/, conf-enabled/ and sites-enabled/
#   directories contain particular configuration snippets which manage modules,
#   global configuration fragments, or virtual host configurations,
#   respectively.
#
#   They are activated by symlinking available configuration files from their
#   respective *-available/ counterparts. These should be managed by using our
#   helpers a2enmod/a2dismod, a2ensite/a2dissite and a2enconf/a2disconf. See
#   their respective man pages for detailed information.
#
# * The binary is called apache2. Due to the use of environment variables, in
#   the default configuration, apache2 needs to be started/stopped with
#   /etc/init.d/apache2 or apache2ctl. Calling /usr/bin/apache2 directly will not
#   work with the default configuration.


# Global configuration
#

#
# ServerRoot: The top of the directory tree under which the server's
# configuration, error, and log files are kept.
#
# NOTE!  If you intend to place this on an NFS (or otherwise network)
# mounted filesystem then please read the Mutex documentation (available
# at <URL:http://httpd.apache.org/docs/2.4/mod/core.html#mutex>);
# you will save yourself a lot of trouble.
#
# Do NOT add a slash at the end of the directory path.
#
#ServerRoot "/etc/apache2"

#
# The accept serialization lock file MUST BE STORED ON A LOCAL DISK.
#
#Mutex file:${APACHE_LOCK_DIR} default

#
# The directory where shm and other runtime files will be stored.
#

DefaultRuntimeDir ${APACHE_RUN_DIR}

#
# PidFile: The file in which the server should record its process
# identification number when it starts.
# This needs to be set in /etc/apache2/envvars
#
PidFile ${APACHE_PID_FILE}

#
# Timeout: The number of seconds before receives and sends time out.
#
Timeout 300

#
# KeepAlive: Whether or not to allow persistent connections (more than
# one request per connection). Set to "Off" to deactivate.
#
KeepAlive On

#
# MaxKeepAliveRequests: The maximum number of requests to allow
# during a persistent connection. Set to 0 to allow an unlimited amount.
# We recommend you leave this number high, for maximum performance.
#
MaxKeepAliveRequests 100

#
# KeepAliveTimeout: Number of seconds to wait for the next request from the
# same client on the same connection.
#
KeepAliveTimeout 5


# These need to be set in /etc/apache2/envvars
User ${APACHE_RUN_USER}
Group ${APACHE_RUN_GROUP}

#
# HostnameLookups: Log the names of clients or just their IP addresses
# e.g., www.apache.org (on) or 204.62.129.132 (off).
# The default is off because it'd be overall better for the net if people
# had to knowingly turn this feature on, since enabling it means that
# each client request will result in AT LEAST one lookup request to the
# nameserver.
#
HostnameLookups Off

# ErrorLog: The location of the error log file.
# If you do not specify an ErrorLog directive within a <VirtualHost>
# container, error messages relating to that virtual host will be
# logged here.  If you *do* define an error logfile for a <VirtualHost>
# container, that host's errors will be logged there and not here.
#
ErrorLog ${APACHE_LOG_DIR}/error.log

#
# LogLevel: Control the severity of messages logged to the error_log.
# Available values: trace8, ..., trace1, debug, info, notice, warn,
# error, crit, alert, emerg.
# It is also possible to configure the log level for particular modules, e.g.
# "LogLevel info ssl:warn"
#
LogLevel warn

# Include module configuration:
IncludeOptional mods-enabled/*.load
IncludeOptional mods-enabled/*.conf

# Include list of ports to listen on
Include ports.conf


# Sets the default security model of the Apache2 HTTPD server. It does
# not allow access to the root filesystem outside of /usr/share and /var/www.
# The former is used by web applications packaged in Debian,
# the latter may be used for local directories served by the web server. If
# your system is serving content from a sub-directory in /srv you must allow
# access here, or in any related virtual host.
<Directory />
	Options FollowSymLinks
	AllowOverride None
	Require all denied
</Directory>

<Directory /usr/share>
	AllowOverride None
	Require all granted
</Directory>

<Directory /var/www/>
	Options Indexes FollowSymLinks
	AllowOverride None
	Require all granted
</Directory>

#<Directory /srv/>
#	Options Indexes FollowSymLinks
#	AllowOverride None
#	Require all granted
#</Directory>




# AccessFileName: The name of the file to look for in each directory
# for additional configuration directives.  See also the AllowOverride
# directive.
#
AccessFileName .htaccess

#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
<FilesMatch "^\.ht">
	Require all denied
</FilesMatch>


#
# The following directives define some format nicknames for use with
# a CustomLog directive.
#
# These deviate from the Common Log Format definitions in that they use %O
# (the actual bytes sent including headers) instead of %b (the size of the
# requested file), because the latter makes it impossible to detect partial
# requests.
#
# Note that the use of %{X-Forwarded-For}i instead of %h is not recommended.
# Use mod_remoteip instead.
#
LogFormat "%v:%p %h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
LogFormat "%h %l %u %t \"%r\" %>s %O \"%{Referer}i\" \"%{User-Agent}i\"" combined
LogFormat "%h %l %u %t \"%r\" %>s %O" common
LogFormat "%{Referer}i -> %U" referer
LogFormat "%{User-agent}i" agent

# Include of directories ignores editors' and dpkg's backup files,
# see README.Debian for details.

# Include generic snippets of statements
IncludeOptional conf-enabled/*.conf

# Include the virtual host configurations:
IncludeOptional sites-enabled/*.conf

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
ServerName localhost
<IfModule mod_security2.c>
  SecServerSignature " "
</IfModule>
  • exporting the missing environment variables
Export missing ENVVAR
export APACHE_RUN_USER=www-data
export APACHE_RUN_GROUP=www-data
export APACHE_LOG_DIR=/var/log/apache2
export APACHE_LOCK_DIR=/var/lock/apache2
export APACHE_PID_FILE=/var/run/apache2.pid
export APACHE_RUN_DIR=/var/run/apache2
  • Logs after restarting when variables have been exported
`sudo docker-compose logs`

└࿓❯ sudo docker-compose logs
Attaching to nextcloudpi
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | bash: /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh: No such file or directory
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  2:36:30 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 220 ...
nextcloudpi    | 2022-09-23  2:36:30 0 [Warning] Can't create test file /var/lib/mysql/5b901702e8e8.lower-test
nextcloudpi    | mysqld: Can't change dir to '/var/lib/mysql/' (Errcode: 2 "No such file or directory")
nextcloudpi    | 2022-09-23  2:36:30 0 [ERROR] Aborting
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | httpd (pid 109) already running
nextcloudpi    | INFO: Docker build detected.
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  2:48:28 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 139 ...
nextcloudpi    | 2022-09-23  2:48:29 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23  2:48:29 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Initializing buffer pool, total size = 268435456, chunk size = 134217728
nextcloudpi    | 2022-09-23  2:48:29 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] InnoDB: 128 rollback segments are active.
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] InnoDB: 10.5.15 started; log sequence number 1303516; transaction id 1922
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] InnoDB: Loading buffer pool(s) from /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  2:48:32 0 [Note] Server socket created on IP: '127.0.0.1'.
nextcloudpi    | 2022-09-23  2:48:37 0 [Note] Reading of all Master_info entries succeeded
nextcloudpi    | 2022-09-23  2:48:37 0 [Note] Added new Master_info '' to hash table
nextcloudpi    | 2022-09-23  2:48:37 0 [Note] mysqld: ready for connections.
nextcloudpi    | Version: '10.5.15-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
nextcloudpi    | Starting Redis
nextcloudpi    | Starting Cron
nextcloudpi    | Starting Postfix
nextcloudpi    | postsuper: Renamed to match inode number: 1 message
nextcloudpi    | postsuper: warning: QUEUE FILE NAMES WERE CHANGED TO MATCH INODE NUMBERS
nextcloudpi    | Provisioning
nextcloudpi    | Provisioning Redis password
nextcloudpi    | Updating NextCloud config with Redis password
nextcloudpi    | Provisioning MariaDB password
nextcloudpi    | Updating NextCloud config with MariaDB password
nextcloudpi    | Running nc-limits
nextcloudpi    | 2022-09-23  2:48:43 0 [Note] InnoDB: Buffer pool(s) load completed at 220923  2:48:43
nextcloudpi    | Using 2972838912 for PHP max memory
nextcloudpi    | Using 6 PHP threads
nextcloudpi    | INFO: Restoring template to default settings
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] Event Scheduler: Purging the queue. 0 events
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] InnoDB: FTS optimize thread exiting.
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] InnoDB: Starting shutdown...
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] InnoDB: Dumping buffer pool(s) to /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] InnoDB: Buffer pool(s) dump completed at 220923  2:48:48
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] InnoDB: Shutdown completed; log sequence number 1303528; transaction id 1924
nextcloudpi    | 2022-09-23  2:48:48 0 [Note] mysqld: Shutdown complete
nextcloudpi    | 
nextcloudpi    | Stopping MariaDB database server: mariadbd.
nextcloudpi    | Starting MariaDB database server: mariadbd.
nextcloudpi    | Clearing opcache...
nextcloudpi    | Done.
nextcloudpi    | Stopping redis-server: redis-server.
nextcloudpi    | Starting redis-server: redis-server.
nextcloudpi    | Starting notify_push daemon
nextcloudpi    | Configuring Domain
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 11 set to string 
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 1 set to string 172.26.0.2
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 14 set to string 5b901702e8e8
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | 
nextcloudpi    |                                                                  
nextcloudpi    |   There are no commands defined in the "notify_push" namespace.  
nextcloudpi    |                                                                  
nextcloudpi    | 
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 6 set to string 192.168.178.15
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | 
nextcloudpi    |                                                                  
nextcloudpi    |   There are no commands defined in the "notify_push" namespace.  
nextcloudpi    |                                                                  
nextcloudpi    | 
nextcloudpi    | Init done
nextcloudpi    | stopping Cron...
nextcloudpi    | stopping Redis...
nextcloudpi    | stopping Postfix...
nextcloudpi    | stopping HPB...
nextcloudpi    | stopping logs...
nextcloudpi    | tail: no process found
nextcloudpi    | Stopping apache
nextcloudpi    | httpd (pid 109?) not running
nextcloudpi    | Stopping PHP-fpm
nextcloudpi    | Stopping mariaDB
nextcloudpi    | LAMP cleanup complete
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | httpd (pid 109) already running
nextcloudpi    | /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh: line 1: $'\E[200~#!': command not found
nextcloudpi    | INFO: Docker build detected.
nextcloudpi    | /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh: line 28: warning: here-document at line 25 delimited by end-of-file (wanted `EOF')
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 144 ...
nextcloudpi    | 2022-09-23  2:50:21 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23  2:50:21 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Initializing buffer pool, total size = 1073741824, chunk size = 134217728
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: 128 rollback segments are active.
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: 10.5.15 started; log sequence number 1303540; transaction id 1922
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] InnoDB: Loading buffer pool(s) from /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  2:50:21 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23  2:50:21 0 [ERROR] mysqld: unknown option '--EOF~'
nextcloudpi    | 2022-09-23  2:50:21 0 [ERROR] Aborting
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | httpd (pid 109) already running
nextcloudpi    | INFO: Docker build detected.
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 143 ...
nextcloudpi    | 2022-09-23  2:51:53 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23  2:51:53 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Initializing buffer pool, total size = 1073741824, chunk size = 134217728
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: 128 rollback segments are active.
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: 10.5.15 started; log sequence number 1303568; transaction id 1922
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Loading buffer pool(s) from /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] Server socket created on IP: '127.0.0.1'.
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] InnoDB: Buffer pool(s) load completed at 220923  2:51:53
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] Reading of all Master_info entries succeeded
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] Added new Master_info '' to hash table
nextcloudpi    | 2022-09-23  2:51:53 0 [Note] mysqld: ready for connections.
nextcloudpi    | Version: '10.5.15-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
nextcloudpi    | Starting Redis
nextcloudpi    | Starting Cron
nextcloudpi    | Starting Postfix
nextcloudpi    | Provisioning
nextcloudpi    | Provisioning Redis password
nextcloudpi    | Updating NextCloud config with Redis password
nextcloudpi    | Provisioning MariaDB password
nextcloudpi    | Updating NextCloud config with MariaDB password
nextcloudpi    | Running nc-limits
nextcloudpi    | Using 2972838912 for PHP max memory
nextcloudpi    | Using 6 PHP threads
nextcloudpi    | INFO: Restoring template to default settings
nextcloudpi    | Stopping redis-server: redis-server.
nextcloudpi    | Starting redis-server: redis-server.
nextcloudpi    | Starting notify_push daemon
nextcloudpi    | Configuring Domain
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 11 set to string 
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 1 set to string 172.26.0.2
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 14 set to string 5b901702e8e8
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | 
nextcloudpi    |                                                                  
nextcloudpi    |   There are no commands defined in the "notify_push" namespace.  
nextcloudpi    |                                                                  
nextcloudpi    | 
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | System config value trusted_domains => 6 set to string 192.168.178.15
nextcloudpi    | Nextcloud or one of the apps require upgrade - only a limited number of commands are available
nextcloudpi    | You may use your browser or the occ upgrade command to do the upgrade
nextcloudpi    | 
nextcloudpi    |                                                                  
nextcloudpi    |   There are no commands defined in the "notify_push" namespace.  
nextcloudpi    |                                                                  
nextcloudpi    | 
nextcloudpi    | Init done
nextcloudpi    | stopping Cron...
nextcloudpi    | stopping Redis...
nextcloudpi    | stopping Postfix...
nextcloudpi    | stopping HPB...
nextcloudpi    | 2022-09-23  3:05:03 11 [Warning] Aborted connection 11 to db: 'nextcloud' user: 'ncadmin' host: 'localhost' (Got an error reading communication packets)
nextcloudpi    | stopping logs...
nextcloudpi    | tail: no process found
nextcloudpi    | Stopping apache
nextcloudpi    | Stopping PHP-fpm
nextcloudpi    | Stopping mariaDB
nextcloudpi    | 2022-09-23  3:05:04 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
nextcloudpi    | 2022-09-23  3:05:04 0 [Note] Event Scheduler: Purging the queue. 0 events
nextcloudpi    | 2022-09-23  3:05:04 0 [Note] InnoDB: FTS optimize thread exiting.
nextcloudpi    | 2022-09-23  3:05:05 0 [Note] InnoDB: Starting shutdown...
nextcloudpi    | 2022-09-23  3:05:05 0 [Note] InnoDB: Dumping buffer pool(s) to /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  3:05:05 0 [Note] InnoDB: Buffer pool(s) dump completed at 220923  3:05:05
nextcloudpi    | 2022-09-23  3:05:06 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
nextcloudpi    | 2022-09-23  3:05:06 0 [Note] InnoDB: Shutdown completed; log sequence number 1759593; transaction id 3506
nextcloudpi    | 2022-09-23  3:05:06 0 [Note] mysqld: Shutdown complete
nextcloudpi    | 
nextcloudpi    | LAMP cleanup complete
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | httpd (pid 109) already running
nextcloudpi    | INFO: Docker build detected.
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 144 ...
nextcloudpi    | 2022-09-23  3:05:11 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23  3:05:11 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Initializing buffer pool, total size = 1073741824, chunk size = 134217728
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: 128 rollback segments are active.
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: 10.5.15 started; log sequence number 1759593; transaction id 3507
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Loading buffer pool(s) from /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] Server socket created on IP: '127.0.0.1'.
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] InnoDB: Buffer pool(s) load completed at 220923  3:05:11
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] Reading of all Master_info entries succeeded
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] Added new Master_info '' to hash table
nextcloudpi    | 2022-09-23  3:05:11 0 [Note] mysqld: ready for connections.
nextcloudpi    | Version: '10.5.15-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
nextcloudpi    | Starting Redis
nextcloudpi    | Starting Cron
nextcloudpi    | Starting Postfix
nextcloudpi    | Provisioning
nextcloudpi    | Provisioning Redis password
nextcloudpi    | Updating NextCloud config with Redis password
nextcloudpi    | Provisioning MariaDB password
nextcloudpi    | Updating NextCloud config with MariaDB password
nextcloudpi    | Running nc-limits
nextcloudpi    | Using 2972838912 for PHP max memory
nextcloudpi    | Using 6 PHP threads
nextcloudpi    | INFO: Restoring template to default settings
nextcloudpi    | Stopping redis-server: redis-server.
nextcloudpi    | Starting redis-server: redis-server.
nextcloudpi    | Starting notify_push daemon
nextcloudpi    | Configuring Domain
nextcloudpi    | System config value trusted_domains => 11 set to string 
nextcloudpi    | System config value trusted_domains => 1 set to string 172.26.0.2
nextcloudpi    | System config value trusted_domains => 14 set to string 5b901702e8e8
nextcloudpi    | System config value trusted_domains => 6 set to string 192.168.178.15
nextcloudpi    | ✓ redis is configured
nextcloudpi    | 🗴 can't connect to push server: cURL error 35: OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to 192.168.178.15:443  (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://192.168.178.15/push/test/cookie
nextcloudpi    | Init done
nextcloudpi    | stopping Cron...
nextcloudpi    | stopping Redis...
nextcloudpi    | stopping Postfix...
nextcloudpi    | stopping HPB...
nextcloudpi    | stopping logs...
nextcloudpi    | tail: no process found
nextcloudpi    | Stopping apache
nextcloudpi    | Stopping PHP-fpm
nextcloudpi    | Stopping mariaDB
nextcloudpi    | 2022-09-23  3:46:57 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
nextcloudpi    | 2022-09-23  3:46:57 0 [Note] Event Scheduler: Purging the queue. 0 events
nextcloudpi    | 2022-09-23  3:46:57 0 [Note] InnoDB: FTS optimize thread exiting.
nextcloudpi    | 2022-09-23  3:46:57 0 [Note] InnoDB: Starting shutdown...
nextcloudpi    | 2022-09-23  3:46:57 0 [Note] InnoDB: Dumping buffer pool(s) to /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  3:46:57 0 [Note] InnoDB: Buffer pool(s) dump completed at 220923  3:46:57
nextcloudpi    | 2022-09-23  3:46:58 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
nextcloudpi    | 2022-09-23  3:46:58 0 [Note] InnoDB: Shutdown completed; log sequence number 2310102; transaction id 5630
nextcloudpi    | 2022-09-23  3:46:58 0 [Note] mysqld: Shutdown complete
nextcloudpi    | 
nextcloudpi    | LAMP cleanup complete
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | INFO: Docker build detected.
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 250 ...
nextcloudpi    | 2022-09-23  3:47:04 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23  3:47:04 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: Initializing buffer pool, total size = 1073741824, chunk size = 134217728
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: 128 rollback segments are active.
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: 10.5.15 started; log sequence number 2310102; transaction id 5632
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: Loading buffer pool(s) from /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] InnoDB: Buffer pool(s) load completed at 220923  3:47:04
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] Server socket created on IP: '127.0.0.1'.
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] Reading of all Master_info entries succeeded
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] Added new Master_info '' to hash table
nextcloudpi    | 2022-09-23  3:47:04 0 [Note] mysqld: ready for connections.
nextcloudpi    | Version: '10.5.15-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
nextcloudpi    | Starting Redis
nextcloudpi    | Starting Cron
nextcloudpi    | Starting Postfix
nextcloudpi    | Provisioning
nextcloudpi    | Provisioning Redis password
nextcloudpi    | Updating NextCloud config with Redis password
nextcloudpi    | Provisioning MariaDB password
nextcloudpi    | Updating NextCloud config with MariaDB password
nextcloudpi    | Running nc-limits
nextcloudpi    | Using 2972838912 for PHP max memory
nextcloudpi    | Using 6 PHP threads
nextcloudpi    | INFO: Restoring template to default settings
nextcloudpi    | Stopping redis-server: redis-server.
nextcloudpi    | Starting redis-server: redis-server.
nextcloudpi    | Starting notify_push daemon
nextcloudpi    | Configuring Domain
nextcloudpi    | System config value trusted_domains => 11 set to string
nextcloudpi    | System config value trusted_domains => 1 set to string 172.26.0.2
nextcloudpi    | System config value trusted_domains => 14 set to string 5b901702e8e8
nextcloudpi    | System config value trusted_domains => 6 set to string 192.168.178.15
nextcloudpi    | ✓ redis is configured
nextcloudpi    | ✓ push server is receiving redis messages
nextcloudpi    | ✓ push server can load mount info from database
nextcloudpi    | 🗴 push server can't connect to the Nextcloud server
nextcloudpi    |   Invalid response when getting test cookie
nextcloudpi    | Init done
nextcloudpi    | stopping Cron...
nextcloudpi    | stopping Redis...
nextcloudpi    | stopping Postfix...
nextcloudpi    | stopping HPB...
nextcloudpi    | 2022-09-23  3:48:26 11 [Warning] Aborted connection 11 to db: 'nextcloud' user: 'ncadmin' host: 'localhost' (Got an error reading communication packets)
nextcloudpi    | stopping logs...
nextcloudpi    | tail: no process found
nextcloudpi    | Stopping apache
nextcloudpi    | Stopping PHP-fpm
nextcloudpi    | Stopping mariaDB
nextcloudpi    | 2022-09-23  3:48:27 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
nextcloudpi    | 2022-09-23  3:48:27 0 [Note] Event Scheduler: Purging the queue. 0 events
nextcloudpi    | 2022-09-23  3:48:27 0 [Note] InnoDB: FTS optimize thread exiting.
nextcloudpi    | 2022-09-23  3:48:27 0 [Note] InnoDB: Starting shutdown...
nextcloudpi    | 2022-09-23  3:48:27 0 [Note] InnoDB: Dumping buffer pool(s) to /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  3:48:27 0 [Note] InnoDB: Buffer pool(s) dump completed at 220923  3:48:27
nextcloudpi    | 2022-09-23  3:48:28 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
nextcloudpi    | 2022-09-23  3:48:28 0 [Note] InnoDB: Shutdown completed; log sequence number 2310639; transaction id 5641
nextcloudpi    | 2022-09-23  3:48:28 0 [Note] mysqld: Shutdown complete
nextcloudpi    | 
nextcloudpi    | LAMP cleanup complete
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | INFO: Docker build detected.
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 250 ...
nextcloudpi    | 2022-09-23  3:48:33 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23  3:48:33 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: Initializing buffer pool, total size = 1073741824, chunk size = 134217728
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: 128 rollback segments are active.
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: 10.5.15 started; log sequence number 2310639; transaction id 5642
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: Loading buffer pool(s) from /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] Server socket created on IP: '127.0.0.1'.
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] InnoDB: Buffer pool(s) load completed at 220923  3:48:33
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] Reading of all Master_info entries succeeded
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] Added new Master_info '' to hash table
nextcloudpi    | 2022-09-23  3:48:33 0 [Note] mysqld: ready for connections.
nextcloudpi    | Version: '10.5.15-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
nextcloudpi    | Starting Redis
nextcloudpi    | Starting Cron
nextcloudpi    | Starting Postfix
nextcloudpi    | Provisioning
nextcloudpi    | Provisioning Redis password
nextcloudpi    | Updating NextCloud config with Redis password
nextcloudpi    | Provisioning MariaDB password
nextcloudpi    | Updating NextCloud config with MariaDB password
nextcloudpi    | Running nc-limits
nextcloudpi    | Using 2972838912 for PHP max memory
nextcloudpi    | Using 6 PHP threads
nextcloudpi    | INFO: Restoring template to default settings
nextcloudpi    | Stopping redis-server: redis-server.
nextcloudpi    | Starting redis-server: redis-server.
nextcloudpi    | Starting notify_push daemon
nextcloudpi    | Configuring Domain
nextcloudpi    | System config value trusted_domains => 11 set to string 
nextcloudpi    | System config value trusted_domains => 1 set to string 172.26.0.2
nextcloudpi    | System config value trusted_domains => 14 set to string 5b901702e8e8
nextcloudpi    | System config value trusted_domains => 6 set to string 192.168.178.15
nextcloudpi    | ✓ redis is configured
nextcloudpi    | ✓ push server is receiving redis messages
nextcloudpi    | ✓ push server can load mount info from database
nextcloudpi    | 🗴 push server can't connect to the Nextcloud server
nextcloudpi    |   Invalid response when getting test cookie
nextcloudpi    | Init done

ZendaiOwl avatar Sep 23 '22 01:09 ZendaiOwl

I'll also add, before I go to bed, whenever I try to run the :latest image it keeps appending "ncp_" to the volumes, it also creates "ncp_network", which it did not do previously

Edit: I found the reason for this. The docker engine when used with docker-compose will append the name automatically to the network and volumes


Removing the volumes and images as I mentioned in matrix did make it work again, but that doesn't preserve someones data, unless I'm mistaken? Perhaps if it is external instead of internal, I don't know

Edit: Confirmed - removing the volumes will delete all data located in the volume or directory defined as a volume.

Take your data out of the volume before removal


After restoring it by removing the volumes and running sudo docker-compose up -d again using this docker-compose.yml file

docker-compose.yml
services:
  nextcloudpi:
    cap_add:
    - SYS_ADMIN
    command: $NCP_DEVICE_IP_HERE
    container_name: nextcloudpi
    devices:
    - /dev/fuse:/dev/fuse
    environment:
      APACHE_LOCK_DIR: /var/lock/apache2
      APACHE_LOG_DIR: /var/log/apache2
      APACHE_PID_FILE: /var/run/apache2.pid
      APACHE_RUN_DIR: /var/run/apache2
      APACHE_RUN_GROUP: www-data
      APACHE_RUN_USER: www-data
    image: ownyourbits/nextcloudpi:latest
    ports:
    - published: 80
      target: 80
    - published: 443
      target: 443
    - published: 4443
      target: 4443
    restart: unless-stopped
    volumes:
    - ncdata:/data:rw
    - database:/var/lib/mysql:rw
    - /etc/localtime:/etc/localtime:ro
version: '3.3'
volumes:
  ncdata:
    external: false
  database:
    external: false

Running sudo docker-compose down && sudo docker-compose up -d as well as sudo docker-compose restart nextcloudpi in this state, without any internal upgrades such as ncp-update & nc-update I mean, works perfectly fine and it becomes NC version 24.0.3.2 and NCP v1.49.1 instead of getting stuck with the previous PHP versions as before.

So if I just remove the old image after taking it down and the volume then pull a new one with :latest tag in the docker-compose file, it does work

ncp-report
NextCloudPi diagnostics

NextCloudPi version  v1.49.1
NextCloudPi image    NextCloudPi_docker_09-14-22
OS                   Debian GNU/Linux 11. 5.10.0-18-arm64 (aarch64)
automount            no
USB devices          sda 
datadir              /data/nextcloud/data
data in SD           yes
data filesystem      ext2/ext3
data disk usage      362G/3.6T
rootfs usage         362G/3.6T
swapfile             /dev/sda3
dbdir                /data/database
Nextcloud check      ok
Nextcloud version    24.0.3.2
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          up
Postfix service      up
Internet check       ok
public IP            ***REMOVED SENSITIVE VALUE***
public IP            ***REMOVED SENSITIVE VALUE***
Port check 80        closed
Port check 443       closed
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              172.27.0.1
Interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               3:22

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "7": "nextcloudpi",
            "5": "nextcloudpi.local",
            "8": "nextcloudpi.lan",
            "3": "nextcloudpi",
            "1": "172.27.0.2",
            "14": "efcb6c8010fc",
            "6": "192.168.178.15"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "24.0.3.2",
        "overwrite.cli.url": "https:\/\/nextcloudpi\/",
        "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***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "trusted_proxies": "***REMOVED SENSITIVE VALUE***"
    }
}

HTTPd logs

[Fri Sep 23 04:20:20.933865 2022] [ssl:error] [pid 114:tid 281473760722960] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 0A25706D808550BEA784B954533466E608DEC393 / notbefore: Sep 14 19:49:52 2022 GMT / notafter: Sep 11 19:49:52 2032 GMT]
[Fri Sep 23 04:20:20.933959 2022] [ssl:error] [pid 114:tid 281473760722960] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Fri Sep 23 04:20:20.957779 2022] [ssl:error] [pid 115:tid 281473760722960] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 0A25706D808550BEA784B954533466E608DEC393 / notbefore: Sep 14 19:49:52 2022 GMT / notafter: Sep 11 19:49:52 2032 GMT]
[Fri Sep 23 04:20:20.957830 2022] [ssl:error] [pid 115:tid 281473760722960] AH02604: Unable to configure certificate localhost:4443:0 for stapling
[Fri Sep 23 04:20:20.964031 2022] [mpm_event:notice] [pid 115:tid 281473760722960] AH00489: Apache/2.4.54 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Fri Sep 23 04:20:20.964168 2022] [core:notice] [pid 115:tid 281473760722960] AH00094: Command line: '/usr/sbin/apache2'

Database logs

tail: cannot open '/var/log/mysql/*.log' for reading: No such file or directory

Nextcloud logs


```

I'm really busy with university right now, I have to finish 3 courses in 2 months, so I might not have time to look into it much more tomorrow. We'll see, but so far it seems to me that not using the internal upgrade script is what works to create a working container with the new version of Nextcloud & NCP however a little more testing is required before I would say I am 100% certain of that

ZendaiOwl avatar Sep 23 '22 02:09 ZendaiOwl

@sunjam @theCalcaholic So I went through a couple more testing steps today, I haven't quite reached something fully conclusive yet but I'll add the information I've gathered so far here in the issue with my conclusions at the end and I have to stop here for now.

I need to return to my schoolwork :pray: I hope this will give some more clarity around the situation however and maybe someone knows a fix for it other than the conclusion I've currently reached, which you can read at the end of this comment. :smile_cat:

NEW TESTS

docker-compose.yml - 1st version

services:
  nextcloudpi:
    cap_add:
    - SYS_ADMIN
    command: 192.168.178.15
    container_name: nextcloudpi
    devices:
    - /dev/fuse:/dev/fuse
    environment:
      APACHE_LOCK_DIR: /var/lock/apache2
      APACHE_LOG_DIR: /var/log/apache2
      APACHE_PID_FILE: /var/run/apache2.pid
      APACHE_RUN_DIR: /var/run/apache2
      APACHE_RUN_GROUP: www-data
      APACHE_RUN_USER: www-data
    image: ownyourbits/nextcloudpi:latest
    ports:
    - published: 80
      target: 80
    - published: 443
      target: 443
    - published: 4443
      target: 4443
    restart: unless-stopped
    volumes:
    - ncdata:/data:rw
    - database:/var/lib/mysql:rw
    - /etc/localtime:/etc/localtime:ro
version: '3.3'
volumes:
  ncdata:
    external: false
  database:
    external: false
  • Update with ncp-update after starting a fresh container
root@efcb6c8010fc:/# ncp-update
Downloading updates
Performing updates
Clearing opcache...
Done.
mkdir: cannot create directory '/run/php': File exists
NextCloudPi updated to version v1.50.0
  • Running ncp-update again a 2nd time
NextCloudPi updated to version v1.50.0
root@efcb6c8010fc:/# ncp-update
Downloading updates
Performing updates
NextCloudPi updated to version v1.50.0
  • ncp-report info
NextCloudPi version  v1.50.0
NextCloudPi image    NextCloudPi_docker_09-14-22
OS                   Debian GNU/Linux 11. 5.10.0-18-arm64 (aarch64)
automount            no
USB devices          sda 
datadir              /data/nextcloud/data
data in SD           yes
data filesystem      ext2/ext3
data disk usage      362G/3.6T
rootfs usage         362G/3.6T
swapfile             /dev/sda3
dbdir                /data/database
Nextcloud check      ok
Nextcloud version    24.0.3.2
HTTPD service        down
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
Internet check       ok
public IP            ***REMOVED SENSITIVE VALUE***
public IP            ***REMOVED SENSITIVE VALUE***
Port check 80        closed
Port check 443       closed
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              172.27.0.1
Interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               37min
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | httpd (pid 115) already running
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23 14:15:59 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 121 ...
nextcloudpi    | 2022-09-23 14:16:00 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23 14:16:00 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23 14:16:00 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23 14:16:00 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23 14:16:00 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23 14:16:00 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23 14:16:00 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23 14:16:00 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23 14:16:00 0 [Note] InnoDB: Initializing buffer pool, total size = 1073741824, chunk size = 134217728
nextcloudpi    | 2022-09-23 14:16:00 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23 14:16:00 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1350690,1350690
nextcloudpi    | 2022-09-23 14:16:00 0 [Note] InnoDB: Starting final batch to recover 67 pages from redo log.
nextcloudpi    | Starting Redis
nextcloudpi    | 2022-09-23 14:16:01 0 [Note] InnoDB: 128 rollback segments are active.
nextcloudpi    | 2022-09-23 14:16:01 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
nextcloudpi    | 2022-09-23 14:16:01 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloudpi    | 2022-09-23 14:16:01 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloudpi    | 2022-09-23 14:16:01 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloudpi    | 2022-09-23 14:16:01 0 [Note] InnoDB: 10.5.15 started; log sequence number 1758175; transaction id 4632
nextcloudpi    | 2022-09-23 14:16:01 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23 14:16:01 0 [Note] InnoDB: Loading buffer pool(s) from /data/database/ib_buffer_pool
nextcloudpi    | 2022-09-23 14:16:01 0 [Note] Server socket created on IP: '127.0.0.1'.
nextcloudpi    | Starting Cron
nextcloudpi    | Starting Postfix
nextcloudpi    | 2022-09-23 14:16:02 0 [Note] Reading of all Master_info entries succeeded
nextcloudpi    | 2022-09-23 14:16:02 0 [Note] Added new Master_info '' to hash table
nextcloudpi    | 2022-09-23 14:16:02 0 [Note] mysqld: ready for connections.
nextcloudpi    | Version: '10.5.15-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
nextcloudpi    | 2022-09-23 14:16:03 0 [Note] InnoDB: Buffer pool(s) load completed at 220923 14:16:03
nextcloudpi    | Provisioning
nextcloudpi    | Provisioning Redis password
nextcloudpi    | Updating NextCloud config with Redis password
nextcloudpi    | Provisioning MariaDB password
nextcloudpi    | Updating NextCloud config with MariaDB password
nextcloudpi    | Running nc-limits
nextcloudpi    | Using 2972841984B for PHP
nextcloudpi    | Using 6 PHP threads
nextcloudpi    | Using 940615680 memory for the database
nextcloudpi    | 2022-09-23 14:16:10 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
nextcloudpi    | 2022-09-23 14:16:10 0 [Note] Event Scheduler: Purging the queue. 0 events
nextcloudpi    | 2022-09-23 14:16:10 0 [Note] InnoDB: FTS optimize thread exiting.
nextcloudpi    | 2022-09-23 14:16:10 0 [Note] InnoDB: Starting shutdown...
nextcloudpi    | 2022-09-23 14:16:10 0 [Note] InnoDB: Dumping buffer pool(s) to /data/database/ib_buffer_pool
nextcloudpi    | 2022-09-23 14:16:10 0 [Note] InnoDB: Buffer pool(s) dump completed at 220923 14:16:10
nextcloudpi    | 2022-09-23 14:16:11 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
nextcloudpi    | 2022-09-23 14:16:11 0 [Note] InnoDB: Shutdown completed; log sequence number 1759221; transaction id 4635
nextcloudpi    | 2022-09-23 14:16:11 0 [Note] mysqld: Shutdown complete
nextcloudpi    | 
nextcloudpi    | Stopping MariaDB database server: mariadbd.
nextcloudpi    | Starting MariaDB database server: mariadbd.
nextcloudpi    | Stopping redis-server: redis-server.
nextcloudpi    | Starting redis-server: redis-server.
nextcloudpi    | Starting notify_push daemon
nextcloudpi    | Configuring Domain
nextcloudpi    | System config value trusted_domains => 11 set to string XX.XXX.XXX.XX
nextcloudpi    | System config value trusted_domains => 1 set to string 172.27.0.2
nextcloudpi    | System config value trusted_domains => 14 set to string efcb6c8010fc
nextcloudpi    | System config value trusted_domains => 6 set to string 192.168.178.15
nextcloudpi    | Nextcloud version 24.0.3.2. NextCloudPi version v1.49.1
nextcloudpi    | Init done
  • Accessing Nextcloud works after running ncp-update internally
  • After accessing the webpage again for Nextcloud HTTPd service comes back online (up) again
  • Restarting container after having performed ncp-update and confirmed access to website
└࿓❯ sudo docker-compose restart nextcloudpi
Restarting nextcloudpi ... done
  • Logs from performing the restart
  • Issue: Database password for ncadmin@localhost tries to use password 'YES' from init (?) and fails
  • Issue: NC is returned to version 24.0.3.2
nextcloudpi    | stopping Cron...
nextcloudpi    | stopping Redis...
nextcloudpi    | stopping Postfix...
nextcloudpi    | stopping HPB...
nextcloudpi    | stopping logs...
nextcloudpi    | Stopping apache
nextcloudpi    | httpd (pid 115?) not running
nextcloudpi    | Stopping PHP-fpm
nextcloudpi    | Stopping mariaDB
nextcloudpi    | LAMP cleanup complete
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | INFO: Docker build detected.
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23 14:56:41 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 250 ...
nextcloudpi    | 2022-09-23 14:56:41 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23 14:56:41 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23 14:56:41 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23 14:56:41 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23 14:56:41 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23 14:56:41 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23 14:56:41 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23 14:56:41 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23 14:56:41 0 [Note] InnoDB: Initializing buffer pool, total size = 1073741824, chunk size = 134217728
nextcloudpi    | 2022-09-23 14:56:42 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23 14:56:44 0 [Note] InnoDB: 128 rollback segments are active.
nextcloudpi    | 2022-09-23 14:56:44 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloudpi    | 2022-09-23 14:56:44 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloudpi    | 2022-09-23 14:56:44 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloudpi    | 2022-09-23 14:56:44 0 [Note] InnoDB: 10.5.15 started; log sequence number 1227090; transaction id 2312
nextcloudpi    | 2022-09-23 14:56:44 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23 14:56:44 0 [Note] InnoDB: Loading buffer pool(s) from /data-ro/database/ib_buffer_pool
nextcloudpi    | 2022-09-23 14:56:44 0 [Note] Server socket created on IP: '127.0.0.1'.
nextcloudpi    | 2022-09-23 14:56:48 0 [Note] Reading of all Master_info entries succeeded
nextcloudpi    | 2022-09-23 14:56:48 0 [Note] Added new Master_info '' to hash table
nextcloudpi    | 2022-09-23 14:56:48 0 [Note] mysqld: ready for connections.
nextcloudpi    | Version: '10.5.15-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
nextcloudpi    | 2022-09-23 14:56:48 3 [Warning] Access denied for user 'ncadmin'@'localhost' (using password: YES)
nextcloudpi    | Starting Redis
nextcloudpi    | Starting Cron
nextcloudpi    | Starting Postfix
nextcloudpi    | Provisioning
nextcloudpi    | Provisioning Redis password
nextcloudpi    | Updating NextCloud config with Redis password
nextcloudpi    | Provisioning MariaDB password
nextcloudpi    | Updating NextCloud config with MariaDB password
nextcloudpi    | Running nc-limits
nextcloudpi    | Using 2972841984 for PHP max memory
nextcloudpi    | 2022-09-23 14:56:53 0 [Note] InnoDB: Buffer pool(s) load completed at 220923 14:56:53
nextcloudpi    | Using 6 PHP threads
nextcloudpi    | INFO: Restoring template to default settings
nextcloudpi    | Clearing opcache...
nextcloudpi    | Done.
nextcloudpi    | Stopping redis-server: redis-server.
nextcloudpi    | Starting redis-server: redis-server.
nextcloudpi    | Starting notify_push daemon
nextcloudpi    | Configuring Domain
nextcloudpi    | System config value trusted_domains => 11 set to string XX.XXX.XXX.XX
nextcloudpi    | System config value trusted_domains => 1 set to string 172.27.0.2
nextcloudpi    | System config value trusted_domains => 14 set to string efcb6c8010fc
nextcloudpi    | System config value trusted_domains => 6 set to string 192.168.178.15
nextcloudpi    | Nextcloud version 24.0.3.2. NextCloudPi version v1.50.0
nextcloudpi    | Init done
  • Restarting the container works, there is access to Nextcloud webpage, even if NCP version was restored to previous one.

  • Running ncp-update within the container again to update NCP version back to v1.50.0

  • No issues during ncp-update execution this time
root@efcb6c8010fc:/# ncp-update
Downloading updates
Performing updates
NextCloudPi updated to version v1.50.0
  • Access to Nextcloud webpage works after running ncp-update again
  • Will now stop the container and remove the image, then pull a new one to see if it will restore to previous NCP versoin as well

docker stop nextcloudpi, docker rm nextcloudpi, docker rmi ${image ID} docker-compose up -d

  • Removing the container and image then pulling a new one does not work
  • Issue: Missing file - /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh
  • Issue: Missing directory - mkdir /usr/local/etc/ncp-templates/mysql
└࿓❯ sudo docker-compose logs
Attaching to nextcloudpi
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | bash: /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh: No such file or directory
nextcloudpi    | /usr/local/etc/library.sh: line 220: ${3:}: bad substitution
nextcloudpi    | Starting Redis
nextcloudpi    | Starting Cron
nextcloudpi    | Starting Postfix
nextcloudpi    | ERROR 2002 (HY000): Can't connect to local MySQL server through socket '/run/mysqld/mysqld.sock' (2)
nextcloudpi    | Init done
  • Create missing directory inside container mkdir /usr/local/etc/ncp-templates/mysql

  • Fetch missing file

curl -sLo /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/etc/ncp-templates/mysql/90-ncp.cnf.sh
  • Make it executable
chmod +x /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh
  • Restart container again
  • Issue: Fails, the database password is no longer acccurate and the configuration fails
  • Removing container & image again and pulls a new one with a slightly modified compose file
  • Modified docker-compose.yml

Modified docker-compose file, incorrect configuration & doesn't work, do not use

services:
  nextcloudpi:
    cap_add:
    - SYS_ADMIN
    command: 192.168.178.15
    container_name: nextcloudpi
    devices:
    - /dev/fuse:/dev/fuse
    environment:
      APACHE_LOCK_DIR: /var/lock/apache2
      APACHE_LOG_DIR: /var/log/apache2
      APACHE_PID_FILE: /var/run/apache2.pid
      APACHE_RUN_DIR: /var/run/apache2
      APACHE_RUN_GROUP: www-data
      APACHE_RUN_USER: www-data
    image: ownyourbits/nextcloudpi:latest
    ports:
    - published: 80
      target: 80
    - published: 443
      target: 443
    - published: 4443
      target: 4443
    restart: unless-stopped
    volumes:
    - ncdata:/data:rw
    - database:/run/mysqld/mysqld.sock:rw
    - /etc/localtime:/etc/localtime:ro
version: '3.3'
volumes:
  ncdata:
    external: false
  database:
    external: false
  • Doesn't work
  • Issue: Missing file again - /usr/local/etc/ncp-templates/mysql/90-ncp.cnf.sh
  • Issue: Missing directory again - mkdir /usr/local/etc/ncp-templates/mysql
  • Issue: Syntax error within library.sh file ↓ /usr/local/etc/library.sh: line 220: ${3:}: bad substitution
  • Attempt a restoration by removing Container, Image & Volumes. sudo docker stop nextcloudpi && sudo docker rm nextcloudpi && sudo docker rmi 937386023b5e sudo docker volume ls | awk '{print $2}' | awk 'NR!=1{print}' | xargs -i sudo docker volume rm {}

  • Pulling the new image and creating the container with volumes again

  • Issue: The image appends "ncp_" to all configured volumes inside the docker-compose file
  • Issue: Incorrect configuration in the docker-compose file
└࿓❯ sudo docker-compose up -d
Creating volume "ncp_ncdata" with default driver
Creating volume "ncp_database" with default driver
Pulling nextcloudpi (ownyourbits/nextcloudpi:latest)...
latest: Pulling from ownyourbits/nextcloudpi
3d898485473e: Pull complete
e8deff62dec3: Pull complete
b8c584e3a0b8: Pull complete
74c1743c5c09: Pull complete
bc08fcea8af8: Pull complete
9518216f0659: Pull complete
dde0be9a133a: Pull complete
4f4fb700ef54: Pull complete
911518531433: Pull complete
aba160e7fa84: Pull complete
3466ed215d14: Pull complete
23043090a845: Pull complete
42b05477daff: Pull complete
83d95e93224c: Pull complete
8a41bd81dd1f: Pull complete
9b508e31a266: Pull complete
ae8a91df0ca8: Pull complete
e0e4c5ef3273: Pull complete
bb3a9ea6aaf3: Pull complete
62df76192d86: Pull complete
fa7afbcd00a8: Pull complete
4ad109e5ca3d: Pull complete
03b8a06f9486: Pull complete
8f3d67ac9874: Pull complete
94958e6e8d15: Pull complete
Digest: sha256:7cbe078719d7c9802b09e955978b0645fb7b5a72014615b026676736cf7cdad4
Status: Downloaded newer image for ownyourbits/nextcloudpi:latest
Creating nextcloudpi ... done
  • The new docker-compose file I tried was incorrect by having the mysqld socket as a volume, removing that together with container, image and volumes to give it another try without that volume.

docker-compose.yml New

Modified docker-compose file, working version :+1:

EDIT: For anyone reading this during troubleshooting or wanting to use the compose file below, you need to remove the "$IP" part and enter the actual IP for the device which NCP is running on there. This will add that IP-address to trusted_domains in the container so you are able of accessing your instance via IP-address in your home network

EDIT2: Remember to move your data out of your volumes before removing them if you're reading this and attempting any troubleshooting to restore it yourself, or it will delete your files along with them, as it happened to a user in the Matrix chat I decided to add this bit in, just in case

services:
  nextcloudpi:
    cap_add:
    - SYS_ADMIN
    command: "$IP"
    container_name: nextcloudpi
    devices:
    - /dev/fuse:/dev/fuse
    environment:
      APACHE_LOCK_DIR: /var/lock/apache2
      APACHE_LOG_DIR: /var/log/apache2
      APACHE_PID_FILE: /var/run/apache2.pid
      APACHE_RUN_DIR: /var/run/apache2
      APACHE_RUN_GROUP: www-data
      APACHE_RUN_USER: www-data
    image: ownyourbits/nextcloudpi:latest
    ports:
    - published: 80
      target: 80
    - published: 443
      target: 443
    - published: 4443
      target: 4443
    restart: unless-stopped
    volumes:
    - ncdata:/data:rw
    - /etc/localtime:/etc/localtime:ro
version: '3.3'
volumes:
  ncdata:
    external: false
  • Success!
  • This docker-compose file works and is configured correctly (at least what I can tell so far)
  • Issue: All volumes defined within the docker-compose file are still appended with "ncp_" at the start of their names

Edit: I found the reason for this. The docker engine when used with docker-compose appends the name automatically to the network and volumes

docker-compose logs using the latest docker-compose file above

└࿓❯ sudo docker-compose logs
Attaching to nextcloudpi
nextcloudpi    | Initializing empty volume..
nextcloudpi    | Making /usr/local/etc/ncp-config.d persistent ...
nextcloudpi    | Making /etc/services-enabled.d persistent ...
nextcloudpi    | Making /etc/letsencrypt persistent ...
nextcloudpi    | Making /etc/shadow persistent ...
nextcloudpi    | Making /etc/cron.d persistent ...
nextcloudpi    | Making /etc/cron.daily persistent ...
nextcloudpi    | Making /etc/cron.hourly persistent ...
nextcloudpi    | Making /etc/cron.weekly persistent ...
nextcloudpi    | Making /usr/local/bin persistent ...
nextcloudpi    | Making /etc/apache2 persistent ...
nextcloudpi    | Starting PHP-fpm
nextcloudpi    | Starting Apache
nextcloudpi    | Starting mariaDB
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] mysqld (mysqld 10.5.15-MariaDB-0+deb11u1) starting as process 126 ...
nextcloudpi    | 2022-09-23 15:34:10 0 [Warning] The parameter innodb_file_format is deprecated and has no effect. It may be removed in future releases. See https://mariadb.com/kb/en/library/xtradbinnodb-file-format/
nextcloudpi    | 2022-09-23 15:34:10 0 [Warning] The parameter innodb_buffer_pool_instances is deprecated and has no effect.
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: Uses event mutexes
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: Number of pools: 1
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: Using ARMv8 crc32 instructions
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] mysqld: O_TMPFILE is not supported on /tmp (disabling future attempts)
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: Using Linux native AIO
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: Initializing buffer pool, total size = 268435456, chunk size = 134217728
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: Completed initialization of buffer pool
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: 128 rollback segments are active.
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: Creating shared tablespace for temporary tables
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: 10.5.15 started; log sequence number 1227090; transaction id 2312
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] Plugin 'FEEDBACK' is disabled.
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: Loading buffer pool(s) from /data/database/ib_buffer_pool
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] InnoDB: Buffer pool(s) load completed at 220923 15:34:10
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] Server socket created on IP: '127.0.0.1'.
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] Reading of all Master_info entries succeeded
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] Added new Master_info '' to hash table
nextcloudpi    | 2022-09-23 15:34:10 0 [Note] mysqld: ready for connections.
nextcloudpi    | Version: '10.5.15-MariaDB-0+deb11u1'  socket: '/run/mysqld/mysqld.sock'  port: 3306  Debian 11
nextcloudpi    | Starting Redis
nextcloudpi    | Starting Cron
nextcloudpi    | Starting Postfix
nextcloudpi    | Provisioning
nextcloudpi    | Provisioning Redis password
nextcloudpi    | Updating NextCloud config with Redis password
nextcloudpi    | Provisioning MariaDB password
nextcloudpi    | Updating NextCloud config with MariaDB password
nextcloudpi    | Running nc-limits
nextcloudpi    | Using 2972841984B for PHP
nextcloudpi    | Using 6 PHP threads
nextcloudpi    | Using 940615680 memory for the database
nextcloudpi    | 2022-09-23 15:34:18 0 [Note] mysqld (initiated by: root[root] @ localhost []): Normal shutdown
nextcloudpi    | 2022-09-23 15:34:18 0 [Note] Event Scheduler: Purging the queue. 0 events
nextcloudpi    | 2022-09-23 15:34:18 0 [Note] InnoDB: FTS optimize thread exiting.
nextcloudpi    | 2022-09-23 15:34:19 0 [Note] InnoDB: Starting shutdown...
nextcloudpi    | 2022-09-23 15:34:19 0 [Note] InnoDB: Dumping buffer pool(s) to /data/database/ib_buffer_pool
nextcloudpi    | 2022-09-23 15:34:19 0 [Note] InnoDB: Buffer pool(s) dump completed at 220923 15:34:19
nextcloudpi    | 2022-09-23 15:34:19 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
nextcloudpi    | 2022-09-23 15:34:19 0 [Note] InnoDB: Shutdown completed; log sequence number 1227102; transaction id 2315
nextcloudpi    | 2022-09-23 15:34:19 0 [Note] mysqld: Shutdown complete
nextcloudpi    | 
nextcloudpi    | Stopping MariaDB database server: mariadbd.
nextcloudpi    | Starting MariaDB database server: mariadbd.
nextcloudpi    | Stopping redis-server: redis-server.
nextcloudpi    | Starting redis-server: redis-server.
nextcloudpi    | Starting notify_push daemon
nextcloudpi    | Configuring Domain
nextcloudpi    | System config value trusted_domains => 11 set to string XX.XXX.XXX.XX
nextcloudpi    | System config value trusted_domains => 1 set to string 172.27.0.2
nextcloudpi    | System config value trusted_domains => 14 set to string 09d3b333b2ec
nextcloudpi    | System config value trusted_domains => 6 set to string 192.168.178.15
nextcloudpi    | Nextcloud version 24.0.3.2. NextCloudPi version v1.49.1
nextcloudpi    | Init done
  • Successfully created a new container again

  • Current conclusion By running the upgrade internally within the Docker container, you can no longer stop the container and start it again as it pulls from the image in the docker registry, which still uses the previous version, and so this creates the current conflict you can see in the workflow I've outlined with the tests.

So my take is, that you should take down the previous container, remove the old image and pull the new one once it has been properly updated and pushed to the Docker registry OR you can update it internally, but you cannot take it down or restart the container at all if this is done, because it will roll it back to the previous configuration of the image in the docker registry

ZendaiOwl avatar Sep 23 '22 13:09 ZendaiOwl

Since I had a restored version with a working docker-compose file again I attempted the ncp-update & ncp-update-nc 24.0.4 one last time to see what happens.

  • Issues
  • The backup function creates a backup containing a typo: backup /var/www//nextcloud-bkp_20220923_1663943738.tar.gz generated - Notice the 2nd "//" in the path OR it is only the debug message in the terminal that shows the 2nd "/" since later at the end of the upgrade logs it is properly formatted with the path Backup stored at /data/nextcloud/data/ncp-update-backups/nextcloud-bkp_20220923_1663943738-24.0.3.2.tar.gz
Complete upgrade log of ncp-update & ncp-update-nc 24.0.4
└࿓❯ sudo docker exec -it nextcloudpi bash
root@09d3b333b2ec:/# php -v
PHP 7.4.30 (cli) (built: Jul  7 2022 15:51:43) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.30, Copyright (c), by Zend Technologies
root@09d3b333b2ec:/# ncp-update
Downloading updates
Performing updates
Clearing opcache...
Done.
mkdir: cannot create directory '/run/php': File exists
NextCloudPi updated to version v1.50.0
root@09d3b333b2ec:/# nc-update 24.0.4
bash: nc-update: command not found
root@09d3b333b2ec:/# nc-update       
bash: nc-update: command not found
root@09d3b333b2ec:/# nc-update-nc 24.0.4
bash: nc-update-nc: command not found
root@09d3b333b2ec:/# ncp-update-nc 24.0.4
Current   Nextcloud version 24.0.3.2
Available Nextcloud version 24.0.4
Download Nextcloud 24.0.4...
Back up current instance...
check free space...
Maintenance mode enabled
backup database...
backup files...
backup /var/www//nextcloud-bkp_20220923_1663943738.tar.gz generated
Maintenance mode disabled
Install Nextcloud 24.0.4...
Restore data...
Fix permissions...
Upgrade...
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
Turned on maintenance mode
Updating database schema
Updated database
Disabled incompatible app: calendar
Disabled incompatible app: contacts
Disabled incompatible app: news
Disabled incompatible app: notes
Disabled incompatible app: notify_push
Disabled incompatible app: tasks
Updating <circles> ...
Updated <circles> to 24.0.1
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level
Check indices of the share table.
Check indices of the filecache table.
Check indices of the twofactor_providers table.
Check indices of the login_flow_v2 table.
Check indices of the whats_new table.
Check indices of the cards table.
Check indices of the cards_properties table.
Check indices of the calendarobjects_props table.
Check indices of the schedulingobjects table.
Check indices of the oc_properties table.
Check indices of the oc_jobs table.
Check indices of the oc_direct_edit table.
Done.
Check columns of the comments table.
Done.
Check primary keys.
Done.
All tables already up to date!
Update completed successfully.
Backup stored at /data/nextcloud/data/ncp-update-backups/nextcloud-bkp_20220923_1663943738-24.0.3.2.tar.gz
Clean up...

  • NCP-report after the internal update/upgrade
NextCloudPi diagnostics

NextCloudPi version  v1.50.0
NextCloudPi image    NextCloudPi_docker_09-14-22
OS                   Debian GNU/Linux 11. 5.10.0-18-arm64 (aarch64)
automount            no
USB devices          sda 
datadir              /data/nextcloud/data
data in SD           yes
data filesystem      ext2/ext3
data disk usage      362G/3.6T
rootfs usage         362G/3.6T
swapfile             /dev/sda3
dbdir                /data/database
Nextcloud check      ok
Nextcloud version    24.0.4.1
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
Internet check       ok
public IP            ***REMOVED SENSITIVE VALUE***
public IP            ***REMOVED SENSITIVE VALUE***
Port check 80        closed
Port check 443       closed
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              172.27.0.1
Interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               2:26

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "7": "nextcloudpi",
            "5": "nextcloudpi.local",
            "8": "nextcloudpi.lan",
            "3": "nextcloudpi",
            "1": "172.27.0.2",
            "14": "09d3b333b2ec",
            "6": "192.168.178.15"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "24.0.4.1",
        "overwrite.cli.url": "https:\/\/nextcloudpi\/",
        "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***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "maintenance": false,
        "loglevel": 2
    }
}

HTTPd logs

[Fri Sep 23 15:34:10.330040 2022] [ssl:error] [pid 123:tid 281473642975248] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 0A25706D808550BEA784B954533466E608DEC393 / notbefore: Sep 14 19:49:52 2022 GMT / notafter: Sep 11 19:49:52 2032 GMT]
[Fri Sep 23 15:34:10.330243 2022] [ssl:error] [pid 123:tid 281473642975248] AH02604: Unable to configure certificate localhost:443:0 for stapling
[Fri Sep 23 15:34:10.351734 2022] [ssl:error] [pid 124:tid 281473642975248] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 0A25706D808550BEA784B954533466E608DEC393 / notbefore: Sep 14 19:49:52 2022 GMT / notafter: Sep 11 19:49:52 2032 GMT]
[Fri Sep 23 15:34:10.351811 2022] [ssl:error] [pid 124:tid 281473642975248] AH02604: Unable to configure certificate localhost:443:0 for stapling
[Fri Sep 23 15:34:10.357688 2022] [mpm_event:notice] [pid 124:tid 281473642975248] AH00489: Apache/2.4.54 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Fri Sep 23 15:34:10.357825 2022] [core:notice] [pid 124:tid 281473642975248] AH00094: Command line: '/usr/sbin/apache2'

Database logs

tail: cannot open '/var/log/mysql/*.log' for reading: No such file or directory

Nextcloud logs

{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Reset generated avatar flag","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.3.2","data":[]}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Keep legacy encryption enabled","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.3.2","data":[]}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Check encryption key format","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.3.2","data":[]}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Remove old dashboard app config data","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.3.2","data":[]}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add job to cleanup the bruteforce entries","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.3.2","data":[]}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Queue a one-time job to check for user uploaded certificates","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.3.2","data":[]}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Repair DAV shares","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.3.2","data":[]}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add background job to set the lookup server share state for users","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:21+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:30+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"24.0.3.2","data":{"app":"updater"}}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:30+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:30+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"6eODjaurgYoNpQ9Fl7ZC","level":1,"time":"2022-09-23T16:38:30+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}

  • Restarting the container with the current docker-compose file from my comment above and having run the upgrades internally does work however it does still, as mentioned previously, restore the container to the previously configured version in the docker registry and the NC application update as well as the NCP update is reverted (?), it does retain the correct version of v1.50.0 but PHP is back to v7.4, while the actual updated/upgraded files remain. So the first thing the container will ask you after a restart is to run occ upgrade
Output from running ncc upgrade
└࿓❯ sudo docker exec nextcloudpi bash ncc upgrade
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
Turned on maintenance mode
Updating database schema
Updated database
Updating <circles> ...
Updated <circles> to 24.0.1
Updating <contacts> ...
Updated <contacts> to 4.2.1
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Resetting log level
  • NCP-report after running the ncc upgrade within the container after a restart, note that the NCP version has persisted here with v.1.50.0 & NC v24.0.4.1 after the restart using the modified working docker-compose file from my comment above
NextCloudPi diagnostics

NextCloudPi version  v1.50.0
NextCloudPi image    NextCloudPi_docker_09-14-22
OS                   Debian GNU/Linux 11. 5.10.0-18-arm64 (aarch64)
automount            no
USB devices          sda 
datadir              /data/nextcloud/data
data in SD           yes
data filesystem      ext2/ext3
data disk usage      362G/3.6T
rootfs usage         362G/3.6T
swapfile             /dev/sda3
dbdir                /data-ro/database
Nextcloud check      ok
Nextcloud version    24.0.4.1
HTTPD service        up
PHP service          up
MariaDB service      up
Redis service        up
HPB service          down
Postfix service      up
Internet check       ok
public IP            ***REMOVED SENSITIVE VALUE***
public IP            ***REMOVED SENSITIVE VALUE***
Port check 80        closed
Port check 443       closed
IP                   ***REMOVED SENSITIVE VALUE***
Gateway              172.27.0.1
Interface            eth0
certificates         ***REMOVED SENSITIVE VALUE***
NAT loopback         no
Uptime               2:32

Nextcloud configuration

{
    "system": {
        "passwordsalt": "***REMOVED SENSITIVE VALUE***",
        "secret": "***REMOVED SENSITIVE VALUE***",
        "trusted_domains": {
            "0": "localhost",
            "7": "nextcloudpi",
            "5": "nextcloudpi.local",
            "8": "nextcloudpi.lan",
            "3": "nextcloudpi",
            "1": "172.27.0.2",
            "14": "09d3b333b2ec",
            "6": "192.168.178.15"
        },
        "datadirectory": "***REMOVED SENSITIVE VALUE***",
        "dbtype": "mysql",
        "version": "24.0.4.1",
        "overwrite.cli.url": "https:\/\/nextcloudpi\/",
        "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***",
        "preview_max_x": "2048",
        "preview_max_y": "2048",
        "jpeg_quality": "60",
        "overwriteprotocol": "https",
        "maintenance": false,
        "loglevel": 2
    }
}

HTTPd logs

[Fri Sep 23 16:43:37.790764 2022] [authz_host:error] [pid 129:tid 281473428226432] [client 192.168.178.19:34710] AH01753: access check of 'localhost' to / failed, reason: unable to get the remote host name
[Fri Sep 23 16:43:37.791369 2022] [authz_host:error] [pid 129:tid 281473428226432] [client 192.168.178.19:34710] AH01753: access check of 'localhost' to /index.php failed, reason: unable to get the remote host name
[Fri Sep 23 16:43:39.731794 2022] [authz_host:error] [pid 129:tid 281473428226432] [client 192.168.178.19:34710] AH01753: access check of 'localhost' to /activate failed, reason: unable to get the remote host name
[Fri Sep 23 16:43:39.738843 2022] [authz_host:error] [pid 129:tid 281473428226432] [client 192.168.178.19:34710] AH01753: access check of 'localhost' to /activate/ failed, reason: unable to get the remote host name
[Fri Sep 23 16:43:39.739175 2022] [authz_host:error] [pid 129:tid 281473428226432] [client 192.168.178.19:34710] AH01753: access check of 'localhost' to /activate/index.php failed, reason: unable to get the remote host name
[Fri Sep 23 16:43:39.891243 2022] [authz_host:error] [pid 129:tid 281473428226432] [client 192.168.178.19:34710] AH01753: access check of 'localhost' to /activate/CSS.css failed, reason: unable to get the remote host name
[Fri Sep 23 16:43:39.920203 2022] [authz_host:error] [pid 129:tid 281473436619136] [client 192.168.178.19:34710] AH01753: access check of 'localhost' to /img/ncp-logo.svg failed, reason: unable to get the remote host name
[Fri Sep 23 16:43:39.937376 2022] [authz_host:error] [pid 129:tid 281473436619136] [client 192.168.178.19:34710] AH01753: access check of 'localhost' to /js/minified.js failed, reason: unable to get the remote host name
[Fri Sep 23 16:43:39.938326 2022] [authz_host:error] [pid 129:tid 281473428226432] [client 192.168.178.19:34710] AH01753: access check of 'localhost' to /activate/JS.js failed, reason: unable to get the remote host name
[Fri Sep 23 16:43:39.940163 2022] [authz_host:error] [pid 129:tid 281473428226432] [client 192.168.178.19:34710] AH01753: access check of 'localhost' to /img/clippy.svg failed, reason: unable to get the remote host name
[Fri Sep 23 16:43:39.948034 2022] [authz_host:error] [pid 129:tid 281473428226432] [client 192.168.178.19:34710] AH01753: access check of 'localhost' to /img/background.png failed, reason: unable to get the remote host name, referer: https://192.168.178.15/activate/CSS.css
[Fri Sep 23 16:43:39.982262 2022] [authz_host:error] [pid 129:tid 281473445011840] [client 192.168.178.19:34710] AH01753: access check of 'localhost' to /img/loading-small.gif failed, reason: unable to get the remote host name
[Fri Sep 23 16:43:40.165679 2022] [authz_host:error] [pid 129:tid 281473445011840] [client 192.168.178.19:34710] AH01753: access check of 'localhost' to /img/favicon.png failed, reason: unable to get the remote host name
[Fri Sep 23 16:43:54.482560 2022] [mpm_event:notice] [pid 124:tid 281473642975248] AH00492: caught SIGWINCH, shutting down gracefully
[Fri Sep 23 16:44:00.330704 2022] [ssl:error] [pid 118:tid 281473505103888] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 0A25706D808550BEA784B954533466E608DEC393 / notbefore: Sep 14 19:49:52 2022 GMT / notafter: Sep 11 19:49:52 2032 GMT]
[Fri Sep 23 16:44:00.330858 2022] [ssl:error] [pid 118:tid 281473505103888] AH02604: Unable to configure certificate localhost:443:0 for stapling
[Fri Sep 23 16:44:00.351903 2022] [ssl:error] [pid 119:tid 281473505103888] AH02217: ssl_stapling_init_cert: can't retrieve issuer certificate! [subject: CN=localhost / issuer: CN=localhost / serial: 0A25706D808550BEA784B954533466E608DEC393 / notbefore: Sep 14 19:49:52 2022 GMT / notafter: Sep 11 19:49:52 2032 GMT]
[Fri Sep 23 16:44:00.351974 2022] [ssl:error] [pid 119:tid 281473505103888] AH02604: Unable to configure certificate localhost:443:0 for stapling
[Fri Sep 23 16:44:00.357763 2022] [mpm_event:notice] [pid 119:tid 281473505103888] AH00489: Apache/2.4.54 (Debian) OpenSSL/1.1.1n configured -- resuming normal operations
[Fri Sep 23 16:44:00.357889 2022] [core:notice] [pid 119:tid 281473505103888] AH00094: Command line: '/usr/sbin/apache2'

Database logs

tail: cannot open '/var/log/mysql/*.log' for reading: No such file or directory

Nextcloud logs

{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:00+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:00+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Keep legacy encryption enabled","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:00+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:00+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Check encryption key format","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:00+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:00+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Remove old dashboard app config data","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:00+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:00+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add job to cleanup the bruteforce entries","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:01+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:01+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Queue a one-time job to check for user uploaded certificates","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:01+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:01+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Repair DAV shares","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:01+02:00","remoteAddr":"","user":"--","app":"no app in context","method":"","url":"--","message":"Deprecated event type for \\OC\\Repair::step: Symfony\\Component\\EventDispatcher\\GenericEvent is used","userAgent":"--","version":"24.0.4.1","data":[]}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:01+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Repair::step: Repair step: Add background job to set the lookup server share state for users","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:01+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::startCheckCodeIntegrity: Starting code integrity check...","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"XzcdhReEuNpBG3EnP9Kp","level":0,"time":"2022-09-23T16:45:02+02:00","remoteAddr":"","user":"--","app":"cron","method":"","url":"--","message":"We are in maintenance mode, skipping cron","userAgent":"--","version":"24.0.4.1","data":{"app":"cron"}}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:09+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::finishedCheckCodeIntegrity: Finished code integrity check","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:09+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::updateEnd: Update successful","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:09+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::maintenanceDisabled: Turned off maintenance mode","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}
{"reqId":"tZniDydXfo8HZeXEhsRR","level":1,"time":"2022-09-23T16:45:09+02:00","remoteAddr":"","user":"--","app":"updater","method":"","url":"--","message":"\\OC\\Updater::resetLogLevel: Reset log level to Warning(2)","userAgent":"--","version":"24.0.4.1","data":{"app":"updater"}}

Restarting the container with the latest docker-compose I wrote in my comment above does work, even if it rolls back to the previous version within the docker registry, the actual files and programs that have been upgraded are still upgraded (excluding PHP, which is back to version 7.4, as the image in the registry have). As evidenced by Nextcloud asking you to run occ upgrade when the container starts up again to update/upgrade the Nextcloud applications of the instance. After running this upgrade I have access to the Nextcloud website still, meaning that restarting the container does work after an internal upgrade, however as I said in my earlier comment above, it will restore the container to the previous configuration of the image in the docker registry again.

ZendaiOwl avatar Sep 23 '22 14:09 ZendaiOwl

So my take is, that you should take down the previous container, remove the old image and pull the new one once it has been properly updated and pushed to the Docker registry OR you can update it internally, but you cannot take it down or restart the container at all if this is done, because it will roll it back to the previous configuration of the image in the docker registry

That's always been the case. With docker-compose you can stop the container and preserve the version, but if you run docker compose down and are using an older image it will go back to that image's version.

facorazza avatar Sep 23 '22 19:09 facorazza

@facorazza Awesome, thanks for confirmation :D there was a discussion about it in the Matrix chat and I didn't know for sure, which is why I started testing it out with the current upgrade issue ^^

ZendaiOwl avatar Sep 23 '22 20:09 ZendaiOwl

That's always been the case. With docker-compose you can stop the container and preserve the version, but if you run docker compose down and are using an older image it will go back to that image's version.

Exactly, the intention is to address this and finally resolve it in any manner it can be refined. :smile_cat:

sunjam avatar Sep 23 '22 21:09 sunjam

There seems to be an issue where NextcloudPi does not understand updates are available, at least from Docker. I tried v1.49* and v.18*. ncp updates to 1.50 is successful, but Nextcloud updates yields:

[Same result, but this is using 1.48* image].

Running nc-update-nextcloud
Current   Nextcloud version 23.0.6.1
Available Nextcloud version 23.0.6
Nothing to update
Done. Press any key...

I'm noticing I'm having difficulty getting the auto-updater to kick on at 0, so it is not giving me PHP 8.1

sunjam avatar Sep 23 '22 23:09 sunjam

Try running ncp-update-nc $NCVER if you want to update Nextcloud within your container, these updates should persist as they reside in the /data volume, if I read what nacho wrote correctly, but I don't know, I'm quite tired at the moment also.

You shouldn't have automatic updates turned on for NCP unless you're pushing your image to docker hub which you can then pull from when you're starting a container. Docker updates by pulling the new image, stopping the old and starting the new, so you update docker using the versions on the ownyourbits/nextcloudpi docker hub page

The PHP upgrade for docker was stopped by Tobias in an earlier pr I think

https://help.nextcloud.com/t/how-to-update-nextcloudpi-docker-container/29282/2?u=zendaiowl

ZendaiOwl avatar Sep 24 '22 01:09 ZendaiOwl

Just to add if someone else comes by reading, if you upgrade PHP inside docker and the image isn't upgraded on the docker hub, you will revert back to 7.4 when pulling the image again during a container restart and end up with a broken container configuration.

ZendaiOwl avatar Sep 26 '22 00:09 ZendaiOwl

Just to add if someone else comes by reading, if you upgrade PHP inside docker and the image isn't upgraded on the docker hub, you will revert back to 7.4 when pulling the image again during a container restart and end up with a broken container configuration.

The underlying issue is exactly that. It shouldn't be possible to use ncp-update to update on docker as it might lead to undefined behavior. This will be addressed in the upcoming v1.50.1 release

theCalcaholic avatar Sep 26 '22 19:09 theCalcaholic

Related: #1574

theCalcaholic avatar Sep 26 '22 20:09 theCalcaholic

The underlying issue is exactly that. It shouldn't be possible to use ncp-update to update on docker as it might lead to undefined behavior. 

Yes, this is the recommended way and also the best I think, for users to not upgrade docker internally at all

One possible solution, for users looking to automate the docker upgrade, would be to make a Cron script that checks .. I don't know, once a day? Once a month? And when triggered runs the upgrade commands in order for the user, perhaps at a certain time at night maybe? 🙏

Then those that want it, can configure it on their device, as an example. Or simply run them themselves, it's only what .. 2 or 3 commands in total?

Edit: I'll put together the commands how to upgrade the container as soon as I have some time over. In simple terms, it is to pull the new image, stop the old & start the new. Also recommended to remove the previous image to not keep building up images you have stored on your devices. See related info in issue #1590 & #1574 for now

Just threw them together quickly using my laptops terminal history from testing the :latest tag

sudo docker stop nextcloudpi - Stop container

sudo docker rm nextcloudpi - Remove container

  • List images
└࿓❯ sudo docker images
REPOSITORY                TAG               IMAGE ID       CREATED        SIZE
ownyourbits/nextcloudpi   latest            77d974935f1c   4 hours ago    1.41GB
  • Remove image

sudo docker rmi 77d974935f1c

└࿓❯ sudo docker rmi 77d974935f1c
Untagged: ownyourbits/nextcloudpi:latest
Untagged: ownyourbits/nextcloudpi@sha256:2bf959a8b35bc8c0dac7ae7a44f251e74cc1cc24915eadd2d79eb899cda01821
Deleted: sha256:77d974935f1c0849ce93f69e296c23e31c25b1a9619a53bc2fa21a1125b21454
Deleted: sha256:4c15a6ba1dabeabf59546c83ffb0ff1cc81c8babe4d326ceb5725f6c665c45e6
Deleted: sha256:fbf188bfff848cb2284326981d2d4b5470c5b688c1588161b84094362bf4f5cc
Deleted: sha256:d901e52906ebe82855a57ae6da83f275bd3ea1a93ad7c02a998b670fd33ed570
Deleted: sha256:1fd239ad8a568cde270a4dcddae6da13141a6623e08bca297c80e209eefb6346
Deleted: sha256:238eaab94096826dbbb094eae498610c91f8a1d8c5529d74176d2a29f7437ba2
Deleted: sha256:026140bf51dbb7a32b03a3e332fc4543a7687d373b122a822cde3f394a55bf98
Deleted: sha256:eea94b96c4c2a0793c0d452b83c05c73079b95558861f887891a55d4005b0b66
Deleted: sha256:2b43887d8104f2d9126e7bcd3742f11e40ff98ac3a4e800914ab1fc59a4232d2
Deleted: sha256:6d05d8e33f33bccde7b3437fbed7f8272d44c51042cc757db1c918ad7836b861
Deleted: sha256:8d5467315ea436d25dfe02c8cf4d8ccc8963f12ed87ad4e3bc00501b278188c2
Deleted: sha256:d06e824ed718df9d3060c025c4eb72b75151e476bacfd15bb8435e765e1747d0
Deleted: sha256:5bfa40b6c2bed2dd64785ce5a53e08c69431a86958c1eb5defbf0f4ef3a392c6
Deleted: sha256:3ef5516a0717eb7d8d277aa5a06a72173834b3f02d36ca67877177b388a27d69
Deleted: sha256:72fc969ef7c994cee1e40e593654ef616ba7384864ad6101971057eea2bfc305
Deleted: sha256:bf42eeaaa5281f9b8657bdf5cb2335a0b9c5f8878243f2a18674d1af393586e9
Deleted: sha256:0a2768a56eba0851cfa3bfe41e0c0a6245076f24bba0c20aa3c0db16725df294
Deleted: sha256:9be693f7eb7d5bfb99d9b8e8a41f1cf65d64950a68c6233f133ddec828080cb2
Deleted: sha256:08296d3f4c18be5215d2389fcfd4c7703a0d4f474d5310306ae10046575d7e8f
Deleted: sha256:35ce8f2fd5b0d2cd4daa8ffec1bfa304ce74843614f18d9aa722e1ddbc4c2af0
Deleted: sha256:3366861de73c5a44a7c8c97c165d93c21b57f28ff8a7ff5348b07bd97473919c
Deleted: sha256:3683e335b3e57478f53170f0c84c5c105da1cc6d4286355bc44d30ddeb0959b6
Deleted: sha256:49af4d8816ed1d5b501b958f9fdea30dffa9464cef6921504a708291726768ba
Deleted: sha256:3241f292ee9b696d2104059ff4b6e1359905582a93b379bf3907ed352a52666f
Deleted: sha256:a161477479850a0a8d312c3639fb40c2337cb0553381eba838ed05a9c663811d
Deleted: sha256:b45078e74ec97c5e600f6d5de8ce6254094fb3cb4dc5e1cc8335fb31664af66e

WARNING Removing your volumes deletes your data

List volumes sudo docker volume ls

└࿓❯ sudo docker volume ls
DRIVER    VOLUME NAME
local     buildx_buildkit_container0_state
local     ncdata
  • Remove the volume
└࿓❯ sudo docker volume rm ncdata
ncdata

ZendaiOwl avatar Sep 26 '22 20:09 ZendaiOwl

This has now been fixed by refusing to update containers using ncp-update (without explicit override)

theCalcaholic avatar Sep 29 '22 00:09 theCalcaholic