Ldap_read(): Search: No such object at /var/www/nextcloud/apps/user_ldap/lib/LDAP.php#307

Hi,
In order to information show belong suddenly I get LDAP error in admin/logging page.
I test LDAP config and every steps are OK.
What should I do?

Operating system: Linux 5.15.0-113-generic #123-Ubuntu SMP Mon Jun 10 08:16:17 UTC 2024 x86_64

Webserver: Apache/2.4.52 (Ubuntu) (fpm-fcgi)

Database: mysql 10.6.18

PHP version: 8.1.2-1ubuntu2.18

Modules loaded: Core, date, libxml, openssl, pcre, zlib, filter, hash, json, Reflection, SPL, session, standard, sodium, cgi-fcgi, mysqlnd, PDO, xml, apcu, bcmath, bz2, calendar, ctype, curl, dom, mbstring, FFI, fileinfo, ftp, gd, gettext, gmp, iconv, igbinary, imagick, imap, intl, ldap, exif, msgpack, mysqli, pdo_mysql, Phar, posix, readline, redis, shmop, SimpleXML, sockets, sysvmsg, sysvsem, sysvshm, tokenizer, xmlreader, xmlwriter, xsl, zip, memcached, Zend OPcache

Nextcloud version: 29.0.3 - 29.0.3.4

The issue you are facing:

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

Steps to replicate it:

  1. Login as admin
  2. Click overview
  3. See Error and warning

The output of your Nextcloud log in Admin > Logging:

[PHP] Error: ldap_read(): Search: No such object at /var/www/nextcloud/apps/user_ldap/lib/LDAP.php#307
	POST /nextcloud/contactsmenu/contacts
	from 10.65.8.100 by root at 9 Tem 2024 13:39:24

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

{
    "instanceid": "***REMOVED SENSITIVE VALUE***",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "bulut.yasar.com.tr",
        "bulut-ic.yasar.com.tr",
        "10.40.1.96",
        "127.0.0.1"
    ],
    "datadirectory": "***REMOVED SENSITIVE VALUE***",
    "dbtype": "mysql",
    "version": "29.0.3.4",
    "overwrite.cli.url": "https:\/\/bulut.yasar.com.tr\/nextcloud",
    "dbname": "***REMOVED SENSITIVE VALUE***",
    "dbhost": "***REMOVED SENSITIVE VALUE***",
    "dbport": "",
    "dbtableprefix": "oc_",
    "mysql.utf8mb4": true,
    "dbuser": "***REMOVED SENSITIVE VALUE***",
    "dbpassword": "***REMOVED SENSITIVE VALUE***",
    "proxy": "proxy.yasar.net:8080",
    "installed": true,
    "default_phone_region": "TR",
    "default_language": "tr",
    "default_locale": "tr_TR",
    "force_locale": "tr_TR",
    "maintenance": false,
    "maintenance_window_start": 1,
    "updater.release.channel": "stable",
    "memcache.local": "\\OC\\Memcache\\Redis",
    "memcache.locking": "\\OC\\Memcache\\Redis",
    "filelocking.enabled": "true",
    "filesystem_check_changes": 1,
    "redis": {
        "host": "***REMOVED SENSITIVE VALUE***",
        "port": 6379,
        "timeout": 0
    },
    "htaccess.RewriteBase": "\/nextcloud",
    "ldapProviderFactory": "OCA\\User_LDAP\\LDAPProviderFactory",
    "ldapIgnoreNamingRules": false,
    "ldapUserCleanupInterval": 51,
    "remember_login_cookie_lifetime": 86400,
    "session_lifetime": 7200,
    "session_keepalive": true,
    "auto_logout": true,
    "auth.webauthn.enabled": false,
    "trashbin_retention_obligation": "auto,7",
    "enable_avatars": false,
    "enable_previews": true,
    "profile.enabled": false,
    "allow_user_to_change_display_name": false,
    "allow_user_to_change_mail_address": false,
    "theme": "",
    "lost_password_link": "disabled",
    "defaultapp": "files",
    "knowledgebaseenabled": false,
    "mail_from_address": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpmode": "smtp",
    "mail_sendmailmode": "smtp",
    "mail_domain": "***REMOVED SENSITIVE VALUE***",
    "mail_smtphost": "***REMOVED SENSITIVE VALUE***",
    "mail_smtpport": "25",
    "debug": false,
    "log_type": "file",
    "logfile": "\/data\/nextcloud.log",
    "loglevel": 3,
    "logdateformat": "d.m.Y, H:i:s",
    "logtimezone": "Europe\/Istanbul",
    "log.condition": {
        "apps": [
            "admin_audit"
        ]
    },
    "app_install_overwrite": [
        "group_default_quota",
        "impersonate",
        "apporder"
    ]
}

This and some other errors happens after 29.03 upgrade. Other errors are:

  • Your web server is not yet properly set up to allow file synchronization, because the WebDAV interface seems to be broken. To allow this check to run you have to make sure that your webserver can connect to itself. Therefor it must be able to resolve and connect to at least one its trusted_domains or the overwrite.cli.url.
  • Your web server is not properly set up to resolve .well-known URLs, failed on: /.well-known/webfinger
  • One or more mimetype migrations are available. Occasionally new mimetypes are added to better handle certain file types. Migrating the mimetypes take a long time on larger instances so this is not done automatically during upgrades. Use the command occ maintenance:repair --include-expensive to perform the migrations.
  • Could not check that your web server serves security headers correctly, unable to query

Hello
I had exactly the same problem when I switched from NC28 to NC29. Thousands of lines of errors but impossible to understand the cause :frowning:

Operating system: CenstOS Stream 8 4.18.0-553.6.1.el8.x86_64 #1 SMP Thu May 30 04:13:58 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux

Webserver: Apache/2.4.37 (CentOS Stream)

Database: mysql Ver 15.1 Distrib 10.3.28-MariaDB, for Linux (x86_64) using readline 5.1

PHP version: PHP 8.3.9

This is a relatively general LDAP error. You can use your favorite search engine to turn up some ideas for troubleshooting / possible culprits. They’re not necessarily Nextcloud specific.

I am unclear about something from your report: Is this a new installation? Or did this problem start after some sort of update?

But nextcloud’s own tests while configuring LDAP, are ok always. U-I can query my name and other users etc.

There are various configuration scenarios that can pass basic tests, but still fail in practice.

Did you see my second question?

Hi,
Sory I missed second part. This happened after update. When error occured I revert to snaphot which have old version. And problem is gone. But still I cant update to new version .
For first question:
I use ldapsearch to test. Is it enough to test?
I can connect and search LDAP ( MS AD):

Same problem. Did you figure it out?

after revert snaphot, I upgrade different version. now there is no problem