NCP letsencrypt renewal error ncp-update error

docker
letsencrypt
ncp
update_problems
nc15
#1

Hi,

I am running ncp on docker, NC15.0.5 and NCP 1.10.0, over a Rock64 (ARMBIAN 5.88 stable Ubuntu 18.04.2 LTS 4.4.180-rockchip64)

Warned by an automated email about a failed Letsencrypt renewal I was having a look, trying to re-apply the LE config manually from the NCP pannel on the web gave an error:

 [ letsencrypt ]
/usr/local/bin/ncp/NETWORKING/letsencrypt.sh: line 57: /usr/bin/letsencrypt: No such file or directory

I then realized my ncp was outdated (I am running ncp 1.10.0) and decided to update just in case it fixed the issue, but with no luck, through the ncp-pannel in the web is strange becuase I see the options twice with the Apply button twice also:

Update NextCloudPi

Update NextCloudPi

If I press Apply it fails (red circle).

When trying ncp-udpate from the cli (either from inside the docker) or from outside the docker doing: docker exec -it nextcloudpi ncp-update It fails either with a few errors:

$ docker exec -it nextcloudpi ncp-update
Downloading updates
Performing updates
file /usr/local/bin/ncp/CONFIG/nc-autoupdate-nc.sh
/usr/local/bin/ncp/UPDATES/nc-autoupdate-nc.sh not found
Cannot load Zend OPcache - it was already loaded
Config value squareSizes for app previewgenerator set to 32
Cannot load Zend OPcache - it was already loaded
Config value widthSizes for app previewgenerator set to 128 256 512
Cannot load Zend OPcache - it was already loaded
Config value heightSizes for app previewgenerator set to 128 256
Cannot load Zend OPcache - it was already loaded
System config value jpeg_quality set to string 60
file /usr/local/bin/ncp/SYSTEM/unattended-upgrades.sh
/usr/local/bin/ncp/UPDATES/unattended-upgrades.sh not found
--2019-06-10 13:42:49--  https://packages.sury.org/php/apt.gpg
Resolving packages.sury.org (packages.sury.org)... 104.31.94.169, 104.31.95.169, 2606:4700:30::681f:5ea9, ...
Connecting to packages.sury.org (packages.sury.org)|104.31.94.169|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1769 (1.7K) [application/octet-stream]
Saving to: '/etc/apt/trusted.gpg.d/php.gpg'

/etc/apt/trusted.gpg.d/php.g 100%[==============================================>]   1.73K  --.-KB/s    in 0s      

2019-06-10 13:42:49 (4.32 MB/s) - '/etc/apt/trusted.gpg.d/php.gpg' saved [1769/1769]

