Subscribe Join 180,000+ subscribers and receive articles from our blog about software quality, testing, QA and security. Subscribe

External auth: Bind: Can't contact LDAP server

I’ve setup my Testrail Server 6.1.1.1021 in a local LAN environment, and there is also an Active Directory running on Windows Server 2019 within the same subnet 10.140.0.*

Testrail Server: 10.140.0.15
Windows Active Directory (LDAP Server): 10.140.0.2

I can use ‘ping’ as well as telnet to 10.140.0.2:389 from 10.140.0.15, nothing in between.
But when I tried to login with any account in Windows Active Directory, Testrail Server shows
「External auth: Bind: Can’t contact LDAP server」

From auth.php,

    // Bind to LDAP directory. This does the actual connection attempt
    // and can fail if the configured server is not reachable.
    if (!@ldap_bind($handle, $name, $password))
    {
            _ad_throw_error($handle, 'Bind');
    }

The message doesn’t help anything and I have no idea why Testrail Server can’t contact LDAP Server
Here is my setting of ‘auth.php’

define(‘AUTH_HOST’, ‘10.140.0.2’);
define(‘AUTH_PORT’, 389);
define(‘AUTH_DN’, ‘OU=company,DC=XXXXYYYY,DC=com’);
define(‘AUTH_DOMAIN’, ‘XXXXYYYY’);
define(‘AUTH_CREATE_ACCOUNT’, true);
define(‘AUTH_FALLBACK’, true);
define(‘AUTH_MEMBERSHIP’, ‘’);

Please kindly help me or teach me how to debug this, thank you