airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "abhijeet dada mote (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (AIRFLOW-841) "OperationalError: Couldn't log in: a socket error occurred" when using web UI
Date Fri, 10 Feb 2017 06:53:42 GMT

    [ https://issues.apache.org/jira/browse/AIRFLOW-841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15860843#comment-15860843
] 

abhijeet dada mote commented on AIRFLOW-841:
--------------------------------------------

Hi All,
We have resolved this error using 
{code}
rabbitmqctl  add_vhost airflow_demo
rabbitmqctl  set_permissions -p 127.0.0.1 host ".*" ".*" ".*"
{code}
But in rabbitmq log I am seeing this 
{code}
==> rabbitmq/rabbit@ip-172-31-0-30.log <==

=INFO REPORT==== 10-Feb-2017::06:44:42 ===
accepting AMQP connection <0.5356.1> (127.0.0.1:42808 -> 127.0.0.1:5672)
{code}

and when I start webserver I see this error into it.
{code}
[2017-02-10 06:44:53,902] {base_executor.py:36} INFO - Adding to queue: airflow run airflow_demo
get_ams_data 2017-02-10T00:00:00 --local -sd DAGS_FOLDER/airflow_demo.py 
[2017-02-10 06:44:53,913] {celery_executor.py:64} INFO - [celery] queuing ('airflow_demo',
'get_ams_data', datetime.datetime(2017, 2, 10, 0, 0)) through celery, queue=default
{code}

As per my understanding rabbitmq is not queuing the task. Any suggestions into this to resolve
the problem? 

> "OperationalError: Couldn't log in: a socket error occurred" when using web UI
> ------------------------------------------------------------------------------
>
>                 Key: AIRFLOW-841
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-841
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: celery, executor, scheduler, ui
>            Reporter: abhijeet dada mote
>            Assignee: Siddharth Anand
>              Labels: beginner, triaged
>         Attachments: airflow.cfg, hello.py, print_range.py
>
>
> Hi All,
> I am getting following error when I am trying to run my workflow using UI.
> Can anyone help me to resolve this problem? 
> *OperationalError: Couldn't log in: a socket error occurred*
> {code}
> Traceback (most recent call last):
>   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1817, in wsgi_app
>     response = self.full_dispatch_request()
>   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1477, in full_dispatch_request
>     rv = self.handle_user_exception(e)
>   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1381, in handle_user_exception
>     reraise(exc_type, exc_value, tb)
>   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1475, in full_dispatch_request
>     rv = self.dispatch_request()
>   File "/usr/local/lib/python2.7/dist-packages/flask/app.py", line 1461, in dispatch_request
>     return self.view_functions[rule.endpoint](**req.view_args)
>   File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 68, in inner
>     return self._run_view(f, *args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/flask_admin/base.py", line 367, in _run_view
>     return fn(self, *args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/flask_login.py", line 755, in decorated_view
>     return func(*args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/airflow/www/utils.py", line 118, in wrapper
>     return f(*args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/airflow/www/utils.py", line 167, in wrapper
>     return f(*args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/airflow/www/views.py", line 989, in run
>     executor.heartbeat()
>   File "/usr/local/lib/python2.7/dist-packages/airflow/executors/base_executor.py", line
99, in heartbeat
>     self.execute_async(key, command=command, queue=queue)
>   File "/usr/local/lib/python2.7/dist-packages/airflow/executors/celery_executor.py",
line 66, in execute_async
>     args=[command], queue=queue)
>   File "/usr/local/lib/python2.7/dist-packages/celery/app/task.py", line 535, in apply_async
>     **options
>   File "/usr/local/lib/python2.7/dist-packages/celery/app/base.py", line 737, in send_task
>     amqp.send_task_message(P, name, message, **options)
>   File "/usr/local/lib/python2.7/dist-packages/celery/app/amqp.py", line 558, in send_task_message
>     **properties
>   File "/usr/local/lib/python2.7/dist-packages/kombu/messaging.py", line 181, in publish
>     exchange_name, declare,
>   File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 527, in _ensured
>     errback and errback(exc, 0)
>   File "/usr/lib/python2.7/contextlib.py", line 35, in __exit__
>     self.gen.throw(type, value, traceback)
>   File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 419, in _reraise_as_library_errors
>     sys.exc_info()[2])
>   File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 414, in _reraise_as_library_errors
>     yield
>   File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 515, in _ensured
>     reraise_as_library_errors=False,
>   File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 405, in ensure_connection
>     callback)
>   File "/usr/local/lib/python2.7/dist-packages/kombu/utils/functional.py", line 333,
in retry_over_time
>     return fun(*args, **kwargs)
>   File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 261, in connect
>     return self.connection
>   File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 802, in connection
>     self._connection = self._establish_connection()
>   File "/usr/local/lib/python2.7/dist-packages/kombu/connection.py", line 757, in _establish_connection
>     conn = self.transport.establish_connection()
>   File "/usr/local/lib/python2.7/dist-packages/kombu/transport/librabbitmq.py", line
132, in establish_connection
>     conn = self.Connection(**opts)
>   File "/usr/local/lib/python2.7/dist-packages/librabbitmq/__init__.py", line 199, in
__init__
>     self.connect()
> OperationalError: Couldn't log in: a socket error occurred
> {code}
> I have made the changes in _/home/ubuntu/airflow/airflow.cfg_ file.
> Commented the default setting to new one(changes are displayed below).
> {code}
> # executor = SequentialExecutor
> executor = CeleryExecutor
> # sql_alchemy_conn = sqlite:////home/ubuntu/airflow/airflow.db
> sql_alchemy_conn =  postgresql+psycopg2://airflow:airflow_demo@localhost:5432/airflow_demo
> # broker_url = sqla+mysql://airflow:airflow@localhost:3306/airflow
> broker_url = amqp://airflow:airflow_demo@localhost:5672/airflow_demo
> # celery_result_backend = db+mysql://airflow:airflow@localhost:3306/airflow
> celery_result_backend = db+postgresql://airflow:airflow_demo@localhost:5432/airflow_demo
> {code}
> To perform the activity through UI:
> #    I have installed Celery(because UI activity only works with celery executor)
> #    Installed rabitmq and created the user and given the permissions.
> #    Installed postgresql and dependent packages, added required URL string.
> #    I also have created the required user with permissions using rabitmqadmin.
> #    But facing the error which is mentioned above.
> Is there any dependency of flower service on airflow. The dags which I have created using
CeleryExecutor is working fine through command line but not working in UI.
> Following is the configuration file _/home/ubuntu/airflow/airflow.cfg_  [^airflow.cfg]
> Following is the dag which I have created: [^hello.py], [^print_range.py]
> [~nickt], [~criccomini], [~maxime.beauchemin@apache.org]. Can you please help me to resolve
this issue. 
> Thanks in Advance,
> Abhijeet



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message