Hi Justin, This ticket does not uses ticket cache. You will need to have keytab file and principal to login.
It's a blessing in disguise that you are still using cdh4.3. Phoenix used to work with secure hbase prior to cdh4.5 releases. I also ran it with cdh4.4. However, IMO using ticket cache is like a work around because the solution is not guaranteed to work with all cdh releases. Additionally, it will be tricky to use ticket cache with Squirell. I am able to connect to squirrell very easily with help of Phoenix-19. So, it's a cleaner solution. I can try to provide you the phoenix-client.jar with that patch if you want. I am also wondering if there are any nightly builds in Phoenix. In that case you can directly pick up the jar from there. Thanks, Anil Gupta On Jun 10, 2014, at 11:06 AM, Justin Workman <[email protected]> wrote: I saw that, and was hoping I could work around it, since I was able to connect to the secure cluster using sqlline. Do you know if this patch will also work with a kerberos ticket cache, or will we need to create keytabs for users and pass the keytab/principal in the connect string? On Mon, Jun 9, 2014 at 3:48 PM, anil gupta <[email protected]> wrote: > Hi Julian, > > Currently Phoenix-3.0 does not supports connecting to a secure HBase > cluster out of the box. Please have a look at > https://issues.apache.org/jira/browse/PHOENIX-19. This got commited in > 3.0 branch last weekend. You can checkout 3.0 branch from git( > https://git-wip-us.apache.org/repos/asf?p=phoenix.git) and do a local > build to get the phoenix-client.jar that works with Secure HBase. > Phoenix-19 will be part of 3.1 release. Let me know if you have further > questions. > > Thanks, > Anil Gupta > > > On Mon, Jun 9, 2014 at 12:24 PM, Justin Workman <[email protected]> > wrote: > >> I am attempting to connect to Phoenix via SquirrelSQL and not having much >> luck. I am using Phoenix-3.0 on Hbase with CDH4.3.0 (Hbase >> 0.96.4-cdh4.3.0), and SquirrelSQL 3.5.3. Our Hbase environment is protected >> with Kerberos. >> >> I have modified the sqlline script to include the correct libraries and >> modifications to the Java command, and that is working fine. >> >> Here is what I am doing to try and get SquirrelSQL working. I have tried >> on both a Mac and Linux system. >> >> I start up off kinit'ing prior to starting SquirrelSQL. >> >> 1) Copy hbase-site.xml and core-site.xml to lib directory of SquirrelSQL >> 2) Open SquirrelSQL->Drivers->Add New >> 3) I add phoenix-3.0.0-incubating-client-minimal.jar, all of its >> dependancies, hadoop-common, hadoop-auth and the hbase-security jar from >> CDH distribution to the extra class path >> 4) List Drivers and select the Phoenix driver. >> >> Adding the driver at this point succeeds without error. I then proceed to >> setup the connection and click test, it will hang for a minute and then >> gives me the following stack trace. >> >> java.util.concurrent.ExecutionException: java.lang.RuntimeException: >> java.lang.RuntimeException: java.lang.ClassNotFoundException: Class >> org.apache.hadoop.hbase.ipc.SecureRpcEngine not found >> at java.util.concurrent.FutureTask.report(FutureTask.java:122) >> at java.util.concurrent.FutureTask.get(FutureTask.java:202) >> 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:471) >> at java.util.concurrent.FutureTask.run(FutureTask.java:262) >> at >> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) >> at >> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) >> at java.lang.Thread.run(Thread.java:744) >> Caused by: java.lang.RuntimeException: java.lang.RuntimeException: >> java.lang.ClassNotFoundException: Class >> org.apache.hadoop.hbase.ipc.SecureRpcEngine not found >> at >> net.sourceforge.squirrel_sql.client.mainframe.action.OpenConnectionCommand.executeConnect(OpenConnectionCommand.java:175) >> 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.lang.RuntimeException: java.lang.ClassNotFoundException: >> Class org.apache.hadoop.hbase.ipc.SecureRpcEngine not found >> at org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1587) >> at >> org.apache.hadoop.hbase.ipc.HBaseRPC.getProtocolEngine(HBaseRPC.java:99) >> at >> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.ensureZookeeperTrackers(HConnectionManager.java:629) >> at >> org.apache.hadoop.hbase.client.HConnectionManager$HConnectionImplementation.getMaster(HConnectionManager.java:684) >> at org.apache.hadoop.hbase.client.HBaseAdmin.<init>(HBaseAdmin.java:126) >> at >> org.apache.phoenix.query.ConnectionQueryServicesImpl.ensureTableCreated(ConnectionQueryServicesImpl.java:739) >> at >> org.apache.phoenix.query.ConnectionQueryServicesImpl.createTable(ConnectionQueryServicesImpl.java:1021) >> at >> org.apache.phoenix.schema.MetaDataClient.createTableInternal(MetaDataClient.java:1156) >> at >> org.apache.phoenix.schema.MetaDataClient.createTable(MetaDataClient.java:422) >> at >> org.apache.phoenix.compile.CreateTableCompiler$2.execute(CreateTableCompiler.java:183) >> at >> org.apache.phoenix.jdbc.PhoenixStatement.executeMutation(PhoenixStatement.java:226) >> at >> org.apache.phoenix.jdbc.PhoenixStatement.executeUpdate(PhoenixStatement.java:908) >> at >> org.apache.phoenix.query.ConnectionQueryServicesImpl.init(ConnectionQueryServicesImpl.java:1351) >> at >> org.apache.phoenix.jdbc.PhoenixDriver.getConnectionQueryServices(PhoenixDriver.java:131) >> at >> org.apache.phoenix.jdbc.PhoenixEmbeddedDriver.connect(PhoenixEmbeddedDriver.java:112) >> 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: java.lang.ClassNotFoundException: Class >> org.apache.hadoop.hbase.ipc.SecureRpcEngine not found >> at >> org.apache.hadoop.conf.Configuration.getClassByName(Configuration.java:1493) >> at >> org.apache.hadoop.conf.Configuration.getClass(Configuration.java:1585) >> ... 23 more >> >> FYI, I have also tried to include the hadoop, hbase and phoenix jar's in >> the lib directory of SquirrelSQL itself, however when adding the driver and >> selecting List Drivers SquirrelSQL just hangs forever. >> >> >> Any help or insight would be greatly appreciated. The one thing I am not >> sure about is the Kerberos integration, and wether or not I will need to >> wait or include PHOENIX-19. However this patch appears to be for passing >> the principal and keytab to the driver, not using a ticket cache. I also >> don't think that is my problem right now, as it does not appear to be >> getting far enough to authenticate at this point. >> >> Thanks >> Justin >> >> >> > > > -- > Thanks & Regards, > Anil Gupta >
