Title
Create new category
Edit page index title
Edit category
Edit link
Installing Knox
After installing the KNOX service through the Ambari UI and enabling the Knox plugin in the Ranger, if not already done, the following steps can be performed to test the Knox functionality.
Installation and Configuration
For the Python 3.11 clusters, make sure you have installed the pip3.11 package “lxml“, otherwise service advisories fail along with all its functions.
Demo LDAP Server
Start the demo Knox LDAP server from the actions menu in Knox.
Proxy Users in HDFS
Update the following configurations in the custom core-site in HDFS:
Try the given curl command.
In the python3 clusters, the following command returns an http 404 error as advanced topology is not in the correct format (becomes a binary string, won't get parsed properly to the application). So perform step 4 now and then rerun the following, the result must be as expected.
This command is expected to fail unless you have disabled Audit to SOLR in the Knox configuration.
Disable Audit to SOLR
On disabling Audit to SOLR in the Knox configuration, the API calls must function as expected.
Update Advanced Topology
In Knox configurations, update or add the URLs based on the hostname at the end for the services in advanced topology similar to as follows (please copy the entire block as the initial topology block is corrupted).
Change the hostnames according to your requirements.
For ODP 3.3.6.4-1, use the code block with Solr version 8.11.3.
Configuration to enable Knox on Hive
To enable Knox over Hive, configure as below in Hive Configurations > General.
To enable Knox over Hive, along with above service in Advanced-topology, configure as below in Hive Configurations > General.
Use the URL below for the Beeline connection.
Additionally, modify the gateway.dispatch.whitelist in the Advanced gateway-site section of the Knox configuration to use regular expressions as illustrated below:
For hostnames resembling newreleaseub1.acceldata.ce:
For hostnames resembling odp01.ubuntu.ce:
Set up the Ambari SSO
Generate the Certificate
Display the content using cat as you'll require them in the next step.
Ambari Server Setup SSO
Restart the Ambari server.
LDAP Setup and Sync
To setup LDAP, perform the following:
Sync LDAP as shown below:
Restart the Ambari server and clear all cookies after setting up LDAP or SSO in the browser.
Perform UI checks for the services: HDFS and YARN.
For details about configuring Okta SSO for Knox, see Configure Okta SSO for Apache Knox.
UI Checks
HDFS
HDFS UI URL

Yarn
Yarn UI URL

The following components have been successfully integrated with Apache Knox and thoroughly tested:
Hive
Ranger
Schema Registry (Schema-Reg)
Zeppelin
Troubleshooting
If the service UI, when accessed in incognito mode (similar to attempting to log in without cookies) in Chrome, redirects to the Knox login page again, include the following configuration (add the last parameter section) in the Advanced knoxsso-topology under the service attribute:
This sets the cookie property as mentioned above. After restarting the service and clearing old cookies in the browser, the UIs must also function correctly in Chrome.
Knox Ranger Test Connection Failure
To fix the Knox Ranger test connection failure, perform the following steps on the Ranger Admin host.
Add properties as shown below.

Verify the Knox policy test connection.

Knox Uninstallation
To uninstall Knox, perform the following:
Disable SSO setup on Ambari by doing the following:
Restart your Ambari server.
Stop and delete the Knox service from the Ambari UI:
To revert to the older quicklinks and other configurations added by Knox, the simplest approach is to roll back the version in the configurations of all services associated with Knox to an earlier version used just before Knox was introduced. Alternatively, if you have incorporated other required configurations into the service, you can remove these configurations by searching for the specified keywords in each of the services.
For HDFS, YARN, and MapReduce, navigate to Advanced Ambari configs and remove the following configurations:
Additionally, check other services where additional Knox configurations may have been added.