Register for the iXsystems Community to get an ad-free experience and exclusive discounts in our eBay Store.

Upgrade nextcloud jail from FreeNAS to TrueNAS failed

liming

Newbie
Joined
Nov 20, 2020
Messages
2
Upgrade Freenas 11.3 to TrureNAS 12.2, the system is working well.
Try to upgrade nextcloud jail, follow those steps

1. iocage fetch (choose 12.2-RELEASE)
2. iocage upgrade -r 12.2-RELEASE nextcloud
got those logs as below and Nextcloud service show Internal Server Error

Snapshotting nextcloud...
Updating plugin INDEX...
Running upgrade...
Snapshotting nextcloud...
Updating plugin INDEX...
Updating plugin artifact...

Branch 12.2-RELEASE does not exist at https://github.com/freenas/iocage-plugin-nextcloud.git!
Using "master" branch for plugin, this may not work with your RELEASE
Removing old pkgs...
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 118 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
ImageMagick7-nox11: 7.0.10.24_1
avahi-app: 0.7_3
bash: 5.0.18_3
bash-completion: 2.11,2
ca_root_nss: 3.58
cups: 2.3.3_1
curl: 7.73.0
cyrus-sasl: 2.1.27_1
dbus: 1.12.20_3
dbus-glib: 0.110
expat: 2.2.8
fftw3: 3.3.8_6
fontconfig: 2.13.92_2,1
freetype2: 2.10.4
gdbm: 1.18.1_1
gettext-runtime: 0.21
ghostscript9-agpl-base: 9.52_11
giflib: 5.2.1
glib: 2.66.2,1
gmp: 6.2.0
gnome_subr: 1.0
gnutls: 3.6.15
gobject-introspection: 1.66.1,1
groff: 1.22.4_3
gsfonts: 8.11_8
icu: 68.1,1
indexinfo: 0.3.1
jbig2dec: 0.19
jbigkit: 2.1_1
jpeg-turbo: 2.0.5
lcms2: 2.11_1
libICE: 1.0.10,1
libSM: 1.2.3,1
libX11: 1.6.12,1
libXau: 1.0.9
libXdmcp: 1.1.3
libargon2: 20190702
libdaemon: 0.14_1
libedit: 3.1.20191231,1
libevent: 2.1.12
libffi: 3.3_1
libgcrypt: 1.8.7
libgd: 2.3.0,1
libgpg-error: 1.39
libiconv: 1.16
libidn: 1.35
libidn2: 2.3.0_1
liblqr-1: 0.4.2
libltdl: 2.4.6
liblz4: 1.9.2_1,1
libnghttp2: 1.41.0
libpaper: 1.1.24.4
libpthread-stubs: 0.4
libraw: 0.19.5
libtasn1: 4.16.0
libunistring: 0.9.10_1
libwmf-nox11: 0.2.8.4_15
libxcb: 1.14_1
libxml2: 2.9.10_1
libxslt: 1.1.34_1
libzip: 1.5.2
mysql57-client: 5.7.32
mysql57-server: 5.7.32
nettle: 3.6
nextcloud-php74: 20.0.1
nginx: 1.18.0_30,2
oniguruma: 6.9.6
openjpeg: 2.3.1
openldap-client: 2.4.51
p11-kit: 0.23.21
pcre: 8.44
pcre2: 10.35
perl5: 5.32.0
php74: 7.4.12
php74-bcmath: 7.4.12
php74-bz2: 7.4.12
php74-ctype: 7.4.12
php74-curl: 7.4.12
php74-dom: 7.4.12
php74-exif: 7.4.12
php74-fileinfo: 7.4.12
php74-filter: 7.4.12
php74-gd: 7.4.12
php74-gmp: 7.4.12
php74-iconv: 7.4.12
php74-intl: 7.4.12_1
php74-json: 7.4.12
php74-ldap: 7.4.12
php74-mbstring: 7.4.12
php74-opcache: 7.4.12
php74-openssl: 7.4.12
php74-pdo: 7.4.12
php74-pdo_mysql: 7.4.12
php74-pecl-APCu: 5.1.19
php74-pecl-imagick-im7: 3.4.4_2
php74-posix: 7.4.12
php74-session: 7.4.12
php74-simplexml: 7.4.12
php74-xml: 7.4.12
php74-xmlreader: 7.4.12
php74-xmlwriter: 7.4.12
php74-xsl: 7.4.12
php74-zip: 7.4.12
php74-zlib: 7.4.12
pkg: 1.15.10
pkgconf: 1.7.3,1
png: 1.6.37
poppler-data: 0.4.10
protobuf: 3.13.0,1
psutils: 1.17_5
python37: 3.7.9_1
readline: 8.0.4
tiff: 4.1.0
tpm-emulator: 0.7.4_2
trousers: 0.3.14_3
uchardet: 0.0.7
webp: 1.1.0
xorgproto: 2020.1

