0
votes

[enter image description here][1]When I integrated HIVE into my HUE, I reported a mistake.

I tried for many days, but I couldn't solve it. Can anyone help me?

I search on Google,but no success.

TSocket read 0 bytes
×
TSocket read 0 bytes (code THRIFTTRANSPORT): TTransportException('TSocket read 0 bytes',)

update: my hue version is 4.5.0 and hive version is 3.1.0

hive is one of the compenent of hdp 3.1.4.0

and no kerberos configured

hue conf related hive is below:

[beeswax]

 # Host where HiveServer2 is running.
 # If Kerberos security is enabled, use fully-qualified domain name (FQDN).

 hive_server_host=jd-xxx-001.ABC.XYZ

 # Port where HiveServer2 Thrift server runs on.
 hive_server_port=10016

 # Hive configuration directory, where hive-site.xml is located
 hive_conf_dir=/etc/hive/conf

 # Timeout in seconds for thrift calls to Hive service
 server_conn_timeout=120

hue log as below:

[03/Nov/2019 19:12:43 -0800] access       INFO     192.168.16.13 admin - "GET /static/desktop/js/queryBuilder.4597d86a7a3f.js HTTP/1.1" returned in 3ms
    [03/Nov/2019 19:12:43 -0800] access       INFO     192.168.16.13 admin - "GET /static/desktop/js/bundles/hue/notebook-chunk-8a9143f5572b79c918e5.aefcf25c309b.js HTTP/1.1" returned in 1ms
    [03/Nov/2019 19:12:43 -0800] access       INFO     192.168.16.13 admin - "GET /static/desktop/js/bundles/hue/vendors~notebook-chunk-8a9143f5572b79c918e5.8b3cae4709a3.js HTTP/1.1" returne
d in 3ms
    [03/Nov/2019 19:12:44 -0800] hive_server2_lib INFO     Opening beeswax thrift session for user admin
    [03/Nov/2019 19:12:44 -0800] thrift_util  INFO     Thrift exception; retrying: TSocket read 0 bytes
    [03/Nov/2019 19:12:44 -0800] thrift_util  INFO     Thrift exception; retrying: TSocket read 0 bytes
    [03/Nov/2019 19:12:44 -0800] thrift_util  WARNING  Out of retries for thrift call: OpenSession
    [03/Nov/2019 19:12:44 -0800] thrift_util  INFO     Thrift saw a transport exception: TSocket read 0 bytes
    [03/Nov/2019 19:12:44 -0800] access       INFO     192.168.16.13 admin - "POST /notebook/api/autocomplete/ HTTP/1.1" returned in 33ms
    [03/Nov/2019 19:12:44 -0800] access       INFO     192.168.16.13 admin - "POST /notebook/api/create_notebook HTTP/1.1" returned in 5ms
    [03/Nov/2019 19:12:44 -0800] access       INFO     192.168.16.13 admin - "GET /desktop/workers/aceSqlSyntaxWorker.js HTTP/1.1" returned in 3ms
    [03/Nov/2019 19:12:44 -0800] access       INFO     192.168.16.13 admin - "GET /desktop/workers/aceSqlLocationWorker.js HTTP/1.1" returned in 1ms
    [03/Nov/2019 19:12:44 -0800] access       INFO     192.168.16.13 admin - "GET /desktop/api2/user_preferences/default_app HTTP/1.1" returned in 2ms
    [03/Nov/2019 19:12:44 -0800] access       INFO     192.168.16.13 admin - "GET /static/desktop/js/ace/theme-hue.js HTTP/1.1" returned in 0ms
    [03/Nov/2019 19:12:45 -0800] access       WARNING  192.168.16.13 admin - "POST /jobbrowser/jobs/ HTTP/1.1"-- 404 not found
    [03/Nov/2019 19:12:45 -0800] base         WARNING  Not Found: /jobbrowser/jobs/
    [03/Nov/2019 19:12:45 -0800] access       INFO     192.168.16.13 admin - "GET /notebook/api/get_history HTTP/1.1" returned in 5ms
    [03/Nov/2019 19:12:45 -0800] access       INFO     192.168.16.13 admin - "GET /static/desktop/js/ace/snippets/hive.js HTTP/1.1" returned in 0ms
    [03/Nov/2019 19:12:45 -0800] access       INFO     192.168.16.13 admin - "GET /desktop/api2/context/computes/hive HTTP/1.1" returned in 19ms
    [03/Nov/2019 19:12:46 -0800] hive_server2_lib INFO     Opening beeswax thrift session for user admin
    [03/Nov/2019 19:12:46 -0800] thrift_util  INFO     Thrift exception; retrying: TSocket read 0 bytes
    [03/Nov/2019 19:12:46 -0800] thrift_util  INFO     Thrift exception; retrying: TSocket read 0 bytes
    [03/Nov/2019 19:12:46 -0800] thrift_util  WARNING  Out of retries for thrift call: OpenSession
[03/Nov/2019 19:12:46 -0800] thrift_util INFO Thrift saw a transport exception: TSocket read 0 bytes [03/Nov/2019 19:12:46 -0800] decorators ERROR Error running create_session Traceback (most recent call last): File "/home/hue/hue450_install/hue/desktop/libs/notebook/src/notebook/decorators.py", line 105, in decorator return func(*args, **kwargs) File "/home/hue/hue450_install/hue/desktop/libs/notebook/src/notebook/api.py", line 97, in create_session response['session'] = get_api(request, session).create_session(lang=session['type'], properties=properties) File "/home/hue/hue450_install/hue/desktop/libs/notebook/src/notebook/connectors/hiveserver2.py", line 90, in decorator raise QueryError(message) QueryError: TSocket read 0 bytes (code THRIFTTRANSPORT): TTransportException('TSocket read 0 bytes',)
2
I don't konw how to upload a image.WakerWang
Welcome to SO! When you place a question try to add a minimum content: input sample, expected output sample, what did you try, research and where are you stuck. We need some more information. In order to add one image just, edit your post (selecting "edit" at the bottom of your post) and, in the edition bar, at the top of your post code, you will find one Icon for image upload. Click on it, then one small add-in will ask you for browsing in your computer, just choose your image and done. When the upload finished, on the code you can add a description.David García Bodego
Thank U. I had upload my image.And this is my hue.ini configWakerWang
I so apology for my description.Because this is first time that I use stack overflow.WakerWang

2 Answers

2
votes

This helps me:

  1. hue/build/env/bin/pip install thrift-sasl==0.2.1
  2. Use SASL framework to establish connection to host. use_sasl=true
  3. engine=sqlite3 -> engine=postgresql_psycopg2 (or another db)
0
votes

Sounds like the same this one which explains why https://github.com/cloudera/hue/issues/849