SOLVED Nextcloud database driver missing after iocage upgrade

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
I´ve done it again :)

I had a working Nextcloud 20.0.3 running in a 11.3 jail (running TrueNAS Core 12.0-U1).
Trying to keep up with the times, I upgraded the jail:
Code:
iocage upgrade -r 12.2-RELEASE nextcloud


Now my Nextcloud is broken. It seems the be a problem with the database driver. From the /var/log/nextcloud/nextcloud.log:
Code:
Exception":"Doctrine\\DBAL\\DBALException","Message":"Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory","Code":0


This is repeated multiple times.

Running
Code:
 mysql -u root -p


gives the response
Code:
ld-elf.so.1: Shared object "libssl.so.8" not found, required by "mysql"


I could really use some help in getting this sorted. I know there have been lots of posts and questions about this already, but I really have tried to find a solution, but now I hope someone here can help, as i have not found my way out of this....
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I don't see mention of you having already run pkg upgrade in the jail after the update to the OS... did you do that?
 

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
I don't see mention of you having already run pkg upgrade in the jail after the update to the OS... did you do that?
Yes, I did that after iocage upgrade.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
what comes out of pkg info ?
 

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
what comes out of pkg info ?
quite a list:

Code:
ImageMagick6-nox11-6.9.11.6_1,1 Image processing tools (legacy version)
aide-0.16.1                    File and directory integrity checker
apache24-2.4.46                Version 2.4.x of Apache web server
apr-1.7.0.1.6.1_1              Apache Portability Library
autoconf-2.69_3                Automatically configure source code on many Un*x platforms
autoconf-wrapper-20131203      Wrapper script for GNU autoconf
automake-1.16.3                GNU Standards-compliant Makefile generator
avahi-app-0.7_3                Service discovery on a local network
bash-5.1                       GNU Project's Bourne Again SHell
bash-completion-2.11,2         Programmable completion library for Bash
ca_root_nss-3.58               Root certificate bundle from the Mozilla Project
cmake-3.18.5                   Cross-platform Makefile generator
cmocka-1.1.5                   Unit testing framework for C with support for mock objects
cups-2.3.3_1                   Common UNIX Printing System
curl-7.74.0                    Command line tool and library for transferring data with URLs
cyrus-sasl-2.1.27_1            RFC 2222 SASL (Simple Authentication and Security Layer)
db5-5.3.28_7                   Oracle Berkeley DB, revision 5.3
dbus-1.12.20_3                 Message bus system for inter-application communication
dbus-glib-0.110                GLib bindings for the D-BUS messaging system
dialog4ports-0.1.6             Console Interface to configure ports
expat-2.2.10                   XML 1.0 parser written in C
fftw3-3.3.8_6                  Fast C routines to compute the Discrete Fourier Transform
fontconfig-2.13.92_2,1         XML-based font configuration API for X Windows
freetype2-2.10.4               Free and portable TrueType font rendering engine
fribidi-1.0.10                 Free Implementation of the Unicode Bidirectional Algorithm
gamin-0.1.10_10                File and directory monitoring system
gdbm-1.18.1_1                  GNU database manager
gettext-runtime-0.21           GNU gettext runtime libraries and programs
gettext-tools-0.21             GNU gettext development and translation tools
ghostscript9-agpl-base-9.52_12 PostScript and PDF interpreter
giflib-5.2.1                   Tools and library routines for working with GIF images
glib-2.66.3,1                  Some useful routines of C programming (current stable version)
gmake-4.3_2                    GNU version of 'make' utility
gmp-6.2.1                      Free library for arbitrary precision arithmetic
gnome_subr-1.0                 Common startup and shutdown subroutines used by GNOME scripts
gnutls-3.6.15                  GNU Transport Layer Security library
gobject-introspection-1.66.1,1 Generate interface introspection data for GObject libraries
graphite2-1.3.14               Rendering capabilities for complex non-Roman writing systems
gsfonts-8.11_8                 Standard Fonts for Ghostscript
harfbuzz-2.7.2_1               OpenType text shaping engine
help2man-1.47.16               Automatically generating simple manual pages from program output
icu-68.1,1                     International Components for Unicode (from IBM)
indexinfo-0.3.1                Utility to regenerate the GNU info page index
jansson-2.13.1                 C library for encoding, decoding, and manipulating JSON data
jbig2dec-0.19                  Decoder implementation of the JBIG2 image compression format
jbigkit-2.1_1                  Lossless compression for bi-level images such as scanned pages, faxes
jpeg-turbo-2.0.6               SIMD-accelerated JPEG codec which replaces libjpeg
jsoncpp-1.9.4                  JSON reader and writer library for C++
lcms2-2.11_1                   Accurate, fast, and small-footprint color management engine
libICE-1.0.10,1                Inter Client Exchange library for X11
libSM-1.2.3,1                  Session Management library for X11
libX11-1.6.12,1                X11 library
libXau-1.0.9                   Authentication Protocol library for X11
libXdmcp-1.1.3                 X Display Manager Control Protocol library
libarchive-3.4.3,1             Library to create and read several streaming archive formats
libargon2-20190702             Memory hard password hashing program and library
libdaemon-0.14_1               Lightweight C library that eases the writing of UNIX daemons
libedit-3.1.20191231,1         Command line editor library
libffi-3.3_1                   Foreign Function Interface
libgcrypt-1.8.7                General purpose cryptographic library based on the code from GnuPG
libgd-2.3.0,1                  Graphics library for fast creation of images
libgpg-error-1.39              Common error values for all GnuPG components
libiconv-1.16                  Character set conversion library
libidn-1.35                    Internationalized Domain Names command line tool
libidn2-2.3.0_1                Implementation of IDNA2008 internationalized domain names
libinotify-20180201_2          Kevent based inotify compatible library
liblqr-1-0.4.2                 Easy to use C/C++ seam carving library
libltdl-2.4.6                  System independent dlopen wrapper
liblz4-1.9.3,1                 LZ4 compression library, lossless and very fast
libnghttp2-1.41.0              HTTP/2.0 C Library
libpaper-1.1.24.4              Library providing routines for paper size management
libpthread-stubs-0.4           Weak aliases for pthread functions
libraqm-0.6.0                  Library that encapsulates complex text layout logic
libraw-0.19.5                  Library for manipulating raw images
libsunacl-1.0.1                Wrapper providing SunOS NFSv4 ACL API
libtasn1-4.16.0                ASN.1 structure parser library
libtextstyle-0.21              Text styling library
libtool-2.4.6_1                Generic shared library support script
libunistring-0.9.10_1          Unicode string library
libunwind-20200331_1           Generic stack unwinding library
libuv-1.40.0                   Multi-platform support library with a focus on asynchronous I/O
libwmf-nox11-0.2.8.4_15        Tools and library for converting Microsoft WMF (windows metafile)
libxcb-1.14_1                  The X protocol C-language Binding (XCB) library
libxml2-2.9.10_2               XML parser library for GNOME
libxslt-1.1.34_1               The XSLT C library for GNOME
libzip-1.5.2                   C library for reading, creating, and modifying ZIP archives
lmdb-0.9.24_3,1                OpenLDAP Lightning Memory-Mapped Database
lzo2-2.10_1                    Portable speedy, lossless data compression library
m4-1.4.18_1,1                  GNU M4
mariadb102-client-10.2.30      Multithreaded SQL database (client)
mariadb102-server-10.2.30      Multithreaded SQL database (server)
mhash-0.9.9.9_5                Easy-to-use library for strong hashes such as MD5 and SHA1
nano-5.4                       Nano's ANOther editor, an enhanced free Pico clone
nettle-3.6                     Low-level cryptographic library
nextcloud-php73-20.0.4         Personal cloud which runs on your own server
ninja-1.10.2,2                 Small build system closest in spirit to Make
oniguruma-6.9.6                Regular expressions library compatible with POSIX/GNU/Perl
openjpeg-2.3.1                 Open-source JPEG 2000 codec
openldap-client-2.4.56         Open source LDAP client implementation
p11-kit-0.23.22                Library for loading and enumerating of PKCS#11 modules
p5-Locale-gettext-1.07         Message handling functions
p5-Locale-libintl-1.32         Internationalization library for Perl
p5-Parse-Yapp-1.21             Perl extension for generating and using LALR parsers
p5-Text-Unidecode-1.30         US-ASCII transliterations of Unicode text
p5-Unicode-EastAsianWidth-12.0 East Asian Width properties
pcre-8.44                      Perl Compatible Regular Expressions library
pcre2-10.36                    Perl Compatible Regular Expressions library, version 2
perl5-5.32.0_1                 Practical Extraction and Report Language
php73-7.3.25                   PHP Scripting Language
php73-bcmath-7.3.25            The bcmath shared extension for php
php73-bz2-7.3.25               The bz2 shared extension for php
php73-ctype-7.3.25             The ctype shared extension for php
php73-curl-7.3.25              The curl shared extension for php
php73-dom-7.3.25               The dom shared extension for php
php73-exif-7.3.25              The exif shared extension for php
php73-fileinfo-7.3.25          The fileinfo shared extension for php
php73-filter-7.3.25            The filter shared extension for php
php73-gd-7.3.25                The gd shared extension for php
php73-gmp-7.3.25               The gmp shared extension for php
php73-hash-7.3.25              The hash shared extension for php
php73-iconv-7.3.25             The iconv shared extension for php
php73-intl-7.3.25              The intl shared extension for php
php73-json-7.3.25              The json shared extension for php
php73-ldap-7.3.25              The ldap shared extension for php
php73-mbstring-7.3.25          The mbstring shared extension for php
php73-opcache-7.3.25           The opcache shared extension for php
php73-openssl-7.3.25           The openssl shared extension for php
php73-pdo-7.3.25               The pdo shared extension for php
php73-pdo_mysql-7.3.25         The pdo_mysql shared extension for php
php73-pecl-APCu-5.1.19         APC User Caching
php73-pecl-imagick-3.4.4_2     PHP wrapper to the ImageMagick/GraphicsMagick library version 6
php73-pecl-redis-5.3.2         Extension to access Redis
php73-pecl-smbclient-1.0.0_1   Smbclient wrapper extension
php73-posix-7.3.25             The posix shared extension for php
php73-session-7.3.25           The session shared extension for php
php73-simplexml-7.3.25         The simplexml shared extension for php
php73-wddx-7.3.25              The wddx shared extension for php
php73-xml-7.3.25               The xml shared extension for php
php73-xmlreader-7.3.25         The xmlreader shared extension for php
php73-xmlwriter-7.3.25         The xmlwriter shared extension for php
php73-xsl-7.3.25               The xsl shared extension for php
php73-zip-7.3.25               The zip shared extension for php
php73-zlib-7.3.25              The zlib shared extension for php
pkg-1.15.10                    Package manager
pkgconf-1.7.3,1                Utility to help to configure compiler and linker flags
png-1.6.37                     Library for manipulating PNG images
poppler-data-0.4.10            Poppler encoding data
popt-1.18_1                    Getopt(3) like library with a number of enhancements, from Redhat
postfix-sasl-3.5.8,1           Postfix with Cyrus SASL support
py27-acme-1.10.1,1             ACME protocol implementation in Python
py27-asn1crypto-1.4.0          ASN.1 library with a focus on performance and a pythonic API
py27-certifi-2020.11.8         Mozilla SSL certificates
py27-cffi-1.14.4               Foreign Function Interface for Python calling C code
py27-chardet-3.0.4_3           Universal encoding detector for Python 2 and 3
py27-configargparse-1.2.3      Drop-in replacement for argparse
py27-configobj-5.0.6_1         Simple but powerful config file reader and writer
py27-cryptography-2.9.2        Cryptographic recipes and primitives for Python developers
py27-distro-1.5.0              Linux OS platform information API
py27-enum34-1.1.10             Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7
py27-funcsigs-1.0.2            Python function signatures from PEP362
py27-idna-2.10                 Internationalized Domain Names in Applications (IDNA)
py27-ipaddress-1.0.23          Port of Python 3.3+ ipaddress module to 2.7
py27-josepy-1.4.0              JOSE protocol implementation in Python
py27-mock-3.0.5                Rolling backport of unittest.mock for all Pythons
py27-openssl-19.0.0            Python interface to the OpenSSL library
py27-parsedatetime-2.6         Python module for parsing 'human readable' date/time expressions
py27-pycparser-2.20            C parser in Python
py27-pyrfc3339-1.1             Generate and parse RFC 3339 timestamps
py27-pysocks-1.7.1             Python SOCKS module
py27-pytz-2020.1,1             World Timezone Definitions for Python
py27-requests-2.22.0_2         HTTP library written in Python for human beings
py27-requests-toolbelt-0.9.1   Utility belt for advanced users of python-requests
py27-setuptools-44.0.0         Python packages installer
py27-six-1.15.0                Python 2 and 3 compatibility utilities
py27-urllib3-1.25.11,1         HTTP library with thread-safe connection pooling, file post, and more
py27-zope.component-4.2.2      Zope Component Architecture
py27-zope.event-4.1.0          Very basic event publishing system
py27-zope.interface-4.6.0      Interfaces for Python
py37-Babel-2.8.0               Collection of tools for internationalizing Python applications
py37-Jinja2-2.11.2_1           Fast and easy to use stand-alone template engine
py37-acme-1.10.1,1             ACME protocol implementation in Python
py37-alabaster-0.7.6           Modified Kr Sphinx theme
py37-asn1crypto-1.4.0          ASN.1 library with a focus on performance and a pythonic API
py37-certbot-1.10.1,1          Let's Encrypt client
py37-certifi-2020.11.8         Mozilla SSL certificates
py37-cffi-1.14.4               Foreign Function Interface for Python calling C code
py37-chardet-3.0.4_3           Universal encoding detector for Python 2 and 3
py37-configargparse-1.2.3      Drop-in replacement for argparse
py37-configobj-5.0.6_1         Simple but powerful config file reader and writer
py37-cryptography-2.9.2        Cryptographic recipes and primitives for Python developers
py37-cython-0.29.21            Compiler for Writing C Extensions for the Python Language
py37-distro-1.5.0              Linux OS platform information API
py37-dnspython-1.16.0          DNS toolkit for Python
py37-docutils-0.15.2           Python Documentation Utilities
py37-idna-2.10                 Internationalized Domain Names in Applications (IDNA)
py37-imagesize-1.1.0           Python image size library
py37-iso8601-0.1.12            Simple module to parse ISO 8601 dates
py37-josepy-1.4.0              JOSE protocol implementation in Python
py37-markdown-2.6.11_1         Python implementation of Markdown
py37-markupsafe-1.1.1          Implements XML/HTML/XHTML Markup safe string for Python
py37-mock-3.0.5                Rolling backport of unittest.mock for all Pythons
py37-openssl-19.0.0            Python interface to the OpenSSL library
py37-packaging-20.7            Core utilities for Python packages
py37-parsedatetime-2.6         Python module for parsing 'human readable' date/time expressions
py37-pycparser-2.20            C parser in Python
py37-pygments-2.7.1            Syntax highlighter written in Python
py37-pyparsing-2.4.7           General parsing module for Python
py37-pyrfc3339-1.1             Generate and parse RFC 3339 timestamps
py37-pysocks-1.7.1             Python SOCKS module
py37-pystemmer-2.0.0.1         Snowball Stemming Algorithms for Information Retrieval
py37-pytz-2020.1,1             World Timezone Definitions for Python
py37-requests-2.22.0_2         HTTP library written in Python for human beings
py37-requests-toolbelt-0.9.1   Utility belt for advanced users of python-requests
py37-setuptools-44.0.0         Python packages installer
py37-six-1.15.0                Python 2 and 3 compatibility utilities
py37-snowballstemmer-1.2.1     Snowball stemming library collection for Python
py37-sphinx-3.3.1,1            Python documentation generator
py37-sphinx_rtd_theme-0.4.3    Mobile-friendly py-sphinx theme
py37-sphinxcontrib-applehelp-1.0.2 Extension which outputs Apple help books
py37-sphinxcontrib-devhelp-1.0.2 Sphinx extension which outputs Devhelp document
py37-sphinxcontrib-htmlhelp-1.0.3 Sphinx extension which renders HTML help files
py37-sphinxcontrib-jsmath-1.0.1 Sphinx extension which renders display math in HTML via JavaScript
py37-sphinxcontrib-qthelp-1.0.3 Sphinx extension which outputs QtHelp document
py37-sphinxcontrib-serializinghtml-1.1.4 Sphinx extension which outputs serialized HTML files (json and pickle)
py37-sphinxcontrib-websupport-1.2.4 Sphinx API for Web Apps
py37-urllib3-1.25.11,1         HTTP library with thread-safe connection pooling, file post, and more
py37-zope.component-4.2.2      Zope Component Architecture
py37-zope.event-4.1.0          Very basic event publishing system
py37-zope.interface-4.6.0      Interfaces for Python
python27-2.7.18_1              Interpreted object-oriented programming language
python37-3.7.9_1               Interpreted object-oriented programming language
readline-8.0.4                 Library for editing command lines as they are typed
redis-5.0.9                    Persistent key-value database with built-in net interface
rhash-1.4.0                    Utility and library for computing and checking of file hashes
samba412-4.12.9_1              Free SMB/CIFS and AD/DC server and client for Unix
scons-3.1.1                    Build tool alternative to make
talloc-2.3.1                   Hierarchical pool based memory allocator
tdb-1.4.3,1                    Trivial Database
tevent-0.10.2                  Talloc based event loop library
texinfo-6.7_4,1                Typeset documentation system with multiple format output
tiff-4.1.0                     Tools and library routines for working with TIFF images
tpm-emulator-0.7.4_2           Trusted Platform Module (TPM) emulator
trousers-0.3.14_3              Open-source TCG Software Stack
unixODBC-2.3.9                 ODBC library suite for Unix
webp-1.1.0                     Google WebP image format conversion tool
xorgproto-2020.1               X Window System unified protocol definitions
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
One I can see that I have (although my install method isn't via plugin), but you don't have is p5-Net-SSLeay

Since the error references an ssl driver, maybe it will help:
pkg install p5-Net-SSLeay

Also maybe libepoxy
pkg install libepoxy

And one more:
pkg install php73-mysqli
 

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
I installed both, restarted Apache and tried to start mysql. Same error in the terminal, and same error in the nextcloud log. Any other thoughts?
Thanks for taking the time to help me, by the way.

Oh, this is not installed via plugin either btw. standard jail, manual install.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
I guess you missed the third one which I edited in then... php73-mysqli
I suppose you are right. I installed that too, but the problem persists....
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Maybe it's just a good time to consider reinstalling the jail.

I used @danb35 's script https://www.truenas.com/community/resources/scripted-installation-of-nextcloud-19-in-iocage-jail.90/

It uses php7.4 and gets you to version 20.

You can opt out of the SSL stuff if you already have that under control and if you already have the data outside your jail, it gives you the option to just point to that (or it's a good chance to change to having things that way.

Most of your important work will just be transferring over the nextcloud install, data directory, database and config. I managed to grab a working install from linux and bring those over and had it working without too much fuss... although I messed up the 2FA, so I would recommend turning that off before the move and putting it back after so you don't end up locked out and searching for solutions of how to get in like I needed to.
 

Jailer

Not strong, but bad
Joined
Sep 12, 2014
Messages
4,977
I ran into this with a few of my jails over the weekend. You need to upgrade your maridb version. Run pkg install mariadb103-server and install it along with the dependecies it's pulls. Once it's installed run mysql_upgrade -u root -p and enter the databse password to start the upgrade. Once that has completed restart the service service mysql-server restart and it should be working again.
 

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
I ran into this with a few of my jails over the weekend. You need to upgrade your maridb version. Run pkg install mariadb103-server and install it along with the dependecies it's pulls. Once it's installed run mysql_upgrade -u root -p and enter the databse password to start the upgrade. Once that has completed restart the service service mysql-server restart and it should be working again.
Yes. I did exactly this, and after that it works again. Thanks and merry christmas to everybody :)
 

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
I ran into this with a few of my jails over the weekend. You need to upgrade your maridb version. Run pkg install mariadb103-server and install it along with the dependecies it's pulls. Once it's installed run mysql_upgrade -u root -p and enter the databse password to start the upgrade. Once that has completed restart the service service mysql-server restart and it should be working again.

Ok, so i tried upgrading another nextcloud server, in the exact same way. Almost. On the first one, I just realised I actually never ran the command:
Code:
mysql_upgrade -u root -p
, but other than that I´ve done it the exact same way. But now I am again stuck on the same error:

Code:
{"Exception":"Doctrine\\DBAL\\DBALException","Message":"Failed to connect to the database: An exception occurred in driver: SQLSTATE[HY000] [2002] No such file or directory",


I´ve tried all the steps above, but to no avail. What might a good next step be?
 

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
By the way,
Code:
 mysql -u root -p
works fine, and my nextcloud database is there. I can also login using my nextcloud_admin user here.
 

dnilgreb

Contributor
Joined
Mar 29, 2016
Messages
168
Solved it. again. in the new mysql install, the location of mysql.sock was reset (of course) to its default location. edited my.cnf, putting it back at /tmp/mysql.sock solved the problem.
 
Top