Number of packages to be removed: 118

The operation will free 1 GiB.
[nextcloud] [1/118] Deinstalling php74-pecl-imagick-im7-3.4.4_2...
[nextcloud] [1/118] Deleting files for php74-pecl-imagick-im7-3.4.4_2: .......... done
[nextcloud] [2/118] Deinstalling ImageMagick7-nox11-7.0.10.24_1...
[nextcloud] [2/118] Deinstalling ImageMagick7-nox11-7.0.10.24_1...
pkg: Failed to execute lua script: [string "args = {}..."]:11: attempt to call a nil value (field 'filecmp')
[nextcloud] [2/118] Deinstalling ImageMagick7-nox11-7.0.10.24_1...
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
pkg: lua script failed
[nextcloud] [2/118] Deleting files for ImageMagick7-nox11-7.0.10.24_1: .......... done
pkg: lua script failed
pkg: lua script failed
[nextcloud] [3/118] Deinstalling ghostscript9-agpl-base-9.52_11...
[nextcloud] [3/118] Deleting files for ghostscript9-agpl-base-9.52_11: .......... done
pkg: lua script failed
[nextcloud] [4/118] Deinstalling cups-2.3.3_1...
pkg: lua script failed
[nextcloud] [4/118] Deinstalling cups-2.3.3_1...
pkg: Failed to execute lua script: [string "args = {}..."]:11: attempt to call a nil value (field 'filecmp')
[nextcloud] [4/118] Deinstalling cups-2.3.3_1...
pkg: lua script failed

[nextcloud] [4/118] Deleting files for cups-2.3.3_1: .......... done
pkg: lua script failed
==> You should manually remove the "cups" user.
pkg: lua script failed
==> You should manually remove the "cups" group
pkg: lua script failed
[nextcloud] [5/118] Deinstalling avahi-app-0.7_3...
pkg: lua script failed
[nextcloud] [5/118] Deinstalling avahi-app-0.7_3...
pkg: Failed to execute lua script: [string "args = {}..."]:11: attempt to call a nil value (field 'filecmp')
[nextcloud] [5/118] Deinstalling avahi-app-0.7_3...
pkg: lua script failed

[nextcloud] [5/118] Deleting files for avahi-app-0.7_3: .......... done
pkg: lua script failed
==> You should manually remove the "avahi" user.
pkg: lua script failed
==> You should manually remove the "avahi" group
pkg: lua script failed
[nextcloud] [6/118] Deinstalling nextcloud-php74-20.0.1...
pkg: lua script failed

TL;DR

[nextcloud] [118/118] Deinstalling xorgproto-2020.1...
[nextcloud] [118/118] Deleting files for xorgproto-2020.1: .......... done
pkg: lua script failed
Installing new pkgs...

Testing Host DNS response to pkg.FreeBSD.org
Testing nextcloud's SRV response to pkg.FreeBSD.org
Testing nextcloud's DNSSEC response to pkg.FreeBSD.org