file /usr/local/bin/ncp/CONFIG/nc-autoupdate-ncp.sh
/usr/local/bin/ncp/UPDATES/nc-autoupdate-ncp.sh not found
file /usr/local/bin/ncp/CONFIG/nc-notify-updates.sh
/usr/local/bin/ncp/UPDATES/nc-notify-updates.sh not found
file /usr/local/bin/ncp/CONFIG/nc-update-nc-apps-auto.sh
/usr/local/bin/ncp/UPDATES/nc-update-nc-apps-auto.sh not found
Installing nc-backup
Hit:1 http://security.debian.org/debian-security stretch/updates InRelease
Ign:2 http://deb.debian.org/debian stretch InRelease
Hit:3 http://deb.debian.org/debian stretch-updates InRelease
Hit:4 http://deb.debian.org/debian stretch Release 
Hit:5 https://packages.sury.org/php stretch InRelease
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
pigz is already the newest version (2.3.4-1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up tzdata (2018i-0+deb9u1) ...
/var/lib/dpkg/info/tzdata.config: 337: /var/lib/dpkg/info/tzdata.config: cannot create /etc/timezone: Read-only file system
dpkg: error processing package tzdata (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of php7.2-cli:
 php7.2-cli depends on tzdata; however:
  Package tzdata is not configured yet.

dpkg: error processing package php7.2-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.2-fpm:
 php7.2-fpm depends on php7.2-cli; however:
  Package php7.2-cli is not configured yet.
 php7.2-fpm depends on tzdata; however:
  Package tzdata is not configured yet.

dpkg: error processing package php7.2-fpm (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php-igbinary:
 php-igbinary depends on phpapi-20180731 | phpapi-20170718 | phpapi-20160303 | phpapi-20151012 | phpapi-20131226; however:
  Package phpapi-20180731 is not installed.
  Package phpapi-20170718 is not installed.
  Package php7.2-cli which provides phpapi-20170718 is not configured yet.
  Package php7.2-fpm which provides phpapi-20170718 is not configured yet.
  Package phpapi-20160303 is not installed.
  Package phpapi-20151012 is not installed.
  Package phpapi-20131226 is not installed.

dpkg: error processing package php-igbinary (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php-redis:
 php-redis depends on php-igbinary; however:
  Package php-igbinary is not configured yet.
 php-redis depends on phpapi-20180731 | phpapi-20170718 | phpapi-20160303 | phpapi-20151012 | phpapi-20131226; however:
  Package phpapi-20180731 is not installed.
  Package phpapi-20170718 is not installed.
  Package php7.2-cli which provides phpapi-20170718 is not configured yet.
  Package php7.2-fpm which provides phpapi-20170718 is not configured yet.
  Package phpapi-20160303 is not installed.
  Package phpapi-20151012 is not installed.
  Package phpapi-20131226 is not installed.

dpkg: error processing package php-redis (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.2:
 php7.2 depends on libapache2-mod-php7.2 | php7.2-fpm | php7.2-cgi; however:
  Package libapache2-mod-php7.2 is not installed.
  Package php7.2-fpm is not configured yet.
  Package php7.2-cgi is not installed.

dpkg: error processing package php7.2 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 tzdata
 php7.2-cli
 php7.2-fpm
 php-igbinary
 php-redis
 php7.2
E: Sub-process /usr/bin/dpkg returned an error code (1)

Also when trying letsencrypt manually from inside the container I get following errors:

root@9e608cf7:/data/etc/letsencrypt# ./certbot-auto certonly --no-bootstrap --force-renew -d mydomain.com
Creating virtual environment...
Traceback (most recent call last):
  File "<stdin>", line 27, in <module>
  File "<stdin>", line 19, in create_venv
  File "/usr/lib/python2.7/subprocess.py", line 181, in check_call
    retcode = call(*popenargs, **kwargs)
  File "/usr/lib/python2.7/subprocess.py", line 168, in call
    return Popen(*popenargs, **kwargs).wait()
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
root@9e608cf7:

I used it with --no-bootstrap because if not it tries to install a few new packages, what I guess makes no much sense being this a container…

So now I am stuck with no way of updating, no way of renewing my certificate and AFAIK with no official way of updating yet the ncp container without issues.

Any help will be much appreciated!
Thanks!

#2

Hi,

The situation is becoming worse, after a host power off (sudo shutdown -h now) and on, the nextcloudpi service is not working, I can not log to the server, only to the admin pannel. In the container log I can see a few messages like:

{"reqId":"XP7kdqwRAAcAAABhHckAAAAF","level":3,"time":"2019-06-11T01:15:02+02:00","remoteAddr":"81.32.113.174","user":"--","app":"core","method":"MKCOL","url":"\/remote.php\/webdav\/Joplin\/.sync\/","message":{"Exception":"OC\\HintException","Message":"Memcache \\OC\\Memcache\\Redis not available for local cache","Code":0,"Trace":[{"file":"\/data\/nextcloud\/lib\/private\/Server.php","line":511,"function":"__construct","class":"OC\\Memcache\\Factory","type":"->","args":["b011d79fa538477af970ad91bf512398",{"__class__":"OC\\Log"},"\\OC\\Memcache\\Redis","\\OC\\Memcache\\Redis","\\OC\\Memcache\\Redis"]},{"file":"\/data\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":118,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/data\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OC\\Memcache\\Factory"]},{"file":"\/data\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OC\\Memcache\\Factory"]},{"file":"\/data\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":165,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OC\\Memcache\\Factory"]},{"file":"\/data\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":114,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/data\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["MemCacheFactory"]},{"file":"\/data\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["MemCacheFactory"]},{"file":"\/data\/nextcloud\/lib\/private\/Server.php","line":1533,"function":"query","class":"OC\\ServerContainer","type":"->","args":["MemCacheFactory"]},{"file":"\/data\/nextcloud\/lib\/private\/Server.php","line":697,"function":"getMemCacheFactory","class":"OC\\Server","type":"->","args":[]},{"file":"\/data\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":118,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/data\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OC\\App\\AppManager"]},{"file":"\/data\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OC\\App\\AppManager"]},{"file":"\/data\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":165,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OC\\App\\AppManager"]},{"file":"\/data\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":114,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/data\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["AppManager"]},{"file":"\/data\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["AppManager"]},{"file":"\/data\/nextcloud\/lib\/private\/Server.php","line":1723,"function":"query","class":"OC\\ServerContainer","type":"->","args":["AppManager"]},{"file":"\/data\/nextcloud\/lib\/private\/legacy\/app.php","line":342,"function":"getAppManager","class":"OC\\Server","type":"->","args":[]},{"file":"\/data\/nextcloud\/lib\/private\/legacy\/app.php","line":113,"function":"getEnabledApps","class":"OC_App","type":"::","args":[]},{"file":"\/data\/nextcloud\/lib\/base.php","line":654,"function":"loadApps","class":"OC_App","type":"::","args":[["session"]]},{"file":"\/data\/nextcloud\/lib\/base.php","line":1068,"function":"init","class":"OC","type":"::","args":[]},{"file":"\/data\/nextcloud\/remote.php","line":111,"args":["\/data\/nextcloud\/lib\/base.php"],"function":"require_once"}],"File":"\/data\/nextcloud\/lib\/private\/Memcache\/Factory.php","Line":99,"Hint":"Is the matching PHP module installed and enabled?","CustomMessage":"--"},"userAgent":"node-fetch\/1.0 (+https:\/\/github.com\/bitinn\/node-fetch)","version":"15.0.5.3"},

The start-up container log (after a restart) shows some messages about Zend I don´t remember have seen:

stopping Cron...
stopping Redis...
stopping Postfix...
stopping logs...
Stopping apache
Stopping PHP-fpm
Stopping mariaDB
LAMP cleanup complete
Starting PHP-fpm
Cannot load Zend OPcache - it was already loaded
Starting Apache
Starting mariaDB
2019-06-11  1:21:39 4148889680 [Note] mysqld (mysqld 10.1.38-MariaDB-0+deb9u1) starting as process 82 ...
Starting Redis
Starting Cron
Starting Postfix
Cannot load Zend OPcache - it was already loaded
System config value trusted_domains => 1 set to string 172.17.0.7
Cannot load Zend OPcache - it was already loaded
System config value trusted_domains => 6 set to string mydomain.com
Provisioning
Provisioning Redis password
Updating NextCloud config with Redis password
Provisioning MariaDB password
Updating NextCloud config with MariaDB password
Running nc-limits
Using 3136763904B for PHP
Using 4 PHP threads
Using 1672940748 memory for the database
Stopping redis-server: redis-server.
Starting redis-server: redis-server.

e
{"reqId":"XP7mDKwRAAcAAABwfLIAAABH","level":3,"time":"2019-06-11T01:21:48+02:00","remoteAddr":"192.168.1.40","user":"--","app":"remote","method":"GET","url":"\/status.php","message":{"Exception":"OC\\HintException","Message":"Memcache \\OC\\Memcache\\Redis not available for local cache","Code":0,"Trace":[{"file":"\/data\/nextcloud\/lib\/private\/Server.php","line":511,"function":"__construct","class":"OC\\Memcache\\Factory","type":"->","args":["b011d79fa538477af970ad91bf512398",{"__class__":"OC\\Log"},"\\OC\\Memcache\\Redis","\\OC\\Memcache\\Redis","\\OC\\Memcache\\Redis"]},{"file":"\/data\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":118,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/data\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OC\\Memcache\\Factory"]},{"file":"\/data\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OC\\Memcache\\Factory"]},{"file":"\/data\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":165,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OC\\Memcache\\Factory"]},{"file":"\/data\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":114,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/data\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["MemCacheFactory"]},{"file":"\/data\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["MemCacheFactory"]},{"file":"\/data\/nextcloud\/lib\/private\/Server.php","line":1533,"function":"query","class":"OC\\ServerContainer","type":"->","args":["MemCacheFactory"]},{"file":"\/data\/nextcloud\/lib\/private\/Server.php","line":697,"function":"getMemCacheFactory","class":"OC\\Server","type":"->","args":[]},{"file":"\/data\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":118,"function":"OC\\{closure}","class":"OC\\Server","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/data\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["OC\\App\\AppManager"]},{"file":"\/data\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["OC\\App\\AppManager"]},{"file":"\/data\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":165,"function":"query","class":"OC\\ServerContainer","type":"->","args":["OC\\App\\AppManager"]},{"file":"\/data\/nextcloud\/3rdparty\/pimple\/pimple\/src\/Pimple\/Container.php","line":114,"function":"OC\\AppFramework\\Utility\\{closure}","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["*** sensitive parameters replaced ***"]},{"file":"\/data\/nextcloud\/lib\/private\/AppFramework\/Utility\/SimpleContainer.php","line":117,"function":"offsetGet","class":"Pimple\\Container","type":"->","args":["AppManager"]},{"file":"\/data\/nextcloud\/lib\/private\/ServerContainer.php","line":132,"function":"query","class":"OC\\AppFramework\\Utility\\SimpleContainer","type":"->","args":["AppManager"]},{"file":"\/data\/nextcloud\/lib\/private\/Server.php","line":1723,"function":"query","class":"OC\\ServerContainer","type":"->","args":["AppManager"]},{"file":"\/data\/nextcloud\/lib\/private\/legacy\/app.php","line":342,"function":"getAppManager","class":"OC\\Server","type":"->","args":[]},{"file":"\/data\/nextcloud\/lib\/private\/legacy\/app.php","line":113,"function":"getEnabledApps","class":"OC_App","type":"::","args":[]},{"file":"\/data\/nextcloud\/lib\/base.php","line":654,"function":"loadApps","class":"OC_App","type":"::","args":[["session"]]},{"file":"\/data\/nextcloud\/lib\/base.php","line":1068,"function":"init","class":"OC","type":"::","args":[]},{"file":"\/data\/nextcloud\/status.php","line":36,"args":["\/data\/nextcloud\/lib\/base.php"],"function":"require_once"}],"File":"\/data\/nextcloud\/lib\/private\/Memcache\/Factory.php","Line":99,"Hint":"Is the matching PHP module installed and enabled?","CustomMessage":"--"},"userAgent":"Mozilla\/5.0 (Windows) mirall\/2.3.3 (build 1) (Nextcloud)","version":"15.0.5.3"}

In the admin pannel status everything seems fine:

System Info

‣ You should enable automount to use your plugged in USB drive
NextCloudPi version	v1.10.0
NextCloudPi image	NextCloudPi_docker_03-14-19
distribution	Debian GNU/Linux 9 \n \l
automount	no
USB devices	sda
datadir	/data/nextcloud/data
data in SD	no
data filesystem	btrfs
data disk usage	22G/1.3T
rootfs usage	5.5G/15G
swapfile	/dev/zram1
dbdir	/data/database
Nextcloud check	ok
Nextcloud version	15.0.5.3
HTTPD service	up
PHP service	up
MariaDB service	up
Redis service	up
Postfix service	up
internet check	ok
port check 80	open
port check 443	open
IP	172.17.0.7
gateway	172.17.0.1
interface	eth0
certificates	mydomain.com
NAT loopback	no
uptime	6min

Could somebody help to fix this?

Thanks!

#3

You can safely ignore that.

You can run ncp-update to install the latest version of NCP v1.13.1

use:

docker exec -it nextcloudpi ncp-update

#4

Thanks for your reply @OliverV but the errors of my first message still apply on top of the ones of the second message. So I also have errors when executing ncp-update and errors when trying to renew my certificate, please see my first message. A very strange thing is that the In the ncp pannel when I click in any of the tools below UPDATES folder, those ones appear twice in the web page.

Just now tried againg ncp-udate from the host, as you suggested, with result:

 $ docker exec -it nextcloudpi ncp-update
Downloading updates
Performing updates
file /usr/local/bin/ncp/CONFIG/nc-autoupdate-nc.sh
/usr/local/bin/ncp/UPDATES/nc-autoupdate-nc.sh not found
Cannot load Zend OPcache - it was already loaded
Config value squareSizes for app previewgenerator set to 32
Cannot load Zend OPcache - it was already loaded
Config value widthSizes for app previewgenerator set to 128 256 512
Cannot load Zend OPcache - it was already loaded
Config value heightSizes for app previewgenerator set to 128 256
Cannot load Zend OPcache - it was already loaded
System config value jpeg_quality set to string 60
file /usr/local/bin/ncp/SYSTEM/unattended-upgrades.sh
/usr/local/bin/ncp/UPDATES/unattended-upgrades.sh not found
--2019-06-11 08:43:06--  https://packages.sury.org/php/apt.gpg
Resolving packages.sury.org (packages.sury.org)... 104.31.94.169, 104.31.95.169, 2606:4700:30::681f:5fa9, ...
Connecting to packages.sury.org (packages.sury.org)|104.31.94.169|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 1769 (1.7K) [application/octet-stream]
Saving to: '/etc/apt/trusted.gpg.d/php.gpg'

/etc/apt/trusted.gpg.d/php.gpg                  100%[======================================================================================================>]   1.73K  --.-KB/s    in 0.001s  

2019-06-11 08:43:07 (3.08 MB/s) - '/etc/apt/trusted.gpg.d/php.gpg' saved [1769/1769]

file /usr/local/bin/ncp/CONFIG/nc-autoupdate-ncp.sh
/usr/local/bin/ncp/UPDATES/nc-autoupdate-ncp.sh not found
file /usr/local/bin/ncp/CONFIG/nc-notify-updates.sh
/usr/local/bin/ncp/UPDATES/nc-notify-updates.sh not found
file /usr/local/bin/ncp/CONFIG/nc-update-nc-apps-auto.sh
/usr/local/bin/ncp/UPDATES/nc-update-nc-apps-auto.sh not found
Installing nc-backup
Ign:1 http://deb.debian.org/debian stretch InRelease
Hit:2 http://deb.debian.org/debian stretch-updates InRelease
Hit:3 http://deb.debian.org/debian stretch Release 
Hit:4 http://security.debian.org/debian-security stretch/updates InRelease
Hit:5 https://packages.sury.org/php stretch InRelease                   
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
pigz is already the newest version (2.3.4-1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up tzdata (2018i-0+deb9u1) ...
/var/lib/dpkg/info/tzdata.config: 337: /var/lib/dpkg/info/tzdata.config: cannot create /etc/timezone: Read-only file system
dpkg: error processing package tzdata (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of php7.2-cli:
 php7.2-cli depends on tzdata; however:
  Package tzdata is not configured yet.

dpkg: error processing package php7.2-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.2-fpm:
 php7.2-fpm depends on php7.2-cli; however:
  Package php7.2-cli is not configured yet.
 php7.2-fpm depends on tzdata; however:
  Package tzdata is not configured yet.

dpkg: error processing package php7.2-fpm (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php-igbinary:
 php-igbinary depends on phpapi-20180731 | phpapi-20170718 | phpapi-20160303 | phpapi-20151012 | phpapi-20131226; however:
  Package phpapi-20180731 is not installed.
  Package phpapi-20170718 is not installed.
  Package php7.2-cli which provides phpapi-20170718 is not configured yet.
  Package php7.2-fpm which provides phpapi-20170718 is not configured yet.
  Package phpapi-20160303 is not installed.
  Package phpapi-20151012 is not installed.
  Package phpapi-20131226 is not installed.

dpkg: error processing package php-igbinary (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php-redis:
 php-redis depends on php-igbinary; however:
  Package php-igbinary is not configured yet.
 php-redis depends on phpapi-20180731 | phpapi-20170718 | phpapi-20160303 | phpapi-20151012 | phpapi-20131226; however:
  Package phpapi-20180731 is not installed.
  Package phpapi-20170718 is not installed.
  Package php7.2-cli which provides phpapi-20170718 is not configured yet.
  Package php7.2-fpm which provides phpapi-20170718 is not configured yet.
  Package phpapi-20160303 is not installed.
  Package phpapi-20151012 is not installed.
  Package phpapi-20131226 is not installed.

dpkg: error processing package php-redis (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.2:
 php7.2 depends on libapache2-mod-php7.2 | php7.2-fpm | php7.2-cgi; however:
  Package libapache2-mod-php7.2 is not installed.
  Package php7.2-fpm is not configured yet.
  Package php7.2-cgi is not installed.

dpkg: error processing package php7.2 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 tzdata
 php7.2-cli
 php7.2-fpm
 php-igbinary
 php-redis
 php7.2
E: Sub-process /usr/bin/dpkg returned an error code (1)
$

Any idea of what is wrong or how to fix it?

Thanks!

#5

What command did you use to create the container?

If you use the -v option, to mount ncdata locally, you can just delete the container and start a a fresh one, without losing data.

Start docker with custom storage volume with:
sudo mkdir /media/ncdata
docker run -d -p 4443:4443 -p 443:443 -p 80:80 -v /media/ncdata:/data –name nextcloudpi ownyourbits/nextcloudpi-x86 sub.domain.tld

#6

Thanks @OliverV!

The command used was:

docker run -d -p 4443:4443 -p 443:443 -p 80:80 --restart=unless-stopped -v /media/nextcloud/ncdata:/data -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:ro --name nextcloudpi ownyourbits/nextcloudpi-armhf mydomain.com

/media/nextcloud/ncdata belongs to a btrfs partition in an external disk auto-mounted during the OS startup with fstab

Should I just remove the conatiner, download it again and execute again the same command?

This would be the steps, right?

docker stop nextcloudpi
docker rm nextcloudpi
docker pull ownyourbits/nextcloudpi-armhf
docker run -d -p 4443:4443 -p 443:443 -p 80:80 --restart=unless-stopped -v /media/nextcloud/ncdata:/data -v /etc/timezone:/etc/timezone:ro -v /etc/localtime:/etc/localtime:ro --name nextcloudpi ownyourbits/nextcloudpi-armhf mydomain.com

Once done what are next steps to have all my data in its place just after the problems? I mean I will still have my user and all the files/folders the same? I ask this because I use NCP as backend of my Joplin notes app and my calendars, so I would like to recover all that.

Thanks!

#7

I would create backup using nc-backup, without data, that can be used to recover mysql database containing users and their passwords.
The users and their files will be in /media/nextcloud/ncdata
Alsoexport your config to a file.

I dont know or use Joplin notes, so dont know where notes are stored. Does it allow export of notes? They might be in the db.

As for dpkg error I’d try to run:

docker exec -it nextcloudpi apt -f install

Is all I can think of for now, if it doesnt fix it, try aptitude instead of apt …:face_with_raised_eyebrow:
If something has changed upstream in ARM, we might have to report it on Github, to find a fix for -armhf .
The -x86 version, updates without an issue.

#8

So I have done a backup and also a backup of config.

I have tried docker exec -it nextcloudpi apt -f install but no luck , either with aptitude:

rock64:~$ docker exec -it nextcloudpi apt -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
6 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up tzdata (2018i-0+deb9u1) ...
/var/lib/dpkg/info/tzdata.config: 337: /var/lib/dpkg/info/tzdata.config: cannot create /etc/timezone: Read-only file system
dpkg: error processing package tzdata (--configure):
 subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of php7.2-cli:
 php7.2-cli depends on tzdata; however:
  Package tzdata is not configured yet.

dpkg: error processing package php7.2-cli (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.2-fpm:
 php7.2-fpm depends on php7.2-cli; however:
  Package php7.2-cli is not configured yet.
 php7.2-fpm depends on tzdata; however:
  Package tzdata is not configured yet.

dpkg: error processing package php7.2-fpm (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php-igbinary:
 php-igbinary depends on phpapi-20180731 | phpapi-20170718 | phpapi-20160303 | phpapi-20151012 | phpapi-20131226; however:
  Package phpapi-20180731 is not installed.
  Package phpapi-20170718 is not installed.
  Package php7.2-cli which provides phpapi-20170718 is not configured yet.
  Package php7.2-fpm which provides phpapi-20170718 is not configured yet.
  Package phpapi-20160303 is not installed.
  Package phpapi-20151012 is not installed.
  Package phpapi-20131226 is not installed.

dpkg: error processing package php-igbinary (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php-redis:
 php-redis depends on php-igbinary; however:
  Package php-igbinary is not configured yet.
 php-redis depends on phpapi-20180731 | phpapi-20170718 | phpapi-20160303 | phpapi-20151012 | phpapi-20131226; however:
  Package phpapi-20180731 is not installed.
  Package phpapi-20170718 is not installed.
  Package php7.2-cli which provides phpapi-20170718 is not configured yet.
  Package php7.2-fpm which provides phpapi-20170718 is not configured yet.
  Package phpapi-20160303 is not installed.
  Package phpapi-20151012 is not installed.
  Package phpapi-20131226 is not installed.

dpkg: error processing package php-redis (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.2:
 php7.2 depends on libapache2-mod-php7.2 | php7.2-fpm | php7.2-cgi; however:
  Package libapache2-mod-php7.2 is not installed.
  Package php7.2-fpm is not configured yet.
  Package php7.2-cgi is not installed.

dpkg: error processing package php7.2 (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 tzdata
 php7.2-cli
 php7.2-fpm
 php-igbinary
 php-redis
 php7.2
E: Sub-process /usr/bin/dpkg returned an error code (1)
rock64:~$ docker exec -it nextcloudpi aptitude -f install 
OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"aptitude\": executable file not found in $PATH": unknown
rock64:~$

So I guess next step would be to delete, download and start over a new container, right?

Could you please suggest the right steps? I guess I should use the same command I used first time with the same path -v right?

And once done, what are the steps to recover the users/data, could you please point them out or paste a known link? Because I guess users/data will not be recovered automatically right?

Thank you so much!

#9

@OliverV I fixed it!!! :slight_smile:

Worried about the continous issues with tzdata: /var/lib/dpkg/info/tzdata.config: cannot create /etc/timezone: Read-only file system
I realized my dockert run command had timezone passed from the host in ro mode so I suspected about it.

I did a commit of the current docker iimage to a new one:

docker commit nextcloudpi ownyourbits/nextcloudpi-armhf_mod

Stopped the damaged docker image

docker stop nextcloudpi

Run the new image with the same options but timezone

docker run -d -p 4443:4443 -p 443:443 -p 80:80 --restart=unless-stopped -v /media/nextcloud/ncdata:/data --name nextcloudpi_mod ownyourbits/nextcloudpi-armhf_mod mydomain.c
om

and… Worked!!! Now I could update the ncp and renew let´sencrypt.

What would be the way of updating the NC version?

Thanks!

#10

Glad to hear you got it working!

Use nc-update-nextcloud or preferably enable nc-autoupdate-nc, check all update options at
https://docs.nextcloudpi.com/en/staying-up-to-date/

#11

Thanks @OliverV

Maybe, just as a suggestion, @nachoparker would be a good ideat to put a comment in the dockerhub page noting that the /etc/timezone:/etc/timezone:ro option should not be used at least until we have a normal seamless docker update process, AFAIK pasing the timezone from host to the container is quite common.

Regards