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

[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',)

This helps me:
hue/build/env/bin/pip install thrift-sasl==0.2.1
Use SASL framework to establish connection to host. use_sasl=true
engine=sqlite3 -> engine=postgresql_psycopg2 (or another db)

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

Related

Springboot Webflux accesslog: What are the two numbers at the end please?

Small question regarding how to interpret a SpringBoot Webflux app access log please.
Currently, in my logs, more precisely access logs, I can see:
2021-07-31 13:46:19.913 INFO [service,,] 10 --- [or-http-epoll-1] reactor.netty.http.server.AccessLog : ip - - [31/Jul/2021:13:46:19 +0000] "GET /health HTTP/1.1" 200 3349 6
2021-07-31 13:47:18.531 INFO [service,,] 10 --- [or-http-epoll-2] reactor.netty.http.server.AccessLog : ip - - [31/Jul/2021:13:47:18 +0000] "GET /health/liveness HTTP/2.0" 200 3312 8
2021-07-31 13:47:33.347 INFO [service,,] 10 --- [or-http-epoll-2] reactor.netty.http.server.AccessLog : ip - - [31/Jul/2021:13:47:33 +0000] "GET /health HTTP/1.1" 200 3349 11
I understand the 200 is probably my http response, I return http 200.
But I am having a hard time understanding what are the last two numbers please.
3349 6
3312 8
3349 11
Any help?
Thank you
It does depend on log format definition, but it looks like the larger number is response size in bytes and the smaller is processing time of the request in ms.
I'll look at documentation to see where I'd expect to find the log format definition for a spring webflux app. I'd expect the format to be defined in a similar way to httpd access logs ( documentation for those is at https://httpd.apache.org/docs/2.4/logs.html)

How to debug random logouts from OpenStack Dashboard (Horizon)

I am using OpenStack Ocata release installed on my own servers. Long time all worked well.
A few days ago OpenStack dashboard starts frequently sign out users. And I can't figure out what is wrong.
Why httpd return 302 redirect to the login page? And how to debug what is wrong?
Httpd access logs:
10.0.0.2 - - [21/Mar/2018:08:29:26 +0000] "POST /dashboard/auth/login/ HTTP/1.1" 302 - "http://dashboard.example.com/dashboard/auth/login/?next=/dashboard/" "Mozilla/5.0 ... Firefox/59.0"
10.0.0.2 - - [21/Mar/2018:08:29:27 +0000] "GET /dashboard/ HTTP/1.1" 302 - "http://dashboard.example.com/dashboard/auth/login/?next=/dashboard/" "Mozilla/5.0 ... Firefox/59.0"
10.0.0.2 - - [21/Mar/2018:08:29:27 +0000] "GET /dashboard/identity/ HTTP/1.1" 200 53953 "http://dashboard.example.com/dashboard/auth/login/?next=/dashboard/" "Mozilla/5.0 ... Firefox/59.0"
193.169.81.251 - - [21/Mar/2018:08:29:29 +0000] "GET /dashboard/i18n/js/horizon+openstack_dashboard/ HTTP/1.1" 200 2372 "http://dashboard.example.com/dashboard/identity/" "Mozilla/5.0 ... Firefox/59.0"
10.0.0.2 - - [21/Mar/2018:08:29:33 +0000] "GET /dashboard/project/ HTTP/1.1" 302 - "http://dashboard.example.com/dashboard/identity/" "Mozilla/5.0 ... Firefox/59.0"
10.0.0.2 - - [21/Mar/2018:08:29:33 +0000] "GET /dashboard/auth/login/?next=/dashboard/project/ HTTP/1.1" 200 9041 "http://dashboard.example.com/dashboard/identity/" "Mozilla/5.0 ... Firefox/59.0"
10.0.0.2 - - [21/Mar/2018:08:29:34 +0000] "GET /dashboard/i18n/js/horizon+openstack_dashboard/ HTTP/1.1" 200 2372 "http://dashboard.example.com/dashboard/auth/login/?next=/dashboard/project/" "Mozilla/5.0 ... Firefox/59.0"
Httpd error logs:
[Wed Mar 21 08:29:26.646941 2018] [:error] [pid 41571] Attempted scope to domain default failed, will attemptto scope to another domain.
[Wed Mar 21 08:29:26.851412 2018] [:error] [pid 41571] Login successful for user "exampeuser", remote address 10.0.0.2.
[Wed Mar 21 08:29:27.161127 2018] [authz_core:error] [pid 25877] [client 10.0.0.2:44688] AH01630: client denied by server configuration: /usr/bin/keystone-wsgi-public, referer: http://dashboard.example.com/dashboard/auth/login/?next=/dashboard/
The problem was related to Memcached.
In my case, Memcached was DoSed from externally.
To resolve this I bind Memcached to local management interface instead any (0.0.0.0)

Cant access apprtc from another machine in same network

Iam new in webRtc. I need to run appRtc application on my local machine. I got the codebase from github and successfully run on my local ubuntu machine.
these are logs when try with browser on my pc
INFO 2017-11-30 09:00:18,966 api_server.py:205] Starting API server at: http://localhost:51242
WARNING 2017-11-30 09:00:18,976 inotify_file_watcher.py:196] There are too many directories in your application for changes in all of them to be monitored. You may have to restart the development server to see some changes to your files.
INFO 2017-11-30 09:00:18,976 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
INFO 2017-11-30 09:00:18,978 admin_server.py:116] Starting admin server at: http://localhost:8000
INFO 2017-11-30 09:00:43,290 apprtc.py:93] Applying media constraints: {'video': {'mandatory': {}, 'optional': [{'minWidth': '1280'}, {'minHeight': '720'}]}, 'audio': True}
WARNING 2017-11-30 09:00:43,299 apprtc.py:137] Invalid or no value returned from memcache, using fallback: null
INFO 2017-11-30 09:00:43,370 module.py:788] default: "GET / HTTP/1.1" 200 8616
INFO 2017-11-30 09:00:43,430 module.py:788] default: "GET /callstats/callstats.min.js HTTP/1.1" 304 -
INFO 2017-11-30 09:00:43,433 module.py:788] default: "GET /css/main.css HTTP/1.1" 304 -
INFO 2017-11-30 09:00:43,491 module.py:788] default: "GET /js/apprtc.debug.js HTTP/1.1" 304 -
INFO 2017-11-30 09:00:47,736 apprtc.py:417] Added client 02588444 in room 490664053, retries = 0
INFO 2017-11-30 09:00:47,738 apprtc.py:93] Applying media constraints: {'video': {'mandatory': {}, 'optional': [{'minWidth': '1280'}, {'minHeight': '720'}]}, 'audio': True}
WARNING 2017-11-30 09:00:47,746 apprtc.py:137] Invalid or no value returned from memcache, using fallback: null
INFO 2017-11-30 09:00:47,748 apprtc.py:560] User 02588444 joined room 490664053
INFO 2017-11-30 09:00:47,751 apprtc.py:561] Room 490664053 has state ['02588444']
INFO 2017-11-30 09:00:47,902 module.py:788] default: "POST /join/490664053 HTTP/1.1" 200 1199
INFO 2017-11-30 09:00:49,820 apprtc.py:485] Saved message for client 02588444:{True, 1} in room 490664053, retries=0
INFO 2017-11-30 09:00:49,833 module.py:788] default: "POST /message/490664053/02588444 HTTP/1.1" 200 21
INFO 2017-11-30 09:00:49,880 apprtc.py:485] Saved message for client 02588444:{True, 2} in room 490664053, retries=0
INFO 2017-11-30 09:00:49,894 module.py:788] default: "POST /message/490664053/02588444 HTTP/1.1" 200 21
INFO 2017-11-30 09:00:49,930 apprtc.py:485] Saved message for client 02588444:{True, 3} in room 490664053, retries=0
INFO 2017-11-30 09:00:49,958 module.py:788] default: "POST /message/490664053/02588444 HTTP/1.1" 200 21
INFO 2017-11-30 09:00:49,970 apprtc.py:485] Saved message for client 02588444:{True, 4} in room 490664053, retries=0
INFO 2017-11-30 09:00:49,982 module.py:788] default: "POST /message/490664053/02588444 HTTP/1.1" 200 21
INFO 2017-11-30 09:00:50,074 apprtc.py:485] Saved message for client 02588444:{True, 5} in room 490664053, retries=0
INFO 2017-11-30 09:00:50,084 module.py:788] default: "POST /message/490664053/02588444 HTTP/1.1" 200 21
I can open apprtc application on my browser. But i canot access from any other machine in same network.
these are the logs when try with browser on any other pc in same network.
INFO 2017-11-30 08:55:06,749 api_server.py:205] Starting API server at: http://localhost:55410
WARNING 2017-11-30 08:55:06,758 inotify_file_watcher.py:196] There are too many directories in your application for changes in all of them to be monitored. You may have to restart the development server to see some changes to your files.
INFO 2017-11-30 08:55:06,759 dispatcher.py:197] Starting module "default" running at: http://localhost:8080
INFO 2017-11-30 08:55:06,760 admin_server.py:116] Starting admin server at: http://localhost:8000
INFO 2017-11-30 08:55:10,582 apprtc.py:93] Applying media constraints: {'audio': True, 'video': {'optional': [{'minWidth': '1280'}, {'minHeight': '720'}], 'mandatory': {}}}
WARNING 2017-11-30 08:55:10,589 apprtc.py:137] Invalid or no value returned from memcache, using fallback: null
INFO 2017-11-30 08:55:10,636 module.py:788] default: "GET / HTTP/1.1" 200 8616
INFO 2017-11-30 08:55:10,685 module.py:788] default: "GET /css/main.css HTTP/1.1" 200 6402
INFO 2017-11-30 08:55:10,689 module.py:788] default: "GET /callstats/callstats.min.js HTTP/1.1" 200 245432
INFO 2017-11-30 08:55:10,696 module.py:788] default: "GET /js/apprtc.debug.js HTTP/1.1" 200 101567
INFO 2017-11-30 08:55:11,086 module.py:788] default: "GET /images/webrtc-icon-192x192.png HTTP/1.1" 200 31806
INFO 2017-11-30 08:55:18,872 apprtc.py:417] Added client 26553344 in room 419183955, retries = 0
INFO 2017-11-30 08:55:18,874 apprtc.py:93] Applying media constraints: {'audio': True, 'video': {'optional': [{'minWidth': '1280'}, {'minHeight': '720'}], 'mandatory': {}}}
WARNING 2017-11-30 08:55:18,879 apprtc.py:137] Invalid or no value returned from memcache, using fallback: null
INFO 2017-11-30 08:55:18,880 apprtc.py:560] User 26553344 joined room 419183955
INFO 2017-11-30 08:55:18,881 apprtc.py:561] Room 419183955 has state ['26553344']
INFO 2017-11-30 08:55:18,896 module.py:788] default: "POST /join/419183955 HTTP/1.1" 200 1203
INFO 2017-11-30 08:55:24,331 module.py:788] default: "GET /images/webrtc-icon-192x192.png HTTP/1.1" 304 -
INFO 2017-11-30 08:55:24,363 apprtc.py:485] Saved message for client 26553344:{True, 1} in room 419183955, retries=0
INFO 2017-11-30 08:55:24,383 module.py:788] default: "POST /message/419183955/26553344 HTTP/1.1" 200 21
INFO 2017-11-30 08:55:24,396 apprtc.py:485] Saved message for client 26553344:{True, 2} in room 419183955, retries=1
INFO 2017-11-30 08:55:24,405 module.py:788] default: "POST /message/419183955/26553344 HTTP/1.1" 200 21
INFO 2017-11-30 08:55:58,211 apprtc.py:455] Removed client 26553344 from room 419183955, retries=0
INFO 2017-11-30 08:55:58,212 apprtc.py:494] Room 419183955 has state None
INFO 2017-11-30 08:55:58,221 module.py:788] default: "POST /leave/419183955/26553344 HTTP/1.1" 200 -
INFO 2017-11-30 08:55:59,071 module.py:788] default: "GET /r/ HTTP/1.1" 404 154
INFO 2017-11-30 08:56:00,542 module.py:788] default: "GET /favicon.ico HTTP/1.1" 404 154
The browser shows some error message like this
Failed to get access to local media. Error name was NotSupportedError. Continuing without sending a stream.
Why this behaviour? i need to access from other pc. is this possible?
Please do enable SSL. The access will only work with SSL

