Created 11-29-2018 02:19 PM
Hi Folks,
I am trying to connect Hadoop hbase with phoenix +Kerberos in PHP pdo odbc
Driver used:Hortonworks Phoenix ODBC Driver 64-bit
done the necessary settings in odbc.ini,odbcinst.ini and also set the lib path.
Even after tying for days i am unable to connect to the Hadoop cluster.
error:
Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[HY000] SQLDriverConnect: 20 [unixODBC][Hortonworks][Phoenix] (20) Error with HTTP API: Server returned nothing (no headers, no data)' in /var/www/html/abc/test.php:20 Stack trace: #0 /var/www/html/abc/test.php(20): PDO->__construct('odbc:DRIVER=Hor...', '', '') #1 {main} thrown in
my code snippet:
$connecttest="odbc:DRIVER=Hortonworks
Phoenix ODBC Driver
64-bit;HOST=${dbHost};DATABASE=hbase:${userName}@KARIX.LOCAL:${keyTabFile};port=${dbPort}";
//
$conn = new PDO ($connecttest,"","");
the Hadoop server is receiving the http hits, but i am not sure is it because of Kerberos connection is not getting established.
My initial set up was PHP-JDBC bridge and i had set up krb5, and it was working fine .
I am not sure how to set up krb5 for php
Any help will/would be appreciated
Regards,
Vinaya
Created 11-29-2018 03:30 PM
Please start by ensuring you have the latest Phoenix ODBC driver as available on https://hortonworks.com/downloads/
Without more information from you as to what is happening server-side, I'm not sure how you expect anyone to be able to help you. Turn on logging in the ODBC driver (instructions are in the user guide for the ODBC driver on the downloads page) and look at the logging inside of the Phoenix Query Server.
Created 11-30-2018 07:34 PM
Hi Josh Elser,
Thanks for the quick response,
Basically my problem is I don't know how to pass /attach the Kerberos's keytab to the driver/DSN. I am using PHP ODBC for the connection.
my hortonworks.phoenixodbc.ini
[Driver]
ErrorMessagesPath=/opt/hortonworks/phoenixodbc/ErrorMessages
LogLevel=6
LogPath=/opt/hortonworks
SwapFilePath=/tmp
I don't see any files logged in the logpath
Please check the attachment (the snap shot from the server where the Hadoop set up is 10.150.193.31) the application is hosted on 172.16.14.117
1) using php-jdbc which i am able to connect the phoenix (file name 117-server- jdbc.pcap)
2) using PHP ODBC using horton works odbc driver (file name 117-server - php.pcap)
Regards,
Vinaya