1
votes

Error :

Caused by: org.apache.thrift.transport.TTransportException: Could not create http connection to jdbc:hive2://xxxxxxxxxx.azurehdinsight.net:443/default;transportMode=http;ssl=true;httpPath=/hive2. HTTP Response code: 403

Code:

public static void main(String[] args) throws SQLException {
    Class.forName("org.apache.hive.jdbc.HiveDriver");
    Connection con = DriverManager.getConnection("jdbc:hive2://xxxxx.azurehdinsight.net:443/default;transportMode=http;ssl=true;httpPath=/hive2", "xxx", "xxx");
    Statement stmt = con.createStatement();
...
}

My Hive version: 1.2.1.2.5

My pom file:

<dependency>
        <groupId>org.apache.hive</groupId>
        <artifactId>hive-jdbc</artifactId>
        <version>1.2.0</version>
        <classifier>standalone</classifier>
</dependency>
1
check your clusterUser access rights - Nishu Tayal

1 Answers

0
votes

Check wikipedia form more details:

HTTP 403 is returned when the client is not permitted access to the resource for some reason besides authentication

Check your certificate (in case if it is expired etc.), and check if your user has proper rights for accessing Hive.