- Subscribe to RSS Feed
- Mark Question as New
- Mark Question as Read
- Float this Question for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Hive JDBC : Could not open client transport with JDBC Uri
- Labels:
-
Apache Hive
Created ‎01-07-2016 10:03 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I tried to connect to hive using jdbc but i had the following error:
Error: Could not open client transport with JDBC Uri: jdbc:hive2://server:10000/;principal=<Server_Principal_of_HiveServer2> java.net.ConnectException: Connection refused (state=08S01,code=0)
I got the same error from beeline : beeline -u 'jdbc:hive2://server:10000/;principal=<Server_Principal_of_HiveServer2>'
I will be thankfull for your help.
thanks
Hive version: 1.2.1
HDP: 2.3
Created ‎01-07-2016 07:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
is your hive Server is running in HTTP mode?
Connection URL When HiveServer2 Is Running in HTTP Mode:-
jdbc:hive2://<host>:<port>/<db>;transportMode=http;httpPath=<http_endpoint>
where:-
<http_endpoint> is the corresponding HTTP endpoint configured in hive-site.xml. Default value is cliservice.
Default port for HTTP transport mode is 10001.
Created ‎01-07-2016 03:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Have you checked if hive services are running? Also server name is correct?
Created ‎01-07-2016 05:00 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is this a kerberos enabled cluster?
Created ‎08-19-2020 09:23 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I have the same issue and in my case it is a Kerberos-enabled cluster. I modified the beeline command as follows:
${HIVE_HOME}/bin/beeline -u "jdbc:hive2://<server_name>:10015/default ssl=true;principal=<principal_name>/<hostname>@<REALM>;auth=kerberos; '' ''" "$@"
I get two errors:
- Unknown HS2 problem when communicating with Thrift server.
- Error: Could not open client transport with JDBC Uri: jdbc:hive2://<node_name>:10015/default: Invalid status 21 (state=08S01,code=0)
I would appreciate any help.
Created ‎01-07-2016 07:21 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
is your hive Server is running in HTTP mode?
Connection URL When HiveServer2 Is Running in HTTP Mode:-
jdbc:hive2://<host>:<port>/<db>;transportMode=http;httpPath=<http_endpoint>
where:-
<http_endpoint> is the corresponding HTTP endpoint configured in hive-site.xml. Default value is cliservice.
Default port for HTTP transport mode is 10001.
Created ‎09-12-2022 05:18 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How do we check if Hive is running in Http mode?
I tried to search the same in hive-site.xml and found that http.mode <binary> be default.
In this case , can you please help me with this issue?
Created ‎01-18-2016 06:01 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I may be able to provide analysis if you can post any error in hive server2 log.
First thing is to check if hive server2 is up and running properly.
Created ‎02-02-2016 02:14 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Ahmed Missaoui can you accept the best answer to close this thread?
Created ‎02-18-2016 12:29 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Kill your hiveserver2 & metastore & Restart them again.
- check hiveserver2 & metastore are running using 'jps' command.
- Run "root@hostname~]# beeline -u jdbc:hive2://localhost:10000/" .
- if still getting this error then replace "localhost" with "hostname " of step 3
- These above steps has worked for me.
Created ‎03-09-2016 05:56 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
These can be few reasons :
1) other instance of database may be running .
2) namenode might be in safe mode
3) common localhost:9000 connection refused error.
Best way is to check the hive logs and debug it.
