fabiogjardim / mds

Modern Data Stack
58 stars 30 forks source link

Airflow não iniciou #1

Open cglsoft opened 1 year ago

cglsoft commented 1 year ago

O link na readme (https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html) está direcionando para o spark.

O Airflow não estã acessível.

O log:

home/airflow/.local/lib/python3.7/site-packages/airflow/configuration.py:386: FutureWarning: The auth_backends setting in [api] has had airflow.api.auth.backend.session added in the running config, which is needed by the UI. Please update your config before Apache Airflow 3.0. FutureWarning,

WARNING!!!: AIRFLOW_UID not set! If you are on Linux, you SHOULD follow the instructions below to set AIRFLOW_UID environment variable, otherwise files will be owned by root. For other operating systems you can get rid of the warning with manually created .env file: See: https://airflow.apache.org/docs/apache-airflow/stable/howto/docker-compose/index.html#setting-the-right-airflow-user

The container is run as root user. For security, consider using a regular user account. .................... ERROR! Maximum number of retries (20) reached.

Last check result: $ airflow db check /home/airflow/.local/lib/python3.7/site-packages/airflow/configuration.py:386: FutureWarning: The auth_backends setting in [api] has had airflow.api.auth.backend.session added in the running config, which is needed by the UI. Please update your config before Apache Airflow 3.0. FutureWarning, [2023-02-19 00:06:52,364] {cli_action_loggers.py:125} WARNING - Failed to log action with (psycopg2.OperationalError) could not translate host name "postgres" to address: Temporary failure in name resolution

(Background on this error at: https://sqlalche.me/e/14/e3q8) Traceback (most recent call last): File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 3361, in _wrap_pool_connect return fn() File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 325, in connect return _ConnectionFairy._checkout(self) File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 888, in _checkout fairy = _ConnectionRecord.checkout(pool) File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 491, in checkout rec = pool._do_get() File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/pool/impl.py", line 146, in _do_get self._dec_overflow() File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 72, in exit with_traceback=exctb, File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 210, in raise raise exception File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/pool/impl.py", line 143, in _do_get return self._create_connection() File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 271, in _create_connection return _ConnectionRecord(self) File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 386, in init self.connect() File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 685, in connect pool.logger.debug("Error on connect(): %s", e) File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 72, in exit with_traceback=exctb, File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 210, in raise raise exception File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/pool/base.py", line 680, in __connect self.dbapi_connection = connection = pool._invoke_creator(self) File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/create.py", line 578, in connect return dialect.connect(*cargs, *cparams) File "/home/airflow/.local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 598, in connect return self.dbapi.connect(cargs, cparams) File "/home/airflow/.local/lib/python3.7/site-packages/psycopg2/init.py", line 122, in connect conn = _connect(dsn, connection_factory=connection_factory, kwasync) psycopg2.OperationalError: could not translate host name "postgres" to address: Temporary failure in name resolution

fabiogjardim commented 1 year ago

Possivelmente o postgres não iniciou. Tente executar o comando abaixo. Alguns diretórios deram problemas.

mkdir .\postgres\postgres-db-volume\pg_stat mkdir .\postgres\postgres-db-volume\pg_tblspc