LDAP INTEGRATION: APPLICATION ERROR #1401

Get help from other users here.

Moderators: Developer, Contributor

Post Reply
toniolet
Posts: 5
Joined: 05 Jun 2023, 09:06
Location: Mallorca

LDAP INTEGRATION: APPLICATION ERROR #1401

Post by toniolet »

Good morning everyone,

I have an Ubuntu Server with MantisBT installed and I want it to provision users from my Active Directory (192.168.50.5). Since the first time I tried to integrate Mantis with LDAP I get this error and I don't know why. If I do a "ldapsearch" it works correctly.

This is my configuration:

$g_login_method = LDAP;
$g_ldap_server = 'ldap://192.168.50.5:389';
$g_ldap_use_starttls = '0';
$g_ldap_root_dn = 'DC=tonimateu,DC=local';
$g_ldap_organization = '(objectClass=*)';
$g_ldap_bind_dn = 'CN=administrador,cn=users,DC=tonimateu,DC=local';
$g_ldap_bind_passwd = '******';
$g_ldap_uid_field = 'sAMAccountName';
$g_ldap_realname_field = 'displayName';
$g_ldap_protocol_version = 3;
$g_ldap_follow_referrals = '0';
$g_use_ldap_realname = ON;
$g_use_ldap_email = ON;
$g_show_realname = ON;
$g_default_new_account_access_level = DEVELOPER;
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: LDAP INTEGRATION: APPLICATION ERROR #1401

Post by atrol »

I can't provide deeper help, but obviously wrong is, that you set $g_ldap_use_starttls and $g_ldap_follow_referrals to '0', where just ON or OFF are allowed
https://www.mantisbt.org/docs/master/en ... .auth.ldap
Please use Search before posting and read the Manual
toniolet
Posts: 5
Joined: 05 Jun 2023, 09:06
Location: Mallorca

Re: LDAP INTEGRATION: APPLICATION ERROR #1401

Post by toniolet »

atrol wrote: 05 Jun 2023, 09:43 I can't provide deeper help, but obviously wrong is, that you set $g_ldap_use_starttls and $g_ldap_follow_referrals to '0', where just ON or OFF are allowed
You are absolutely right, but even changing those two parameters I was getting the same error. The fact of putting them is due to the desperation of not knowing what was failing and asking ChatGPT.

Do I have to do any previous step (apart from installing "php-ldap") before configuring?
toniolet
Posts: 5
Joined: 05 Jun 2023, 09:06
Location: Mallorca

Re: LDAP INTEGRATION: APPLICATION ERROR #1401

Post by toniolet »

This is my actual configuration and still not working. The only previous steps taken have been to install "php-ldap" and activate it from php.ini.

$g_login_method = LDAP;
$g_ldap_server = 'ldap://192.168.50.5:389/';
$g_ldap_root_dn = 'dc=tonimateu,dc=local';
$g_ldap_organization = '';
$g_ldap_uid_field = 'sAMAccountName';
$g_ldap_bind_dn = 'CN=Administrador,CN=Users,DC=tonimateu,DC=local';
$g_ldap_bind_passwd = '******';
$g_ldap_realname_field = 'cn';
$g_ldap_follow_referrals = OFF;
$g_use_ldap_realname = ON;
$g_use_ldap_email = ON;
$g_ldap_use_starttls = OFF;
$g_ldap_protocol_version = 3;
$g_log_level = LOG_LDAP;
$g_log_destination = 'file:/var/www/html/mantis/logs/ldap.log';
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: LDAP INTEGRATION: APPLICATION ERROR #1401

Post by atrol »

Are there some more error details in /var/www/html/mantis/logs/ldap.log ?
Did you run admin/check/index.php and fix any error you got?
Are you running the current latest stable version 2.25.7?
Please use Search before posting and read the Manual
toniolet
Posts: 5
Joined: 05 Jun 2023, 09:06
Location: Mallorca

Re: LDAP INTEGRATION: APPLICATION ERROR #1401

Post by toniolet »

atrol wrote: 07 Jun 2023, 20:35 Are there some more error details in /var/www/html/mantis/logs/ldap.log ?
Did you run admin/check/index.php and fix any error you got?
Are you running the current latest stable version 2.25.7?
Finally I have solved it simply by installing the most recent version of Mantis and applying this configuration, I show it in case any user has the same problem.

Thank you very much for your help.

$g_login_method = LDAP;
$g_ldap_server = 'ldap://192.168.50.5:3268/';
$g_ldap_root_dn = 'dc=tonimateu,dc=local';
$g_ldap_organization = '';
$g_ldap_uid_field = 'sAMAccountName';
$g_ldap_bind_dn = 'cn=Administrador,cn=Users,dc=tonimateu,dc=local';
$g_ldap_bind_passwd = '*******';
$g_ldap_realname_field = 'cn';
$g_ldap_follow_referrals = OFF;
$g_use_ldap_realname = ON;
$g_use_ldap_email = ON;
$g_ldap_use_starttls = OFF;
$g_ldap_protocol_version = 3;
$g_log_level = LOG_LDAP;
atrol
Site Admin
Posts: 8366
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: LDAP INTEGRATION: APPLICATION ERROR #1401

Post by atrol »

Thanks for coming back and telling the solution.
Which version did you run before upgrading to 2.25.7?
Please use Search before posting and read the Manual
toniolet
Posts: 5
Joined: 05 Jun 2023, 09:06
Location: Mallorca

Re: LDAP INTEGRATION: APPLICATION ERROR #1401

Post by toniolet »

atrol wrote: 10 Jun 2023, 10:17 Thanks for coming back and telling the solution.
Which version did you run before upgrading to 2.25.7?
I was using version 2.22.1, but for some reason the integration was not working. I made another VM with the latest version of Mantis where I just copied the configuration from the other machine and it worked fine.
Post Reply