Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Jmeter connectivity to Hive Server2 via kerberos

Jmeter connectivity to Hive Server2 via kerberos

New Contributor

Hello All,

 

Am trying to connect JMeter from my windows machine to Cloudera Cluster, I have placed the Hive JDBC jar files in ../lib/ folder, gave properties in Jaas.conf file and system.properties, did all the required things and I still get the below error...

 

2018-04-20 10:29:23,776 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.assertions.BSFAssertion
2018-04-20 10:29:24,525 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.extractor.BSFPostProcessor
2018-04-20 10:29:24,588 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.modifiers.BSFPreProcessor
2018-04-20 10:29:24,651 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/html is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2018-04-20 10:29:24,651 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xhtml+xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2018-04-20 10:29:24,651 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for application/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2018-04-20 10:29:24,651 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/xml is org.apache.jmeter.protocol.http.parser.LagartoBasedHtmlParser
2018-04-20 10:29:24,651 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/vnd.wap.wml is org.apache.jmeter.protocol.http.parser.RegexpHTMLParser
2018-04-20 10:29:24,651 INFO o.a.j.p.h.s.HTTPSamplerBase: Parser for text/css is org.apache.jmeter.protocol.http.parser.CssParser
2018-04-20 10:29:25,400 INFO o.a.j.e.KeyToolUtils: Exception checking for keytool existence, will return false, try another way.
2018-04-20 10:29:26,542 INFO o.a.j.e.KeyToolUtils: keytool found at 'C:\Program Files\Java\jre1.8.0_162\bin\keytool'
2018-04-20 10:29:26,542 INFO o.a.j.p.h.p.ProxyControl: HTTP(S) Test Script Recorder SSL Proxy will use keys that support embedded 3rd party resources in file C:\Users\extdku\Downloads\apache-jmeter-3.3\apache-jmeter-3.3\bin\proxyserver.jks
2018-04-20 10:29:28,165 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.protocol.java.sampler.BSFSampler
2018-04-20 10:29:28,212 INFO o.a.j.s.FileServer: Default base='C:\Users\extdku\Downloads\apache-jmeter-3.3\apache-jmeter-3.3\bin'
2018-04-20 10:29:28,290 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.protocol.mongodb.config.MongoSourceElement
2018-04-20 10:29:28,290 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.protocol.mongodb.sampler.MongoScriptSampler
2018-04-20 10:29:29,757 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.timers.BSFTimer
2018-04-20 10:29:29,788 INFO o.a.j.g.u.MenuFactory: Skipping org.apache.jmeter.visualizers.BSFListener
2018-04-20 10:29:30,287 INFO o.a.j.s.SampleResult: Note: Sample TimeStamps are START times
2018-04-20 10:29:30,287 INFO o.a.j.s.SampleResult: sampleresult.default.encoding is set to ISO-8859-1
2018-04-20 10:29:30,287 INFO o.a.j.s.SampleResult: sampleresult.useNanoTime=true
2018-04-20 10:29:30,287 INFO o.a.j.s.SampleResult: sampleresult.nanoThreadSleep=5000
2018-04-20 10:29:37,155 INFO o.a.j.g.a.Load: Loading file: C:\Users\extdku\Desktop\Klimatratt.jmx
2018-04-20 10:29:37,155 INFO o.a.j.s.FileServer: Set new base='C:\Users\extdku\Desktop'
2018-04-20 10:29:37,373 INFO o.a.j.s.SaveService: Testplan (JMX) version: 2.2. Testlog (JTL) version: 2.2
2018-04-20 10:29:37,436 INFO o.a.j.s.SaveService: Using SaveService properties file encoding UTF-8
2018-04-20 10:29:37,436 INFO o.a.j.s.SaveService: Using SaveService properties version 3.2
2018-04-20 10:29:37,451 INFO o.a.j.s.SaveService: Loading file: C:\Users\extdku\Desktop\Klimatratt.jmx
2018-04-20 10:29:38,044 INFO o.a.j.s.FileServer: Set new base='C:\Users\extdku\Desktop'
2018-04-20 10:29:40,166 INFO o.a.j.e.StandardJMeterEngine: Running the test!
2018-04-20 10:29:40,244 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2018-04-20 10:29:40,244 INFO o.a.j.s.SampleEvent: List of sample_variables: []
2018-04-20 10:29:40,291 INFO o.a.j.g.u.JMeterMenuBar: setRunning(true, *local*)
2018-04-20 10:29:40,431 INFO o.a.j.e.StandardJMeterEngine: Starting ThreadGroup: 1 : Input Parameters
2018-04-20 10:29:40,431 INFO o.a.j.e.StandardJMeterEngine: Starting 1 threads for group Input Parameters.
2018-04-20 10:29:40,431 INFO o.a.j.e.StandardJMeterEngine: Thread will continue on error
2018-04-20 10:29:40,431 INFO o.a.j.t.ThreadGroup: Starting thread group... number=1 threads=1 ramp-up=1 perThread=1000.0 delayedStart=false
2018-04-20 10:29:40,431 INFO o.a.j.t.ThreadGroup: Started thread group number 1
2018-04-20 10:29:40,431 INFO o.a.j.e.StandardJMeterEngine: All thread groups have been started
2018-04-20 10:29:40,447 INFO o.a.j.t.JMeterThread: Thread started: Input Parameters 1-1
2018-04-20 10:29:40,463 INFO o.a.h.j.Utils: Supplied authorities: abc.ux.xxxx.net:10000
2018-04-20 10:29:40,463 INFO o.a.h.j.Utils: Resolved authority: abc.ux.xxxx.net:10000
2018-04-20 10:29:40,650 ERROR o.a.h.u.Shell: Failed to locate the winutils binary in the hadoop binary path
java.io.IOException: Could not locate executable null\bin\winutils.exe in the Hadoop binaries.
at org.apache.hadoop.util.Shell.getQualifiedBinPath(Shell.java:404) ~[hadoop-common-2.6.0-cdh5.11.0.jar:?]
at org.apache.hadoop.util.Shell.getWinUtilsPath(Shell.java:419) [hadoop-common-2.6.0-cdh5.11.0.jar:?]
at org.apache.hadoop.util.Shell.<clinit>(Shell.java:412) [hadoop-common-2.6.0-cdh5.11.0.jar:?]
at org.apache.hadoop.util.StringUtils.<clinit>(StringUtils.java:79) [hadoop-common-2.6.0-cdh5.11.0.jar:?]
at org.apache.hadoop.security.Groups.parseStaticMapping(Groups.java:168) [hadoop-common-2.6.0-cdh5.11.0.jar:?]
at org.apache.hadoop.security.Groups.<init>(Groups.java:132) [hadoop-common-2.6.0-cdh5.11.0.jar:?]
at org.apache.hadoop.security.Groups.<init>(Groups.java:100) [hadoop-common-2.6.0-cdh5.11.0.jar:?]
at org.apache.hadoop.security.Groups.getUserToGroupsMappingService(Groups.java:435) [hadoop-common-2.6.0-cdh5.11.0.jar:?]
at org.apache.hadoop.security.UserGroupInformation.initialize(UserGroupInformation.java:337) [hadoop-common-2.6.0-cdh5.11.0.jar:?]
at org.apache.hadoop.security.UserGroupInformation.ensureInitialized(UserGroupInformation.java:304) [hadoop-common-2.6.0-cdh5.11.0.jar:?]
at org.apache.hadoop.security.UserGroupInformation.loginUserFromSubject(UserGroupInformation.java:891) [hadoop-common-2.6.0-cdh5.11.0.jar:?]
at org.apache.hadoop.security.UserGroupInformation.getLoginUser(UserGroupInformation.java:857) [hadoop-common-2.6.0-cdh5.11.0.jar:?]
at org.apache.hadoop.hive.thrift.HadoopThriftAuthBridge.createClientWithConf(HadoopThriftAuthBridge.java:85) [hive-exec-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.hive.service.auth.KerberosSaslHelper.getKerberosTransport(KerberosSaslHelper.java:54) [hive-service-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.hive.jdbc.HiveConnection.createBinaryTransport(HiveConnection.java:415) [hive-jdbc-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:200) [hive-jdbc-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:167) [hive-jdbc-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105) [hive-jdbc-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39) [commons-dbcp2-2.1.1.jar:2.1.1]
at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:256) [commons-dbcp2-2.1.1.jar:2.1.1]
at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2304) [commons-dbcp2-2.1.1.jar:2.1.1]
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2290) [commons-dbcp2-2.1.1.jar:2.1.1]
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2039) [commons-dbcp2-2.1.1.jar:2.1.1]
at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533) [commons-dbcp2-2.1.1.jar:2.1.1]
at org.apache.jmeter.protocol.jdbc.config.DataSourceElement$DataSourceComponentImpl.getConnection(DataSourceElement.java:326) [ApacheJMeter_jdbc.jar:3.3 r1808647]
at org.apache.jmeter.protocol.jdbc.config.DataSourceElement.getConnection(DataSourceElement.java:191) [ApacheJMeter_jdbc.jar:3.3 r1808647]
at org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:79) [ApacheJMeter_jdbc.jar:3.3 r1808647]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:498) [ApacheJMeter_core.jar:3.3 r1808647]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:424) [ApacheJMeter_core.jar:3.3 r1808647]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255) [ApacheJMeter_core.jar:3.3 r1808647]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_162]
2018-04-20 10:29:40,884 ERROR o.a.t.t.TSaslTransport: SASL negotiation failure
javax.security.sasl.SaslException: GSS initiate failed
at com.sun.security.sasl.gsskerb.GssKrb5Client.evaluateChallenge(Unknown Source) ~[?:1.8.0_162]
at org.apache.thrift.transport.TSaslClientTransport.handleSaslStartMessage(TSaslClientTransport.java:94) ~[hive-exec-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) [hive-exec-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.thrift.transport.TSaslClientTransport.open(TSaslClientTransport.java:37) [hive-exec-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:52) [hive-exec-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport$1.run(TUGIAssumingTransport.java:49) [hive-exec-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at java.security.AccessController.doPrivileged(Native Method) ~[?:1.8.0_162]
at javax.security.auth.Subject.doAs(Unknown Source) [?:1.8.0_162]
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1920) [hadoop-common-2.6.0-cdh5.11.0.jar:?]
at org.apache.hadoop.hive.thrift.client.TUGIAssumingTransport.open(TUGIAssumingTransport.java:49) [hive-exec-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:202) [hive-jdbc-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:167) [hive-jdbc-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105) [hive-jdbc-1.1.0-cdh5.11.0.jar:1.1.0-cdh5.11.0]
at org.apache.commons.dbcp2.DriverConnectionFactory.createConnection(DriverConnectionFactory.java:39) [commons-dbcp2-2.1.1.jar:2.1.1]
at org.apache.commons.dbcp2.PoolableConnectionFactory.makeObject(PoolableConnectionFactory.java:256) [commons-dbcp2-2.1.1.jar:2.1.1]
at org.apache.commons.dbcp2.BasicDataSource.validateConnectionFactory(BasicDataSource.java:2304) [commons-dbcp2-2.1.1.jar:2.1.1]
at org.apache.commons.dbcp2.BasicDataSource.createPoolableConnectionFactory(BasicDataSource.java:2290) [commons-dbcp2-2.1.1.jar:2.1.1]
at org.apache.commons.dbcp2.BasicDataSource.createDataSource(BasicDataSource.java:2039) [commons-dbcp2-2.1.1.jar:2.1.1]
at org.apache.commons.dbcp2.BasicDataSource.getConnection(BasicDataSource.java:1533) [commons-dbcp2-2.1.1.jar:2.1.1]
at org.apache.jmeter.protocol.jdbc.config.DataSourceElement$DataSourceComponentImpl.getConnection(DataSourceElement.java:326) [ApacheJMeter_jdbc.jar:3.3 r1808647]
at org.apache.jmeter.protocol.jdbc.config.DataSourceElement.getConnection(DataSourceElement.java:191) [ApacheJMeter_jdbc.jar:3.3 r1808647]
at org.apache.jmeter.protocol.jdbc.sampler.JDBCSampler.sample(JDBCSampler.java:79) [ApacheJMeter_jdbc.jar:3.3 r1808647]
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:498) [ApacheJMeter_core.jar:3.3 r1808647]
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:424) [ApacheJMeter_core.jar:3.3 r1808647]
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:255) [ApacheJMeter_core.jar:3.3 r1808647]
at java.lang.Thread.run(Unknown Source) [?:1.8.0_162]
Caused by: org.ietf.jgss.GSSException: No valid credentials provided (Mechanism level: Failed to find any Kerberos tgt)
at sun.security.jgss.krb5.Krb5InitCredential.getInstance(Unknown Source) ~[?:1.8.0_162]
at sun.security.jgss.krb5.Krb5MechFactory.getCredentialElement(Unknown Source) ~[?:1.8.0_162]
at sun.security.jgss.krb5.Krb5MechFactory.getMechanismContext(Unknown Source) ~[?:1.8.0_162]
at sun.security.jgss.GSSManagerImpl.getMechanismContext(Unknown Source) ~[?:1.8.0_162]
at sun.security.jgss.GSSContextImpl.initSecContext(Unknown Source) ~[?:1.8.0_162]
at sun.security.jgss.GSSContextImpl.initSecContext(Unknown Source) ~[?:1.8.0_162]
... 26 more
2018-04-20 10:29:40,884 INFO o.a.j.t.JMeterThread: Thread is done: Input Parameters 1-1
2018-04-20 10:29:40,884 INFO o.a.j.t.JMeterThread: Thread finished: Input Parameters 1-1
2018-04-20 10:29:40,884 INFO o.a.j.e.StandardJMeterEngine: Notifying test listeners of end of test
2018-04-20 10:29:40,884 INFO o.a.j.g.u.JMeterMenuBar: setRunning(false, *local*)

 

