LDAP Error: Protocol Error, Unable to bind, LDAP result: -1

Post general support questions here that do not specifically fall into the Linux or Windows categories.

Moderators: Developers, Moderators

nahidrezaei
Posts: 27
Joined: Wed Apr 18, 2012 12:42 am

LDAP Error: Protocol Error, Unable to bind, LDAP result: -1

Post by nahidrezaei »

I have installed Cacti version 1.1.38, I want to authenticate with active directory but got this error:

LDAP Error: Protocol Error, Unable to bind, LDAP result: -1
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by netniV »

AD requires a username/password to bind with, before being able to authenticate people. As a result, you need to ensure that you have setup a valid username and password in your LDAP configuration.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
nahidrezaei
Posts: 27
Joined: Wed Apr 18, 2012 12:42 am

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by nahidrezaei »

my username/password is correct and I have test with the following command:

ldapsearch -LLL -H ldap://LDAPAddress -x -D 'administrator@domain.com' -w 'PASSWORD' -b 'DC=domain,DC=com' sAMAccountName | grep "Service\|service"
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by netniV »

What settings have you defined in your LDAP configuration? Can you provide screenshots?
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
nahidrezaei
Posts: 27
Joined: Wed Apr 18, 2012 12:42 am

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by nahidrezaei »

this screenshot is my ldap configuration.
These packages is installed with cacti version 1.1.38 :
openldap-devel-2.4.44-15.el7_5.x86_64
openldap-clients-2.4.44-15.el7_5.x86_64
openldap-2.4.44-15.el7_5.x86_64
php71w-ldap-7.1.23-1.w7.x86_64
Attachments
Untitled2.png
Untitled2.png (48.29 KiB) Viewed 3546 times
Last edited by nahidrezaei on Tue Nov 13, 2018 5:37 am, edited 1 time in total.
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by netniV »

My setup is different as I use specific searching at the office. However, I will see if I can make this work with LDAP binding on my test systems.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
nahidrezaei
Posts: 27
Joined: Wed Apr 18, 2012 12:42 am

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by nahidrezaei »

I really confused what to do :(
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by netniV »

I have tested this and it all works fine. What you might be hitting is that without a template user, your LDAP user will not be able to login. Also, if you specify <username>@domain.local in the configuration, the user must only enter the <username> part in the login page with the correct realm selected.

There were a couple of issues in the LDAP code relating to non-reuse of the LdapError class, but that aside there were no logic errors, so these have been addressed in 1.2 ready for Beta 3.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
nahidrezaei
Posts: 27
Joined: Wed Apr 18, 2012 12:42 am

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by nahidrezaei »

I specify Distinguished Name <username>@domain.com and UserTemplate:guest
Authentication Method should be "LDAP Authentication" or "Multiple LDAP/AD Domains" ?
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by netniV »

I'm not sure using the Guest account will work as that's normally set as the guest user, but also disabled. Try creating a proper template user, and then login using just the <username> part.

Also, can you get me the results of the following SQL query:

Code: Select all

select * from settings where name like 'auth%' or name like 'ldap%';
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mppare
Posts: 15
Joined: Tue Nov 13, 2018 5:04 pm

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by mppare »

Hi folks - I'm having this same exact issue. Yesterday I spun up a new Cacti instance (latest .38) on Centos 7.5. Everything is up and running (UI, DB, etc). I'm working on migrating an older instance of Cacti into this machine. I used the same LDAP settings from the old instance, and I'm receiving this same error.

Earlier in this thread someone posted their versions of some dependency packages - mine are the same with the exception of php-ldap, I'm running 5.4.16-45.el7

Note that I have not yet migrated over the older database, this is a vanilla installation, manually entered the LDAP configuration information from the old instance.

Any insights?
User avatar
Pucho
Cacti User
Posts: 185
Joined: Wed Jul 20, 2016 8:00 pm

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by Pucho »

Can you post FULL auth settings? suppress any sensitive data.

I'm running 1.1.37 and PHP 5.4.16
Proto ver 3

Referrals disabled

Mode - Specific Searching

Require Group Membership - enabled
My search filter.
(&(objectclass=user)(objectcategory=user)(sAMAccountName=<username>))
Cacti - 1.2.15
Poller Type - Spine
Weathermap 0.98a
Server Info - Linux 3.10.0 - Centos 7
Web Server - Apache/2.4.6 PHP 5.4.16
MySQL - 5.5 ;RRDTool - 1.4.8 ;SNMP - 5.7.2
Religion - Anti forum pets
netniV
Cacti Guru User
Posts: 3441
Joined: Sun Aug 27, 2017 12:05 am

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by netniV »

mppare wrote:Hi folks - I'm having this same exact issue. Yesterday I spun up a new Cacti instance (latest .38) on Centos 7.5. Everything is up and running (UI, DB, etc). I'm working on migrating an older instance of Cacti into this machine. I used the same LDAP settings from the old instance, and I'm receiving this same error.

Earlier in this thread someone posted their versions of some dependency packages - mine are the same with the exception of php-ldap, I'm running 5.4.16-45.el7

Note that I have not yet migrated over the older database, this is a vanilla installation, manually entered the LDAP configuration information from the old instance.

Any insights?
Can you provide also provide the settings?

Code: Select all

select * from settings where name like 'auth%' or name like 'ldap%';
Check that against the old box too.
Cacti Developer & Release Manager
The Cacti Group

Director
BV IT Solutions Ltd

+--------------------------------------------------------------------------+

Cacti Resources:
Cacti Website (including releases)
Cacti Issues
Cacti Development Releases
Cacti Development Documentation
mppare
Posts: 15
Joined: Tue Nov 13, 2018 5:04 pm

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by mppare »

I think I'm closing in on this issue.

I ran tcpdump on the Cacti host, filtering on the AD server IP address - I also filtered on port 389/636 accordingly and when I tried to log in with a user in LDAP realm - no packets captured.

As a control, I ran tcpdump on port 80 and generated traffic browsing the Cacti UI and saw packets captured from my workstation as expected. Using Telnet I was also able to establish a session to the AD server on both 389/636 and using same filters was able to see traffic to my AD server.

I also tried 'username' and 'username@mydomain.com' no difference.

Using the same configuration in our old Cacti 0.8.8a environment everything works fine.

So, I think there's some deeper issue going on here.
mppare
Posts: 15
Joined: Tue Nov 13, 2018 5:04 pm

Re: LDAP Error: Protocol Error, Unable to bind, LDAP result:

Post by mppare »

Attached screenshot of the output from the above query is attached. Both identical configuration. Left console is old right is new. Works in the old 0.8.8 environment no-go in the new environment.
Attachments
cacti ldap old vs new.jpg
cacti ldap old vs new.jpg (474.34 KiB) Viewed 3527 times
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest