Discussion:
error when beeline connecting to hiveserver2
侯宗田
2018-04-23 13:38:57 UTC
Permalink
Hi,
!connect jdbc:hive2://localhost:10002/default <hive2://localhost:10002/default>
But get the following error

WARN jdbc.HiveConnection: Failed to connect to localhost:10002
Unknown HS2 problem when communicating with Thrift server.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10002/default: Invalid status 72 (state=08S01,code=0)
beeline>

I have set the webUI port to 10002 and mode as http, do I still lost something?
Does anyone know what is the problem and how to solve it?
Johannes Alberti
2018-04-23 17:55:22 UTC
Permalink
You should connect by default to 10000, the webui port is not the port beeline connects with. Regards, Johannes

Sent from my iPhone
Post by 侯宗田
Hi,
!connect jdbc:hive2://localhost:10002/default
But get the following error
WARN jdbc.HiveConnection: Failed to connect to localhost:10002
Unknown HS2 problem when communicating with Thrift server.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10002/default: Invalid status 72 (state=08S01,code=0)
beeline>
I have set the webUI port to 10002 and mode as http, do I still lost something?
Does anyone know what is the problem and how to solve it?
侯宗田
2018-04-24 08:19:17 UTC
Permalink
Thank you very much for your reply, I have changed the port number and set the thrift.bind.host to localhost. But I still get the error, do you have some ideas about this?

beeline> !connect jdbc:hive2://localhost:10000 anonymous anonymous
Connecting to jdbc:hive2://localhost:10000
/04/24 16:13:59 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10000
Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)
Post by Johannes Alberti
You should connect by default to 10000, the webui port is not the port beeline connects with. Regards, Johannes
Sent from my iPhone
Post by 侯宗田
Hi,
!connect jdbc:hive2://localhost:10002/default <hive2://localhost:10002/default>
But get the following error
WARN jdbc.HiveConnection: Failed to connect to localhost:10002
Unknown HS2 problem when communicating with Thrift server.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10002/default: <hive2://localhost:10002/default:> Invalid status 72 (state=08S01,code=0)
beeline>
I have set the webUI port to 10002 and mode as http, do I still lost something?
Does anyone know what is the problem and how to solve it?
Antal Sinkovits
2018-04-25 10:23:55 UTC
Permalink
Hi,


First of all, I would check if the HiveServer2 is running, and listens on
the given port.


E.g:

lsof -i -P |grep java


You should see something like:

java 33169 asinkovits 349u IPv6 0x1111111111111111 0t0 TCP
*:10000 (LISTEN)

java 33169 asinkovits 350u IPv6 0x1111111111111111 0t0 TCP
*:10002 (LISTEN)

If it does, try

beeline -u jdbc:hive2://localhost:10000

Regards,
Antal
Post by 侯宗田
Thank you very much for your reply, I have changed the port number and set
the thrift.bind.host to localhost. But I still get the error, do you have
some ideas about this?
beeline> !connect jdbc:hive2://localhost:10000 anonymous anonymous
Connecting to jdbc:hive2://localhost:10000
/04/24 16:13:59 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10000
Could not open connection to the HS2 server. Please check the server URI
and if the URI is correct, then ask the administrator to check the server
status.
hive2://localhost:10000: java.net.ConnectException: Connection refused
(Connection refused) (state=08S01,code=0)
You should connect by default to 10000, the webui port is not the port
beeline connects with. Regards, Johannes
Sent from my iPhone
Hi,
!connect jdbc:hive2://localhost:10002/default
But get the following error
WARN jdbc.HiveConnection: Failed to connect to localhost:10002
Unknown HS2 problem when communicating with Thrift server.
hive2://localhost:10002/default: Invalid status 72 (state=08S01,code=0)
beeline>
I have set the webUI port to 10002 and mode as http, do I still lost something?
Does anyone know what is the problem and how to solve it?
侯宗田
2018-04-25 11:50:51 UTC
Permalink
Hi, Antal

Thank you, I have followed some web guide and set hive2 transport mode to http, then the port number become 10001. I changed it back and set the proxy username in hdfs and it worked.

Regards,
Hou
Hi,
First of all, I would check if the HiveServer2 is running, and listens on the given port.
lsof -i -P |grep java
java 33169 asinkovits 349u IPv6 0x1111111111111111 0t0 TCP *:10000 (LISTEN)
java 33169 asinkovits 350u IPv6 0x1111111111111111 0t0 TCP *:10002 (LISTEN)
If it does, try
beeline -u jdbc:hive2://localhost:10000
Regards,
Antal
Thank you very much for your reply, I have changed the port number and set the thrift.bind.host to localhost. But I still get the error, do you have some ideas about this?
beeline> !connect jdbc:hive2://localhost:10000 <> anonymous anonymous
Connecting to jdbc:hive2://localhost:10000 <>
/04/24 16:13:59 [main]: WARN jdbc.HiveConnection: Failed to connect to localhost:10000
Could not open connection to the HS2 server. Please check the server URI and if the URI is correct, then ask the administrator to check the server status.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10000: <> java.net.ConnectException: Connection refused (Connection refused) (state=08S01,code=0)
Post by Johannes Alberti
You should connect by default to 10000, the webui port is not the port beeline connects with. Regards, Johannes
Sent from my iPhone
Post by 侯宗田
Hi,
!connect jdbc:hive2://localhost:10002/default <>
But get the following error
WARN jdbc.HiveConnection: Failed to connect to localhost:10002
Unknown HS2 problem when communicating with Thrift server.
Error: Could not open client transport with JDBC Uri: jdbc:hive2://localhost:10002/default: <> Invalid status 72 (state=08S01,code=0)
beeline>
I have set the webUI port to 10002 and mode as http, do I still lost something?
Does anyone know what is the problem and how to solve it?
Loading...