Note: To enable user authentication we need to setup apache drill in distributed mode.
1. Linux Server should be available.
2. Apache drill should be installed and running.
3. Zookeeper server should be installed and running.
To enable User Authentication(PAM) for Apache Drill on Linux server
1. Goto zookeeper server directory – Zookeeper_HOME/conf location.
2. Open file zoo.cfg configuration file and add apache drill server detail as shown below and Save file:
3. Restart zookeeper server using below command:
4. Now goto apache drill home directory and execute below command:
***You may get below error if your apache drill and zookeeper server exists on the same server
Exception in thread “main” org.apache.drill.exec.exception.DrillbitStartupException: Failure during
initial startup of Drillbit.
Caused by: org.apache.drill.exec.exception.DrillbitStartupException: Drillbit is disallowed to bind
to loopback address in distributed mode.
***Solution to resolve above issue:
Edit /etc/hosts file and comment below line :
5. Now access the apache drill web UI in the browser. (http://localhost:8047)
6. Click on Query -> Execute below query for defining the admin user:
alter system set security.admin.users = ‘admin-username’;
7.To enable PAM authentication we need to download the tar.gz of Jpam library file. Download it from below link:
8. Untar the file, and copy the libjpam.so file into a directory that does not contain other Hadoop components. For example, /opt/pam/ and give executable permission to libjpam.so file(chmod 0777 libjpam.so )
9.Add the following line to /conf/drill-env.sh, including the directory where the libjpam.so file is located:
export DRILLBIT_JAVA_OPTS=”$DRILLBIT_JAVA_OPTS -Djava.library.path=/opt/pam/”
10.Add the following configuration to the drill.exec block in /conf/drill-override.conf:
auth.mechanisms : [“PLAIN”],
packages += “org.apache.drill.exec.rpc.user.security”,
pam_profiles: [ “sudo”, “login” ]
11. Now goto apache drill home directory and execute below command :
12. Open web UI of apache drill (http://localhost:8047) and click on login option present at the right top corner.
13. Provide admin user details, you will see all the apache drill options.
Note: For the non-admin user, it will not show admin all available options of apache drill.
Best Open Source Business Intelligence Software Helical Insight is Here
A Business Intelligence Framework
Hope it helps 🙂
In case if you have any queries please get us email@example.com
Sayali Mahale | BI Developer
Helical IT Solutions Pvt Ltd