Created 10-06-2017 06:25 PM
I am trying to connect to HiveServer2 from JMeter over Kerberos. These are the two articles I have used: https://community.hortonworks.com/articles/60580/jmeter-setup-for-hive-load-testing-draft.html https://www.blazemeter.com/blog/windows-authentication-apache-jmeter
And this is the JMeter command I am using: JVM_ARGS="-Xms1024m -Xmx1024m" bin/jmeter -Dsun.security.krb5.debug=true -Djava.security.krb5.conf=/path/to/krb5.conf -Djava.security.auth.login.config=/path/to/jaas.conf -n -t test_plan.jmx -l results -e -o output
But for some reason, it is not picking the keytab information from the jaas.conf file and so I could not get the connection over Kerberos.
Created 10-06-2017 06:36 PM
a) I assume that you use a hive user keytab in jaas.conf and you tested hive access from command line successfully. That is the must do first step. Make sure that you have a valid ticket (kinit, klist etc.). See documentation on docs.hortonworks.com for Hive and Kerberos.
b) There are 2 files under /bin folder of the JMeter installation which are used for Kerberos configuration:
These files aren’t being used by default, so you have to tell JMeter where they are via system properties such as:
Alternatively you can add the next two lines to the system.properties file which is located at the same /bin folder.
I suggest using full paths to files.
c) Enable debug by adding the following to your command
-Djava.security.debug=gssloginconfig,configfile,configparser,logincontext
d) Check jmeter.log to see whether all properties are set as expected and map to existent file paths.
e) Turn off subject credentials:
-Djavax.security.auth.useSubjectCredsOnly=false
Created 10-06-2017 06:36 PM
a) I assume that you use a hive user keytab in jaas.conf and you tested hive access from command line successfully. That is the must do first step. Make sure that you have a valid ticket (kinit, klist etc.). See documentation on docs.hortonworks.com for Hive and Kerberos.
b) There are 2 files under /bin folder of the JMeter installation which are used for Kerberos configuration:
These files aren’t being used by default, so you have to tell JMeter where they are via system properties such as:
Alternatively you can add the next two lines to the system.properties file which is located at the same /bin folder.
I suggest using full paths to files.
c) Enable debug by adding the following to your command
-Djava.security.debug=gssloginconfig,configfile,configparser,logincontext
d) Check jmeter.log to see whether all properties are set as expected and map to existent file paths.
e) Turn off subject credentials:
-Djavax.security.auth.useSubjectCredsOnly=false
Created 10-06-2017 06:51 PM
Yes, Constantin. I am using the Hive user keytab and have a valid Kerberos ticket for this user. Also, I have uncommented the lines related to krb5.conf and jaas.conf paths in the bin/system.properties. I have also provided the full paths to these files in the jmeter command.
But adding the -Djavax.security.auth.useSubjectCredsOnly=false did the trick. Now it is correctly picking up the principal/keytab information from the jaas.conf.
Thanks a lot for the quick repsonse, @Constantin Stanca. I have been working on this for more than one week. This is my final jmeter command that worked for me:
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
Thank you,
Kumar
Created 09-28-2018 03:12 PM
Hello!
I have a issue with hive2 connection pool using Jmeter.I run a test and the errors allways is "JDBC connection pool "
NB: I added all the jars in lib/ext
Any suggesion
Thank you,
Nisrine