abhijeet dada mote created AIRFLOW-841:
------------------------------------------

             Summary: "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
         Attachments: 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)
#    Installed rabitmq and created the user and given the permissions.
#    Installed postgresql and dependent packages, added required URL string.
#    But facing the error which is mentioned above.


Is there any dependency of flower on airflow. The dags which I have created 
using CeleryExecutor is working fine through command line but not working in UI.

Thanks,
Abhijeet



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

Reply via email to