Reply
Highlighted
Contributor
Posts: 47
Registered: ‎05-21-2018

HiveServer2: could not start ThriftBinaryCLIService

[ Edited ]

I have 3 node cluster and install haproxy on node1.

 

the list of hive services running on my node 1 are : Metastore server, Webcat server, and HiveServer2.

 

one instance of hive server2 is running on node 2 and its working fine.

 

But node1 hive server2 is not running and showing this errot:

 

 

Error starting HiveServer2: could not start ThriftBinaryCLIService
org.apache.thrift.transport.TTransportException: Could not create ServerSocket on address 0.0.0.0/0.0.0.0:10000.
	at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:109)
	at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:91)
	at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:87)
	at org.apache.hadoop.hive.common.auth.HiveAuthUtils.getServerSocket(HiveAuthUtils.java:87)
	at org.apache.hive.service.cli.thrift.ThriftBinaryCLIService.run(ThriftBinaryCLIService.java:67)
	at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketException: Address already in use (Listen failed)
	at java.net.PlainSocketImpl.socketListen(Native Method)
	at java.net.AbstractPlainSocketImpl.listen(AbstractPlainSocketImpl.java:399)
	at java.net.ServerSocket.bind(ServerSocket.java:376)
	at org.apache.thrift.transport.TServerSocket.<init>(TServerSocket.java:106)

 

on cli its showing haproxy is using the port 10000

 

[root@cm1 singhkabir880]# netstat -tulpn | grep 10000tcp 0 0 0.0.0.0:10000 0.0.0.0:* LISTEN 882/haproxy [root@cm1 singhkabir880]#

 

i have add hive server2 role first then install haproxy service and made below changes in  :

/etc/haproxy/haproxy.cfg

:

 

listen hiveserver2 :10000 
#haproxy will listen in port 10000 for hiveserver2 client requests.

mode tcp 
option tcplog
balance leastconn 

#tcp – connection mode between haproxy to hive servers
#leastconn – requests will be sent to server with less connection

server server1 node1:10000
server server2 node2:10000

 

 

What should do i need to order to start newly added hive server2 ?

 

Kindly Suggest.

Contributor
Posts: 47
Registered: ‎05-21-2018

Re: HiveServer2: could not start ThriftBinaryCLIService

Do i need two hive metastore server to run two hive server2 or only one metastore server will cater request of both hive server2.??

New Contributor
Posts: 1
Registered: ‎03-05-2019

Re: HiveServer2: could not start ThriftBinaryCLIService

 I know one thrift server will handle more than one hiveserver2. 

Expert Contributor
Posts: 78
Registered: ‎01-08-2016

Re: HiveServer2: could not start ThriftBinaryCLIService

Hello @prabhat10,

 

From your description, following are the assumptions:

  • cm1 = node1
  • haproxy and hs2 are on same host
  • There is a limitation in your environment haproxy and hs2 can't be on different host.

If above assumption is right then you can change the thrift port and share your observations.

 

Hope that helps.

Announcements