HTTP Status 404 - /ks-with-rice-bundled/kew/ActionList.do

On Front End below screen comes up when we enter into kuali Student login UI with admin/admin account.
HTTP Status 404 - /ks-with-rice-bundled/kew/ActionList.do
type Status report
message /ks-with-rice-bundled/kew/ActionList.do
description The requested resource is not available.
This is the error I get in the log file:
192.168.0.134 - - [21/Jan/2016:15:33:00 +0530] "POST /ks-with-rice-bundled-2.0.3-cm/org.kuali.student.lum.lu.ui.main.LUMMain/rpcservices/ServerPropertiesRpcService HTTP/1.1" 200 46
192.168.0.134 - - [21/Jan/2016:15:33:00 +0530] "POST /ks-with-rice-bundled-2.0.3-cm/org.kuali.student.lum.lu.ui.main.LUMMain/rpcservices/SecurityRpcService HTTP/1.1" 200 21
192.168.0.134 - - [21/Jan/2016:15:33:00 +0530] "POST /ks-with-rice-bundled-2.0.3-cm/org.kuali.student.lum.lu.ui.main.LUMMain/rpcservices/MetadataRpcService HTTP/1.1" 200 4745
192.168.0.134 - - [21/Jan/2016:15:33:00 +0530] "POST /ks-with-rice-bundled-2.0.3-cm/org.kuali.student.lum.lu.ui.main.LUMMain/rpcservices/ServerPropertiesRpcService HTTP/1.1" 200 355
192.168.0.134 - - [21/Jan/2016:15:33:00 +0530] "POST /ks-with-rice-bundled-2.0.3-cm/org.kuali.student.lum.lu.ui.main.LUMMain/rpcservices/ServerPropertiesRpcService HTTP/1.1" 200 179
192.168.0.134 - - [21/Jan/2016:15:33:00 +0530] "POST /ks-with-rice-bundled-2.0.3-cm/org.kuali.student.lum.lu.ui.main.LUMMain/rpcservices/SecurityRpcService HTTP/1.1" 200 204
192.168.0.134 - - [21/Jan/2016:15:33:00 +0530] "GET /ks-with-rice-bundled/kew/ActionList.do HTTP/1.1" 404 1027
192.168.0.134 - - [21/Jan/2016:15:33:01 +0530] "POST /ks-with-rice-bundled-2.0.3-cm/org.kuali.student.lum.lu.ui.main.LUMMain/rpcservices/SecurityRpcService HTTP/1.1" 200 287
Cataline.out logs gives below one:
2016-01-21 15:33:00,760 [http-bio-8080-exec-2] u:/d: INFO org.kuali.student.common.ui.server.gwt.ServerPropertiesRpcGwtServlet - Property not found, looking in Context: ks.rice.actionList.serviceAddress with value: http://kuali.localdomain:8080/ks-with-rice-bundled/kew/ActionList.do
2016-01-21 15:33:00,804 [http-bio-8080-exec-5] u:/d: INFO org.kuali.student.common.ws.ServletWrappingController - handleRequestInternal : SecurityGwtServlet
2016-01-21 15:33:00,818 [http-bio-8080-exec-7] u:/d: INFO org.kuali.student.common.ws.ServletWrappingController - handleRequestInternal : SecurityGwtServlet
I can see in the error, what is it, however I don't know how to solve it.
All of your successful POSTs are to /ks-with-rice-bundled-2.0.3-cm/... but the 404 is on /ks-with-rice-bundled. Rice configuration is leading to a redirect to the incorrect location.
I would either deploy the application to /ks-with-rice-bundled or add
<param name="app.code">ks-with-rice-bundled-2.0.3-cm</param>
to your local ks-config.xml.

Apache2 Error Log

I am running Apache 2.2 with PHP5.3 running a PHP business app. Everything works fine from a business point of view, however I do get an error in my apache error.log
[Thu Nov 01 12:07:17 2012] [error] [client 10.200.8.37] File does not exist: /var/www/webroot/itassistant
[Thu Nov 01 12:07:17 2012] [error] [client 10.200.8.37] File does not exist: /var/www/webroot/xmldata
In my access.log the following is logged:
10.200.8.37 - - [01/Nov/2012:12:07:17 +0100] "GET /itassistant/ui/omaBaseFrame.htm HTTP/1.1" 404 490 "-" "Jakarta Commons-HttpClient/3.0.1"
10.200.8.37 - - [01/Nov/2012:12:07:17 +0100] "GET / HTTP/1.1" 200 348073 "-" "Jakarta Commons-HttpClient/3.0.1"
10.200.8.37 - - [01/Nov/2012:12:07:17 +0100] "GET /xmldata?item=All HTTP/1.1" 404 485 "-" "Jakarta Commons-HttpClient/3.0.1"
The PHP log gives no errors.
The PHP applications is the only application I am running and my application provider says that this isn't caused by the application.
I am running on an Ubuntu 12.04 server. Can anybody help me find the cause of these errors? How can I find out what is trying to call these non existing items and why
I have the same message in my access-logs, on al my web-servers. The message is logged daily, always at the same time. In our case HP-SIM (Systems Insight Manager monitoring tool) is causing these messages.