Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]

Community Articles

Find and share helpful community-sourced technical articles.
Announcements
Share your experience with Cloudera on G2 and get a $25 Amazon Gift card.
Hi, I'm CLEO! Something exciting is coming to the Community. Stay Tuned!
Labels (1)
avatar
Super Guru

Introduction

This is a continuation of an article I wrote about 1 year ago: https://community.hortonworks.com/articles/60580/jmeter-setup-for-hive-load-testing-draft.htmlhttps://www.blazemeter.com/blog/windows-authentication-apache-jmeter

Steps

1) Enable Kerberos on your cluster

Perform all steps specified here: https://docs.hortonworks.com/HDPDocuments/HDP2/HDP-2.6.2/bk_security/content/configuring_amb_hdp_for... and connect successfully to hive service via command line using your user keytab. That implies a valid ticket.

2) Install JMeter

See previous article mentioned in Introduction.

3) Set Hive User keytab in jaas.conf

JMETER_HOME/bin/jaas.conf

Your jaas.conf should look something like this:

JMeter {
com.sun.security.auth.module.Krb5LoginModule required
useTicketCache=false
doNotPrompt=true
useKeyTab=true
keyTab="/etc/security/keytabs/hive.service.keytab"
principal="hive/[email protected]"
debug=true;
};

4) JMeter Setup

There are 2 files under /bin folder of the JMeter installation which are used for Kerberos configuration:

krb5.conf - file of .ini format which contains Kerberos configuration details

jaas.conf - file which holds configuration details of Java Authentication and Authorization service

These files aren’t being used by default, so you have to tell JMeter where they are via system properties such as:

-Djava.security.krb5.conf=krb5.conf
-Djava.security.auth.login.config=jaas.conf

Alternatively you can add the next two lines to the system.properties file which is located at the same /bin folder.

java.security.krb5.conf=krb5.conf
java.security.auth.login.config=jaas.conf

I suggest using full paths to files.

5) Manage Issues

If you encounter any issues:

- enable debug by adding the following to your command:

-Dsun.security.krb5.debug=true
-Djava.security.debug=gssloginconfig,configfile,configparser,logincontext

- check jmeter.log to see whether all properties are set as expected and map to existent file paths.

6) Turn-off Subject Credentials

-Djavax.security.auth.useSubjectCredsOnly=false

7) Example of JMeter Command

JVM_ARGS="-Xms1024m
-Xmx1024m" bin/jmeter -Dsun.security.krb5.debug=true
-Djavax.security.auth.useSubjectCredsOnly=false
-Djava.security.debug=gssloginconfig,configfile,configparser,logincontext
-Djava.security.krb5.conf=/path/to/krb5.conf
-Djava.security.auth.login.config=/path/to/jaas.conf -n -t t1.jmx -l results -e
-o output

This could be simplified if you add those two lines mentioned earlier to be added to system.properties.

10,269 Views
Version history
Last update:
‎10-06-2017 07:20 PM
Updated by:
Contributors