Jaas.conf

========

JMeter {
com.sun.security.auth.module.Krb5LoginModule required
useTicketCache=true
doNotPrompt=true
useKeyTab=true
keyTab="C:\Users\extdku\Downloads\apache-jmeter-3.3\apache-jmeter-3.3\bin\hive.keytab"
principal="hive/FQDN@REALM
debug=true;
};

 

Krb5

====

 

[libdefaults]
default_realm = UX.XXXXX.NET
; dns_lookup_realm = true
; #dns_lookup_kdc = true
; #rdns = false
; #ticket_lifetime = 24h
; #renew_lifetime = 7d
; #forwardable = yes
; #udp_preference_limit = 0


[realms]
UX.XXXXX.NET = {
kdc = abc.ux.xxx.net
admin_server = abc.ux.xxx.net

}


[domain_realm]
.ux.xxxx.net = UX.XXXXX.NET
ux.xxxx.net = UX.XXXXX.NET

 

System.Properties

==============

java.security.krb5.conf="C:\Users\extdku\Downloads\apache-jmeter-3.3\apache-jmeter-3.3\bin\krb5.conf"
java.security.auth.login.config=jaas.conf
-Dsun.security.krb5.debug=true
-Djava.security.debug=gssloginconfig,configfile,configparser,logincontext
-Djava.library.path=C:\Users\extdku\Downloads\apache-jmeter-3.3\apache-jmeter-3.3\bin

 

Quick responses are highly appreciated. These features are available in HDP but with no clear instructions though.

 

Thanks

David