Hive - SQLlab error: [Errno 61] Connection refused
See original GitHub issueMake sure these boxes are checked before submitting your issue - thank you!
- I have checked the superset logs for python stacktraces and included it here as text if any
- I have reproduced the issue with at least the latest released version of superset
- I have checked the issue tracker for the same issue and I haven’t found one similar
Superset version
{
"GIT_SHA": "",
"version": "0.15.4"
}
Expected results
The data from query
Actual results
This Appears inside the data box:
<html> <body>
Sorry, something went wrong
500 - Internal Server Error
Stacktrace
Traceback (most recent call last): File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/flask/app.py", line 1982, in wsgi_app response = self.full_dispatch_request() File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/flask/app.py", line 1614, in full_dispatch_request rv = self.handle_user_exception(e) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/flask/app.py", line 1517, in handle_user_exception reraise(exc_type, exc_value, tb) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/flask/app.py", line 1612, in full_dispatch_request rv = self.dispatch_request() File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/flask/app.py", line 1598, in dispatch_request return self.view_functions[rule.endpoint](**req.view_args) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/flask_appbuilder/security/decorators.py", line 52, in wraps return f(self, *args, **kwargs) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/superset/models.py", line 2590, in wrapper value = f(*args, **kwargs) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/superset/views.py", line 2503, in sql_json store_results=not query.select_as_cta) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/celery/app/task.py", line 453, in delay return self.apply_async(args, kwargs) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/celery/app/task.py", line 565, in apply_async **dict(self._get_exec_options(), **options) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/celery/app/base.py", line 354, in send_task reply_to=reply_to or self.oid, **options File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/celery/app/amqp.py", line 310, in publish_task **kwargs File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/kombu/messaging.py", line 172, in publish routing_key, mandatory, immediate, exchange, declare) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/kombu/connection.py", line 470, in _ensured interval_max) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/kombu/connection.py", line 382, in ensure_connection interval_start, interval_step, interval_max, callback) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/kombu/utils/__init__.py", line 246, in retry_over_time return fun(*args, **kwargs) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/kombu/connection.py", line 250, in connect return self.connection File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/kombu/connection.py", line 756, in connection self._connection = self._establish_connection() File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/kombu/connection.py", line 711, in _establish_connection conn = self.transport.establish_connection() File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/kombu/transport/pyamqp.py", line 116, in establish_connection conn = self.Connection(**opts) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/amqp/connection.py", line 165, in __init__ self.transport = self.Transport(host, connect_timeout, ssl) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/amqp/connection.py", line 186, in Transport return create_transport(host, connect_timeout, ssl) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/amqp/transport.py", line 299, in create_transport return TCPTransport(host, connect_timeout) File "/Users/asilvino/superset/venv/lib/python2.7/site-packages/amqp/transport.py", line 95, in __init__ raise socket.error(last_err) error: [Errno 61] Connection refused
</body> </html>
p.s.: Not HTML processed.
Steps to reproduce
1 - I connected to my hive database, tested the connection, seems OK. 2 - Create a table from a already existing table in the database. 3 - Go to SQL Lab tab. 4 - Try to query anything from the table the error pops up. 4.1 - The preview works.
Issue Analytics
- State:
- Created 7 years ago
- Comments:13 (5 by maintainers)
Top Results From Across the Web
Hive - SQLlab error: [Errno 61] Connection refused · Issue #2306
1 - I connected to my hive database, tested the connection, seems OK. 2 - Create a table from a already existing table...
Read more >Developers - Hive - SQLlab error: [Errno 61] Connection refused -
p.s.: Not HTML processed. Steps to reproduce. 1 - I connected to my hive database, tested the connection, seems OK. 2 - Create...
Read more >`Connection Refused` when running a Hive-Query within a ...
I am trying to run a hive query within a python script using Thrift library for Python. ... ConnectException: Connection refused)' FAILED: Execution...
Read more >Unable to execute HiveQL - Cloudera Community - 223253
I am using SelectHiveQL to query hive table and getting following error ... ConnectException: Connection refused). No FlowFile to route to ...
Read more >Execution Error, return code 2 from org.apache.hadoop.hive.ql ...
Every Mapping in Hive push down mode is converted into a set of hive execution queries. From the error message shared we can...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
As mistercrunch was saying, when you try to run queries pressing the button to run them as “async”, you should first install Celery and any broker, for instance Redis (I tested with Redis and it worked).
Steps:
Start Redis (note: it depends on your OS, in my case, it is Red-Hat): #Start the Redis Service systemctl start redis.service
Back to Python, and install the additional dependency to be able to use Redis in Celeris
pip install -U "celery[redis]"
Now, you should make some changes in the Celeris configuration. So you should edit the superset_config.py file in the following directory:
<path_to_your_virtualenv>/lib/python2.7/site-packages/superset/static/assets/superset_config.py
Note: In my case, I’ve created the virtualenv “venv” in my home directory:/home/my_user/venv/lib/python2.7/site-packages/superset/static/assets/superset_config.py
Note: after updating the config file, you should compile the superset_config.py file to get a *.pyc file running the following commands in python:Save the changes and restart.
It is ready. You should run the celeris worker. It can be done running the following command inside your virtualenv:
superset worker
Start the Superset server running in your virtualenv the command is below:
superset runserver
Now, when you run any async query (pressing the button), Superset will make use of Celery, and the results of your query will be retrieved using Celery and Redis.
As soon as I have some spare time, I will update the Superset installation document with this info.
Notice: this issue has been closed because it has been inactive for 350 days. Feel free to comment and request for this issue to be reopened.