Cannot load login screen, error 500, possible mysql problem

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 20 something (it wont start)
Operating system and version (eg, Ubuntu 20.04): FreeBSD 12 jail
Apache or nginx version (eg, Apache 2.4.25): 2.4.41
PHP version (eg, 7.4): 7.3.15

The issue you are facing: Login screen wont show after power outage - error 500

Is this the first time you’ve seen this error? (Y/N): YES

Steps to replicate it:

  1. n/a

The output of your Nextcloud log in Admin > Logging:

Can't log in to NC

Hi,
I had a power outage yesterday and since then mysql will not start. I was not doing any updates or anything, it was just ticking along before the outage. Now power is back, Apache server is up n running, but mysql wont start. Maybe I just need to reinstall a package, or clear a cache?

When booting the Nextcloud FreeBSD jail that houses the NC instance, the messages log states:

nextcloud root[4068]: /etc/rc: WARNING: failed to start mysql

If I ssh to the command line and try to start mysql I get this:

root@nextcloud:~  # service mysql-server start
Starting mysql.
limits: NO: No such file or directory
/usr/local/etc/rc.d/mysql-server: WARNING: failed to start mysql

Although that directory does exist (are they referring to something else?):

root@nextcloud:/usr/local/etc/rc.d  # ls -la
total 127
drwxr-xr-x   2 root  wheel    13 Sep  5 15:59 .
drwxr-xr-x  20 root  wheel    42 Sep  5 16:17 ..
-r-xr-xr-x   1 root  wheel  6230 Jan 30  2020 apache24
-r-xr-xr-x   1 root  wheel   945 Aug 26 03:31 avahi-daemon
-r-xr-xr-x   1 root  wheel  1197 Aug 26 03:31 avahi-dnsconfd
-rwxr-xr-x   1 root  wheel   447 Aug 26 09:19 cupsd
-rwxr-xr-x   1 root  wheel   592 Aug 26 03:24 dbus
-r-xr-xr-x   1 root  wheel  3068 Jan 31  2020 garb
-r-xr-xr-x   1 root  wheel  1834 Jan 30  2020 htcacheclean
-r-xr-xr-x   1 root  wheel  4103 Feb  4  2020 mysql-server
-r-xr-xr-x   1 root  wheel  1305 Feb 22  2020 php-fpm
-rwxr-xr-x   1 root  wheel  1143 Aug 26 09:09 tcsd
-rwxr-xr-x   1 root  wheel   527 Aug 26 09:06 tpmd

Everything was fine and dandy before the power outage. I have a dump of my databases but I guess this problem is something else, more low level.

Trying to check the mysql version I got this:

root@nextcloud:~  # mysql -u root -p
ld-elf.so.1: Shared object "libssl.so.8" not found, required by "mysql"

Trying to check the php version I got this in return:

root@nextcloud:~  # php -v
PHP Warning:  PHP Startup: Unable to load dynamic library 'curl.so' (tried: /usr/local/lib/php/20180731/curl.so (Shared object "libssl.so.8" not found, required by "libcurl.so.4"), /usr/local/lib/php/20180731/curl.so.so (Cannot open "/usr/local/lib/php/20180731/curl.so.so")) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'ldap.so' (tried: /usr/local/lib/php/20180731/ldap.so (Shared object "libssl.so.8" not found, required by "libldap-2.4.so.2"), /usr/local/lib/php/20180731/ldap.so.so (Cannot open "/usr/local/lib/php/20180731/ldap.so.so")) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'openssl.so' (tried: /usr/local/lib/php/20180731/openssl.so (Shared object "libssl.so.8" not found, required by "openssl.so"), /usr/local/lib/php/20180731/openssl.so.so (Cannot open "/usr/local/lib/php/20180731/openssl.so.so")) in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library 'zip.so' (tried: /usr/local/lib/php/20180731/zip.so (Shared object "libssl.so.8" not found, required by "libzip.so.5"), /usr/local/lib/php/20180731/zip.so.so (Cannot open "/usr/local/lib/php/20180731/zip.so.so")) in Unknown on line 0
PHP 7.3.15 (cli) (built: Feb 22 2020 01:13:52) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.15, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.15, Copyright (c) 1999-2018, by Zend Technologies