Installing plugin packages:
- nextcloud-php74...
- php74-pecl-imagick-im7...
- php74-bcmath...
- php74-gmp...
- nginx...
- mysql57-server...

Branch 12.2-RELEASE does not exist at https://github.com/freenas/iocage-plugin-nextcloud.git!
Using "master" branch for plugin, this may not work with your RELEASE

nextcloud successfully upgraded!
 

liming

Newbie
Joined
Nov 20, 2020
Messages
2
ok...solve the issue

iocage console nextcloud to find mysql server didn't run.
Download the latest nextcloud zip file to replace origin html files and run occ upgrade again.
Nextcloud come back!
 

omid_1985

Newbie
Joined
Aug 22, 2018
Messages
3
ok...solve the issue

iocage console nextcloud to find mysql server didn't run.
Download the latest nextcloud zip file to replace origin html files and run occ upgrade again.
Nextcloud come back!
Could you please explain more about what exactly you did to fix your issue?
I've done
1. iocage fetch (choose 12.2-RELEASE)
2. iocage upgrade -r 12.2-RELEASE nextcloud
And I have internal server error too.

"Download the latest nextcloud.zip" - From where? Have you done it inside the jail?
"replace origin html files" - Does this mean unzipping the nextcloud.zip and copy everything from ? to ?
"run occ upgrade again" - I assume after all above I need to type occ upgrade inside the jail?
 

omid_1985

Newbie
Joined
Aug 22, 2018
Messages
3
Moved from scripted installation to official plugin as I already have reverse proxy and ACME package. Everything working again.
 
Last edited:

ManNorb

Newbie
Joined
Dec 23, 2020
Messages
3
@liming I would be very happy if could elaborate how you solved the issue with Nextcloud after the upgrade to Truenas. I got the same problem and don't want to reinstall the complete plugin.
 

ManNorb

Newbie
Joined
Dec 23, 2020
Messages
3
ok...solve the issue

iocage console nextcloud to find mysql server didn't run.
Download the latest nextcloud zip file to replace origin html files and run occ upgrade again.
Nextcloud come back!
@liming I would be very happy if could elaborate how you solved the issue with Nextcloud after the upgrade to Truenas. I got the same problem and don't want to reinstall the complete plugin
 

warriorcookie

Member
Joined
Apr 17, 2017
Messages
48
Not sure if you found the solution but here's how I fixed mine. Keep in mind I'm not using a plugin, just a Jail that I manually installed everything. This might not be completely accurate but should get you close enough to poke around and figure it out.

iocage upgrade -r 12.2-RELEASE nextcloud resulted in a 404 not found error. There's a freebsd issue that points to the wrong URL.

As per https://github.com/iocage/iocage/issues/1237#issuecomment-749516537
On the truenas/freenas host edit /usr/local/lib/python3.8/site-packages/iocage_lib/ioc_upgrade.py:

Code:
OLD
<         f_rel = f'{self.new_release.rsplit("-RELEASE")[0]}.0'
<         f = 'https://raw.githubusercontent.com/freebsd/freebsd' \
<             f'/release/{f_rel}/usr.sbin/freebsd-update/freebsd-update.sh'
---
NEW
>         f_rel = f'{self.new_release.split(".")[0]}'
>         f = f'https://raw.githubusercontent.com/freebsd/freebsd' \
>             f'/stable/{f_rel}/usr.sbin/freebsd-update/freebsd-update.sh'


trying iocage upgrade -r 12.2-RELEASE nextcloud now works.
Then on the nextcloud guest (iocage consoled nextcloud) pkg update && pkg upgrade

For me I use mariadb so after update run mariadb-upgrade (I actually needed mariadb-upgrade -u root -p)
Also, the socket location moved. In your nextcloud directory navigate to config directory and edit config.php
Code:
OLD
<    'dbhost' => 'localhost:/tmp/mysql.sock',
---
NEW
>    'dbhost' => 'localhost:/var/run/mysql/mysql.sock',


service apache24 restart
in your browser navigate to your nextcloud address and see if it's up.

