[
https://issues.apache.org/jira/browse/AIRFLOW-2631?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16514057#comment-16514057
]
kunal gupta commented on AIRFLOW-2631:
--------------------------------------
Snippet from my airflow.cfg
Note: the airflow.cfg is same across for webserver, scheduler, flower and worker
[celery]
# This section only applies if you are using the CeleryExecutor in
# [core] section above
# The app name that will be used by celery
celery_app_name = airflow.executors.celery_executor
# The concurrency that will be used when starting workers with the
# "airflow worker" command. This defines the number of task instances that
# a worker will take, so size up your workers based on the resources on
# your worker box and the nature of your tasks
worker_concurrency = 16
# When you start an airflow worker, airflow starts a tiny web server
# subprocess to serve the workers local log files to the airflow main
# web server, who then builds pages and sends them to users. This defines
# the port on which the logs are served. It needs to be unused, and open
# visible from the main web server to connect into the workers.
worker_log_server_port = 8793
# The Celery broker URL. Celery supports RabbitMQ, Redis and experimentally
# a sqlalchemy database. Refer to the Celery documentation for more
# information.
broker_url = redis://:password@redis:6379/0
# Another key Celery setting
celery_result_backend =
db+mysql://airflowuser:[email protected]:3306/airflow
> Worker fails to connect with MySQL DB
> -------------------------------------
>
> Key: AIRFLOW-2631
> URL: https://issues.apache.org/jira/browse/AIRFLOW-2631
> Project: Apache Airflow
> Issue Type: Bug
> Affects Versions: Airflow 2.0, 1.10
> Reporter: kunal gupta
> Priority: Critical
>
> I have containerized Airflow webserver, scheduler, flower and worker. I'm
> using MySQL for the backend and Redis for queuing. Everytime I spin up the
> worker node it throws the error below and all the Dags are stuck in running
> status.
> Logs from the Worker Node:
> File "/usr/lib64/python2.7/site-packages/MySQLdb/connections.py", line 193,
> in __init__
> super(Connection, self).__init__(*args, **kwargs2)
> OperationalError: (_mysql_exceptions.OperationalError) (2002, "Can't connect
> to local MySQL server through socket '/var/lib/mysql/mysql.sock' (2)")
> [2018-06-15 10:21:56,005: ERROR/MainProcess] Pool callback raised exception:
> OperationalError('(_mysql_exceptions.OperationalError) (2002, "Can\'t connect
> to local MySQL server through socket \'/var/lib/mysql/mysql.sock\' (2)")',)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)