Facing error TSocket read 0 bytes
while trying to use Databases tab in HUE 4.5. And Error loading entries
instead Databases. In Administration tab I see:
Hive | The application won't work without a running HiveServer2.
thrift server is running.
Need help…
Is the HiveServer2 requiring SSL? Is the hive-site.xml on the Hue server in sync with the Hive one?
Can you connect via beeline to it?
Is the HiveServer2 requiring SSL : NO
Is the hive-site.xml on the Hue server in sync with the Hive one : YES
Can you connect via beeline to it : YES
Neither works with: ‘HiveServer2 requiring SSL : YES’
This is hiveserver2.log result:
2019-10-30T12:09:28,216 ERROR [HiveServer2-Handler-Pool: Thread-52] server.TThreadPoolServer: Error occurred during processing of message.
java.lang.RuntimeException: org.apache.thrift.transport.TTransportException: Invalid status -128
at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:219) ~[hive-exec-2.3.3.jar:2.3.3]
at org.apache.thrift.server.TThreadPoolServer$WorkerProcess.run(TThreadPoolServer.java:269) ~[hive-exec-2.3.3.jar:2.3.3]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_232]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_232]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_232]
Caused by: org.apache.thrift.transport.TTransportException: Invalid status -128
at org.apache.thrift.transport.TSaslTransport.sendAndThrowMessage(TSaslTransport.java:232) ~[hive-exec-2.3.3.jar:2.3.3]
at org.apache.thrift.transport.TSaslTransport.receiveSaslMessage(TSaslTransport.java:184) ~[hive-exec-2.3.3.jar:2.3.3]
at org.apache.thrift.transport.TSaslServerTransport.handleSaslStartMessage(TSaslServerTransport.java:125) ~[hive-exec-2.3.3.jar:2.3.3]
at org.apache.thrift.transport.TSaslTransport.open(TSaslTransport.java:271) ~[hive-exec-2.3.3.jar:2.3.3]
at org.apache.thrift.transport.TSaslServerTransport.open(TSaslServerTransport.java:41) ~[hive-exec-2.3.3.jar:2.3.3]
at org.apache.thrift.transport.TSaslServerTransport$Factory.getTransport(TSaslServerTransport.java:216) ~[hive-exec-2.3.3.jar:2.3.3]
… 4 more
Hello, Was this problem solved?
I’m seeing the same error. The default Hue’s Hive client was changed on Hue 4.5.0/4.6.0 ?
Hi, I’m facing the same issue, Hue 4.6, HDP 2.4.2 . are you solved this issue?
hi,there.
I have also been troubled by this problem in recent days.
I am a novice. I build a hive in my local area. The command line tests that hive can be used normally
Specific error reporting:
The environment is as follows:
hadoop-3.3.1
apache-hive-3.1.2-bin
python3.8
Hue is the latest code (I use git clone...)
# I also noticed
thrift-0.13.0
Error message:
31/Aug/2021 17:18:00 +0800] decorators ERROR Error running create_session
Traceback (most recent call last):
File "/home/hdoop/hue/desktop/core/src/desktop/lib/thrift_util.py", line 437, in wrapper
return attr(*args, **kwargs)
File "/home/hdoop/hue/desktop/core/src/desktop/lib/thrift_util.py", line 506, in wrapper
ret = res(*args, **kwargs)
File "/home/hdoop/hue/apps/beeswax/gen-py/TCLIService/TCLIService.py", line 229, in OpenSession
return self.recv_OpenSession()
File "/home/hdoop/hue/apps/beeswax/gen-py/TCLIService/TCLIService.py", line 241, in recv_OpenSession
(fname, mtype, rseqid) = iprot.readMessageBegin()
File "/home/hdoop/hue/build/env/lib/python3.8/site-packages/thrift/protocol/TBinaryProtocol.py", line 134, in readMessageBegin
sz = self.readI32()
File "/home/hdoop/hue/build/env/lib/python3.8/site-packages/thrift/protocol/TBinaryProtocol.py", line 217, in readI32
buff = self.trans.readAll(4)
File "/home/hdoop/hue/build/env/lib/python3.8/site-packages/thrift/transport/TTransport.py", line 62, in readAll
chunk = self.read(sz - have)
File "/home/hdoop/hue/build/env/lib/python3.8/site-packages/thrift/transport/TTransport.py", line 164, in read
self.__rbuf = BufferIO(self.__trans.read(max(sz, self.__rbuf_size)))
File "/home/hdoop/hue/build/env/lib/python3.8/site-packages/thrift/transport/TSocket.py", line 142, in read
raise TTransportException(type=TTransportException.END_OF_FILE,
thrift.transport.TTransport.TTransportException: TSocket read 0 bytes
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/hdoop/hue/desktop/libs/notebook/src/notebook/connectors/hiveserver2.py", line 99, in decorator
return func(*args, **kwargs)
File "/home/hdoop/hue/desktop/libs/notebook/src/notebook/connectors/hiveserver2.py", line 194, in create_session
session = db.open_session(self.user)
File "/home/hdoop/hue/apps/beeswax/src/beeswax/server/dbms.py", line 557, in open_session
return self.client.open_session(user)
File "/home/hdoop/hue/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 1555, in open_session
return self._client.open_session(user)
File "/home/hdoop/hue/apps/beeswax/src/beeswax/server/hive_server2_lib.py", line 690, in open_session
res = self._client.OpenSession(req)
File "/home/hdoop/hue/desktop/core/src/desktop/lib/thrift_util.py", line 450, in wrapper
raise StructuredThriftTransportException(e, error_code=502)
desktop.lib.exceptions.StructuredThriftTransportException: TSocket read 0 bytes (code THRIFTTRANSPORT): TTransportException('TSocket read 0 bytes')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/hdoop/hue/desktop/libs/notebook/src/notebook/decorators.py", line 119, in wrapper
return f(*args, **kwargs)
File "/home/hdoop/hue/desktop/libs/notebook/src/notebook/api.py", line 115, in create_session
response['session'] = get_api(request, session).create_session(lang=session['type'], properties=properties)
File "/home/hdoop/hue/desktop/libs/notebook/src/notebook/connectors/hiveserver2.py", line 105, in decorator
raise QueryError(message)
notebook.connectors.base.QueryError: TSocket read 0 bytes (code THRIFTTRANSPORT): TTransportException('TSocket read 0 bytes')
[31/Aug/2021 17:18:00 +0800] thrift_util INFO Thrift saw a transport exception: TSocket read 0 bytes
[31/Aug/2021 17:18:00 +0800] thrift_util DEBUG Thrift call: <class 'TCLIService.TCLIService.Client'>.OpenSession(args=(TOpenSessionReq(client_protocol=10, username='hue', password=None, configuration={'hive.server2.proxy.user': 'admin'}),), kwargs={})
hive-site.xml
configuration file
<configuration>
<property>
<name>hive.metastore.local</name>
<value>true</value>
</property>
<property>
<name>javax.jdo.option.ConnectionURL</name>
<value>jdbc:mysql://localhost:3306/hive?createDatabaseIfNotExist=true?useSSL=false</value>
</property>
<property>
<name>javax.jdo.option.ConnectionDriverName</name>
<value>com.mysql.jdbc.Driver</value>
</property>
<property>
<name>javax.jdo.option.ConnectionUserName</name>
<value>hadoop</value><!-- In my case UserName is hadoop-->
</property>
<property>
<name>javax.jdo.option.ConnectionPassword</name>
<value>hadoop</value><!-- In my case password is hadoop-->
</property>
</configuration>
Really, this problem bothers me for a long time and I can’t find a solution. I used docker at the beginning, but it was always this error. Later, it was changed to manual installation… I hope you can help me. Thank you