Created 01-26-2021 08:48 PM
Hi,
I am pretty much new to setting up LDAP with Ambari server. So I wanted to understand where the details entered during LDAP setup are stored/cached. Whenever I try to do ambari-server setup-LDAP, I am getting the following error.
Fetching LDAP configuration from DB.ERROR: Exiting with exit code 1.
REASON: Error while fetching LDAP configuration. Error details: HTTP Error 403: Forbidden
Here I am not sure what exactly DB means. So please help me in understanding what happens in background when I try to do LDAP setup or sync. I am trying to connect to an AD hosted in a remote machine.
Created 01-27-2021 12:07 AM
@Magudeswaran There might be an issue with bind user password try resetting that. What Ambari version you are using?
Created 01-27-2021 03:05 AM
Hi @GangWar
Thank you for the reply. The same creds work from manager node where in issue happens only in edge node.
Ambari server version is Version 2.7.3.0.
Created 01-27-2021 05:16 AM
@Magudeswaran Interesting can you open this in some other browser and also check the console logs in web developer tool and what it says.
Created 01-27-2021 07:04 PM
@GangWar Do you mean login to ambari web using the ambari administrator id?
Login to Ambari web UI also works properly. But during setup-ldap command it prompts for ambari admin user and password.
After which the following error comes.
Enter Ambari Admin password:
Fetching LDAP configuration from DB.ERROR: Exiting with exit code 1.
REASON: Error while fetching LDAP configuration. Error details: HTTP Error 403: Forbidden
Is it trying to connect to MySQL/MariaDB to validate admin creds?
Is it due to webserver limitations in MariaDB host I am getting 403?
Please share your thoughts over this.
Created 02-04-2021 01:44 AM
@Magudeswaran Yes, in that case you have to check that the credentials you are providing is correct.
Look at Ambari server logs, so that you can get more info.
Created 02-05-2021 02:29 AM
HTTP Error 403 suggests Authorization error.
When you do ambari-server ldap setup, everything gets stored in the database which your ambari server is using/configured while installation probably postgres or any other whichever you have used.
I would suggest you to check your LDAP configuration which you have used/passed for integrating ambari with ldap. As per above error, there is a issue with authorization while ldap integration. its not with DB but LDAP. LDAP Configuration or bind user would be possible reason for your issue.
Please accept this answer if it helps you resolve your issue and share with the community.
Created 02-11-2021 03:40 AM
Hi @GangWar @AmirMirza
Thank you for the inputs. Another new observation is the issue occurs when ambari-server is connecting to MariaDB as there were two different databases. When the database value is changed authentication works and is able to sync data from LDAP.
Created 02-11-2021 04:50 AM
Ambari server uses appropriate database base connector which is located under /user/share/java/*<databasename>.jar
This same connector jar is used to connect to any external or internal database. It needs to be mentioned using ambari-server --jdbc * command.
Refer documentation for exact command.
Issue could be due to the connector jar that is configured for ambari to use. For eg. Ambari is configured to use postgres but you are trying to connect to Mariadb and since it doesn't has the proper jar configured, it won't connect and you will face issue.
Let me know if this resolves your issue. Else please share the screen shot and error logs to check further.