RocketChat/Rocket.Chat · warning
LDAP Host is not configured.
Error message
LDAP Host is not configured.
What it means
Logged by the LDAP Connection constructor when the LDAP_Host setting resolves to an empty value. The connection options object is still built, but every LDAP operation that needs a directory server (login, user sync, search) will fail or no-op until a host is set. This is an early configuration sanity warning, not a failure of the LDAP client library itself.
Source
Thrown at apps/meteor/server/lib/ldap/Connection.ts:103
groupFilterGroupMemberFormat: settings.get<string>('LDAP_Group_Filter_Group_Member_Format'),
groupFilterGroupName: settings.get<string>('LDAP_Group_Filter_Group_Name'),
authentication: settings.get<boolean>('LDAP_Authentication') ?? false,
authenticationUserDN: settings.get<string>('LDAP_Authentication_UserDN') ?? '',
authenticationPassword: settings.get<string>('LDAP_Authentication_Password') ?? '',
useVariables: settings.get<boolean>('LDAP_DataSync_UseVariables') ?? false,
variableMap: settings.get<string>('LDAP_DataSync_VariableMap') ?? '{}',
attributesToQuery: this.parseAttributeList(settings.get<string>('LDAP_User_Search_AttributesToQuery')),
};
this._variableMap =
(this.options.useVariables &&
wrapExceptions(() => JSON.parse(this.options.variableMap)).suppress(() => {
mapLogger.error({ msg: 'Failed to parse LDAP Variable Map', map: this.options.variableMap });
})) ||
{};
if (!this.options.host) {
logger.warn('LDAP Host is not configured.');
}
if (!this.options.baseDN) {
logger.warn('LDAP Search BaseDN is not configured.');
}
}
public async connect(): Promise<any> {
return new Promise((resolve, reject) => {
this.initializeConnection((error, result) => {
if (error) {
return reject(error);
}
return resolve(result);
});
});
}
View on GitHub (pinned to b2c16d5842)
Solutions
- Set Administration > LDAP > Host (LDAP_Host) to your directory server, e.g. 'ldap.corp.example.com' or 'ldaps://ldap.corp.example.com:636'
- If LDAP was enabled by accident, set LDAP_Enable=false so no Connection is constructed
- If the warning persists after saving, verify the value reached the database (rocketchat_settings collection) — a failed settings save or read-replica lag can keep it empty
- Retry the LDAP login/sync and check for follow-up connection errors to confirm resolution
Example fix
// before (Admin > LDAP) LDAP_Enable: true LDAP_Host: '' // after LDAP_Enable: true LDAP_Host: 'ldaps://ldap.corp.example.com:636'
Defensive patterns
Strategy: validation
Validate before calling
import { settings } from 'meteor/rocketchat:settings-server';
const host = settings.get<string>('LDAP_Host')?.trim();
if (settings.get('LDAP_Enable') && !host) {
throw new Error('LDAP is enabled but LDAP_Host is empty — configure the host before enabling LDAP login/sync');
} Prevention
- Treat LDAP_Host as a required companion of LDAP_Enable: never enable one without the other
- Add a config audit step (script or startup check) that reports empty critical LDAP settings
- Test with a single LDAP login right after setup instead of enabling sync for the whole directory
When it happens
Trigger: A new Connection is constructed (LDAP login attempt, LDAP_DataSync job, or user search) while settings.get('LDAP_Host') returns undefined/empty string — typically LDAP_Enable=true but the Host field was never filled in Administration > LDAP.
Common situations: Enabling LDAP before filling the Host field; clearing LDAP_Host while leaving LDAP enabled; pasting the host into the wrong field (e.g. Base DN); fresh installs where the settings collection has no LDAP_Host value yet.
Related errors
- LDAP Search BaseDN is not configured.
- LDAP_disabled
- error-push-disabled
- error-not-allowed
- error-not-allowed
AI-assisted analysis of RocketChat/Rocket.Chat@b2c16d5842 (2026-08-18).
Data as JSON: /api/errors/b7ea7f4c336a132b.
Report an issue: GitHub.