If not, then try in your nextcloud directory:
sudo -u www php occ maintenance:repair (change www to whatever user has ownership of occ, might be www-data)
service apache24 restart

good luck.
 

ManNorb

Newbie
Joined
Dec 23, 2020
Messages
3
Not sure if you found the solution but here's how I fixed mine. Keep in mind I'm not using a plugin, just a Jail that I manually installed everything. This might not be completely accurate but should get you close enough to poke around and figure it out.

iocage upgrade -r 12.2-RELEASE nextcloud resulted in a 404 not found error. There's a freebsd issue that points to the wrong URL.

As per https://github.com/iocage/iocage/issues/1237#issuecomment-749516537
On the truenas/freenas host edit /usr/local/lib/python3.8/site-packages/iocage_lib/ioc_upgrade.py:

Code:
OLD
<         f_rel = f'{self.new_release.rsplit("-RELEASE")[0]}.0'
<         f = 'https://raw.githubusercontent.com/freebsd/freebsd' \
<             f'/release/{f_rel}/usr.sbin/freebsd-update/freebsd-update.sh'
---
NEW
>         f_rel = f'{self.new_release.split(".")[0]}'
>         f = f'https://raw.githubusercontent.com/freebsd/freebsd' \
>             f'/stable/{f_rel}/usr.sbin/freebsd-update/freebsd-update.sh'


trying iocage upgrade -r 12.2-RELEASE nextcloud now works.
Then on the nextcloud guest (iocage consoled nextcloud) pkg update && pkg upgrade
Hi and thanks for your reply!

I'm still stuck at upgrading my jail from 12.1 to 12.2 even after chaning the lines in /usr/local/lib/python3.8/site-packages/iocage_lib/ioc_upgrade.py

Still getting Branch 12.2-RELEASE does not exist at https://github.com/freenas/iocage-plugin-nextcloud.git! using master branch release.

And when trying to access nextcloud web I get :

Internal Server Error

The server encountered an internal error and was unable to complete your request.

Any other ideas ?
 

warriorcookie

Member
Joined
Apr 17, 2017
Messages
48
Hi and thanks for your reply!

I'm still stuck at upgrading my jail from 12.1 to 12.2 even after chaning the lines in /usr/local/lib/python3.8/site-packages/iocage_lib/ioc_upgrade.py

Still getting Branch 12.2-RELEASE does not exist at https://github.com/freenas/iocage-plugin-nextcloud.git! using master branch release.

And when trying to access nextcloud web I get :

Internal Server Error

The server encountered an internal error and was unable to complete your request.

Any other ideas ?
Sorry I don't use the plugin myself so I suspect there's additional issues I didn't experience.

During the course of trying to fix this I broke my freenas jail a couple times and had to restore snapshots to get back to square one with a working instance, albeit depreciated. Hopefully you can do the same?
 

Baenwort

Member
Joined
Feb 19, 2015
Messages
72
Hi and thanks for your reply!

I'm still stuck at upgrading my jail from 12.1 to 12.2 even after chaning the lines in /usr/local/lib/python3.8/site-packages/iocage_lib/ioc_upgrade.py

Still getting Branch 12.2-RELEASE does not exist at https://github.com/freenas/iocage-plugin-nextcloud.git! using master branch release.
This is because the maintainer of the nextcloud plugin instructions (what is contained at https://github.com/freenas/iocage-plugin-nextcloud.git ) have not created a 12.2-RELEASE branch. Now this is not necessarily a problem if the particular pkg doesn't have any breaking changes between releases or changes in dependencies.

If there is then someone will need to pull a change in and create a VERSION-RELEASE branch of both the install directions git (the one you linked) and the actual plug in steps in: https://github.com/ix-plugin-hub/iocage-plugin-index/ under the correct branch.

Basically the warning you are receiving indicates that either no-one has tested this particular release or that your plug in is being maintained by people who aren't using the VERSION-RELEASE branch strategy to indicate to people that the plug in has been tested against that particular release.
 
Top