Issues with ActiveDirectory authentication after pulling Docker image 22.7.0

Hi! I’m having issues with ActiveDirectory authentication when pulling Docker image 22.7.0. Everything is fine with image 22.6.0, so could be a bug related to PHP 8.0

After a login attempt, an error screen appeared which points to librenms.log and found this:

production.ERROR: ldap_get_entries(): Argument #2 ($result) must be of type resource, bool given {“exception”:"[object] (TypeError(code: 0): ldap_get_entries(): Argument #2 ($result) must be of type resource, bool given at /opt/librenms/LibreNMS/Authentication/ActiveDirectoryAuthorizer.php:161)"}

$ ./validate.php

Component Version
LibreNMS 22.7.0
DB Schema 2022_07_19_081224_plugins_unique_index (243)
PHP 8.0.21
Python 3.10.4
MySQL 10.5.16-MariaDB-1:10.5.16+maria~focal
RRDTool 1.7.2
SNMP 5.9.3

====================================

[OK] Installed from the official Docker image; no Composer required
[OK] Database connection successful
[OK] Database Schema is current
[OK] SQL Server meets minimum requirements
[OK] lower_case_table_names is enabled
[OK] MySQL engine is optimal
[OK]
[OK] Database schema correct
[OK] MySQl and PHP time match
[WARN] IPv6 is disabled on your server, you will not be able to add IPv6 devices.
[OK] rrd_dir is writable
[OK] rrdtool version ok
[WARN] Updates are managed through the official Docker image

I have the same problem,
In the log it sends me the following error

production.ERROR: ldap_get_entries(): Argument #2 ($result) must be of type LDAP\Result, bool given {“exception”:"[object] (TypeError(code: 0): ldap_get_entries(): Argument #2 ( $result) must be of type LDAP\Result, bool given at /opt/librenms/LibreNMS/Authentication/ActiveDirectoryAuthorizer.php:161)"}

Fixed the error thrown (it doesn’t fix your problem tho)

It didn’t work, it keeps showing the same error.

If I go back to php7.4-fpm it works fine but on 8.1 it dies

Help

Also running PHP 8.1 and my Active Directory authentication is no longer working and the logs show exactly the same thing. Had to switch back to mysql to get back in.

====================================
Component | Version
--------- | -------
LibreNMS  | 22.7.0-67-g55c62b234
DB Schema | 2022_07_03_1947_add_app_data (244)
PHP       | 8.1.2
Python    | 3.10.4
Database  | MariaDB 10.6.7-MariaDB-2ubuntu1.1
RRDTool   | 1.7.2
SNMP      | 5.9.1
====================================

I am having the exact same issue …

Please add
dump($connection, $search, $entries);

On this line ; https://github.com/librenms/librenms/blob/2ef1c3670b5d6c7b0cc894e83347f20619631b11/LibreNMS/Authentication/ActiveDirectoryAuthorizer.php#L169

And post the output, if it doesn’t give you output. Replace dump with dd

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.