Created 04-14-2016 05:12 PM
We have knox configured with Self Signed cert. Over ODBC we are able to connect successfully without doing any changes at client side. But for JDBC we need to deploy cert as it is self signed. On Linux clients, I am able to sucessfully add cert to keystore and connect to Knox over JDBC. Need Instructions on adding Knox Self signed cert on windows laptop.
Created 04-14-2016 05:27 PM
There should be no difference on windows. What issue are you encountering?
Created 04-14-2016 10:03 PM
@sparepally you should be able to use certmgr in windows. Please refer the below as a reference.
http://windows.microsoft.com/en-gb/windows/import-export-certificates-private-keys#1TC=windows-7
The above is for windows7 but would be mostly the same for other versions as well.
Created 04-14-2016 10:05 PM
Getting below error message on windows machine.
java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://<<servername>>:8443/;transportMode=http;httpPath=gateway/default/hive;sslConnection=true;: Could not create http connection to jdbc:hive2://<<servername>>:8443/;transportMode=http;httpPath=gateway/default/hive;sslConnection=true;. org.apache.http.NoHttpResponseException: The target server failed to respond
at java.util.concurrent.FutureTask.report(FutureTask.java:122) at java.util.concurrent.FutureTask.get(FutureTask.java:206) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.awaitConnection(OpenConnectionCommand.java:132) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$100(OpenConnectionCommand.java:45) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$2.run(OpenConnectionCommand.java:115) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://prdasdp004.unix.gsm1900.org:8443/;transportMode=http;httpPath=gateway/default/hive;sslConnection=true;: Could not create http connection to jdbc:hive2://prdasdp004.unix.gsm1900.org:8443/;transportMode=http;httpPath=gateway/default/hive;sslConnection=true;. org.apache.http.NoHttpResponseException: The target server failed to respond at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:171) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.access$000(OpenConnectionCommand.java:45) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand$1.run(OpenConnectionCommand.java:104) ... 5 more Caused by: java.sql.SQLException: Could not open client transport with JDBC Uri: jdbc:hive2://prdasdp004.unix.gsm1900.org:8443/;transportMode=http;httpPath=gateway/default/hive;sslConnection=true;: Could not create http connection to jdbc:hive2://prdasdp004.unix.gsm1900.org:8443/;transportMode=http;httpPath=gateway/default/hive;sslConnection=true;. org.apache.http.NoHttpResponseException: The target server failed to respond at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:215) at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:163) at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105) at net.sourceforge.squirrel_sql.fw.sql.SQLDriverManager.getConnection(SQLDriverManager.java:133) at net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:167) ... 7 more Caused by: org.apache.thrift.transport.TTransportException: Could not create http connection to jdbc:hive2://prdasdp004.unix.gsm1900.org:8443/;transportMode=http;httpPath=gateway/default/hive;sslConnection=true;. org.apache.http.NoHttpResponseException: The target server failed to respond at org.apache.hive.jdbc.HiveConnection.createHttpTransport(HiveConnection.java:257) at org.apache.hive.jdbc.HiveConnection.openTransport(HiveConnection.java:187) ... 11 more Caused by: org.apache.thrift.transport.TTransportException: org.apache.http.NoHttpResponseException: The target server failed to respond at org.apache.thrift.transport.THttpClient.flushUsingHttpClient(THttpClient.java:281) at org.apache.thrift.tran
Created 04-14-2016 10:54 PM
Have you used keytool to add the gateway-identity cert to cacerts for your JVM on the windows machine?
Created 04-18-2016 02:44 PM
@lmccay Yes. Below is the command I used to import cert to cacerts.
$JAVA_HOME keytool -importcert -file <<Path to knox.crt>> -keystore $JAVA_HOME/Jre/security/lib/cacert>>