Apache airflow celery worker server running in dev mode on production build

Viewed 318

I have created a production docker image using breeze command line tool provided. However when I run the airflow worker command, I get the following message on the command line.

Breeze command:

./breeze build-image --production-image --python 3.7 --additional-extras=jdbc --additional-python-deps="pandas pymysql" --additional-runtime-apt-deps="default-jre-headless"

Can anyone help on how to move the worker out of development server?

airflow-worker_1     | Starting flask
airflow-worker_1     |  * Serving Flask app "airflow.utils.serve_logs" (lazy loading)
airflow-worker_1     |  * Environment: production
airflow-worker_1     |    WARNING: This is a development server. Do not use it in a production deployment.
airflow-worker_1     |    Use a production WSGI server instead.
airflow-worker_1     |  * Debug mode: off
airflow-worker_1     | [2021-02-08 21:57:58,409] {_internal.py:113} INFO -  * Running on http://0.0.0.0:8793/ (Press CTRL+C to quit)
1 Answers

here is a discussion by airflow maintainer in github: https://github.com/apache/airflow/discussions/18519

It's harmless. It's an internal server run by the executor to share logs with the webserver. It's been already corrected in main to use 'production` setup (thought it's not REALLY) needed i this case as the log "traffic" and characteristics is not production-webserver like. The fix will be released in Airflow 2.2 (~ month from now) .

Related