Lost connection to LDAP server after mariadb upgrade

Please delete everything above when creating your topic and provide the following:

Nextcloud version (eg, 12.0.5.3):
Operating system and version (eg, Ubuntu 17.04): Ubuntu 16.04.4 LTS
Apache or nginx version (eg, Apache 2.4.25): 2.4.18-2ubuntu3.5
PHP version (eg, 7.1):7.0.25-0ubuntu0.16.04.1

The issue you are facing:

After security upgrade from mariadb-common and mariadb-client-core from

10.0.33-0ubuntu0.16.04.1 to
10.0.34-0ubuntu0.16.04.1

no user login is possible any more.

Website says

Internal server error

Nextcloud.log logs

19T08:59:39+00:00","remoteAddr":"","user":"–","app":"webdav","method":"PROPFIND","url":"/remote.php/webdav/","message":"Exception: {"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable",\

"Message":"OC\\ServerNotAvailableException: Lost connection to LDAP server.","Code":0,\

(Longer text available if needed)

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

Steps to replicate it:

  1. enter login data
  2. website shows internal server error

The output of your Nextcloud log in Admin > Logging:

not possible, no login, even not for local user

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'updatechecker' => true,
  'instanceid' => 'ocanmvbcku0f',
  'passwordsalt' => 'removed',
  'secret' => 'removed',
  'trusted_domains' =>
  array (
    0 => 'wolke.fv-berlin.de',
    1 => 'removed',
  ),
  'datadirectory' => '/var/www/owncloud/data',
  'overwrite.cli.url' => 'https://10.20.32.22',
  'dbtype' => 'mysql',
  'version' => '12.0.5.3',
  'dbname' => 'FVB1',
  'dbhost' => 'localhost',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_admin',
  'dbpassword' => 'removed',
  'logtimezone' => 'UTC',
  'installed' => true,
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'wolke',
  'mail_domain' => 'fv-berlin.de',
  'mail_smtphost' => 'removed',
  'mail_smtpport' => '25',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'ldapIgnoreNamingRules' => false,
  'enable_previews' => false,
  'maintenance' => false,
  'loglevel' => 4,
  'mail_smtpsecure' => 'tls',
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'updater.release.channel' => 'stable',
);

The output of your Apache/nginx/system log in /var/log/____:


No useful hints in apache logs.

Additional info:
ldapsearch to my AD server works, 
occ ldap:show-config works
occ ldap:test-config test-config s03 (one of my LDAP configs) results in

[OC\ServerNotAvailableException]
  Lost connection to LDAP server.

Hello all,
to answer and solve the problem myself:
This was not a mariadb problem but with LDAP:
For redundancy purposes we had configured two LDAP servers for Nextcloud (in fact this are MS AD servers).
The first one in the list had a problem (reason still unknown), it could not be contacted.

Unfortunately Nextcloud does not switch to the second AD but stops authentication and throws an internal server error.
This should not happen but seems to be a Nextcloud problem. Maybe it’s a hint for the developers.
Having a working redundancy would be nice.

Joe