thousands-library-17999
01/15/2021, 12:12 AMripe-musician-59933
01/15/2021, 12:14 AMmeltano invoke airflow webserver
output is not revealing anything? Meltano directly invokes the airflow executable with the webserver
arg and has no further influence over how it runs, so if it's refusing connections that's more likely to be something to debug in Airflow than in Meltanothousands-library-17999
01/15/2021, 12:18 AMAirflow metadata database could not be initialized: airflow initdb failed
ripe-musician-59933
01/15/2021, 12:18 AM--log-level=debug
so that you get the full error outputthousands-library-17999
01/15/2021, 12:20 AMairflow.exceptions.AirflowConfigException: error: cannot use sqlite with the LocalExecutor
ripe-musician-59933
01/15/2021, 12:22 AMthousands-library-17999
01/15/2021, 12:24 AMripe-musician-59933
01/15/2021, 12:25 AMthousands-library-17999
01/15/2021, 12:27 AMripe-musician-59933
01/15/2021, 12:29 AMmeltano config airflow
to verify it gets picked up correctly?--log-level=debug invoke airflow scheduler
command that failed, you should also see a line prefixed with Updated section [core] with
. Does the sql_alchemy_conn
in that line match the Postgres URL?thousands-library-17999
01/15/2021, 12:34 AM'sql_alchemy_conn': 'sqlite:////project/.meltano/orchestrators/airflow/airflow.db'
ripe-musician-59933
01/15/2021, 12:34 AMmeltano config airflow
?thousands-library-17999
01/15/2021, 12:35 AMripe-musician-59933
01/15/2021, 12:36 AMAIRFLOW__CORE__SQL_ALCHEMY_CONN
env var for some reason 😕thousands-library-17999
01/15/2021, 12:36 AMripe-musician-59933
01/15/2021, 12:38 AMmeltano config airflow
and explicitly set AIRFLOW__CORE__SQL_ALCHEMY_CONN
using docker run -e "AIRFLOW__CORE__SQL_ALCHEMY_CONN=foo"
, does "foo" show up?$ AIRFLOW__CORE__SQL_ALCHEMY_CONN=foo meltano config airflow
{
"core": {
"dags_folder": "/Users/douwemaan/Development/meltano-projects/demo-project/orchestrate/dags",
"plugins_folder": "/Users/douwemaan/Development/meltano-projects/demo-project/orchestrate/plugins",
"sql_alchemy_conn": "foo",
"load_examples": "False",
"dags_are_paused_at_creation": "False"
}
}
thousands-library-17999
01/15/2021, 12:39 AM[2021-01-15 13:06:41,971] [1|MainThread|root] [INFO] DB connection failed. Will retry after 5s. Attempt 1/3
airflow-scheduler_1 | [2021-01-15 13:07:18,579] [1|MainThread|root] [INFO] DB connection failed. Will retry after 5s. Attempt 2/3
airflow-scheduler_1 | [2021-01-15 13:07:55,187] [1|MainThread|root] [INFO] DB connection failed. Will retry after 5s. Attempt 3/3
airflow-scheduler_1 | [2021-01-15 13:08:31,795] [1|MainThread|root] [ERROR] Could not connect to the Database. Max retries exceeded.
airflow-scheduler_1 | (psycopg2.OperationalError) could not connect to server: Connection timed out
airflow-scheduler_1 | Is the server running on host "meltano-system-db" (172.22.0.2) and accepting
airflow-scheduler_1 | TCP/IP connections on port 5432?
ripe-musician-59933
01/15/2021, 4:14 PMthousands-library-17999
01/15/2021, 5:10 PMripe-musician-59933
01/15/2021, 5:11 PMmeltano-system-db
container output?thousands-library-17999
01/15/2021, 5:11 PMmeltano-system-db_1 |
meltano-system-db_1 | PostgreSQL Database directory appears to contain a database; Skipping initialization
meltano-system-db_1 |
meltano-system-db_1 | 2021-01-15 16:43:09.756 UTC [1] LOG: starting PostgreSQL 13.1 (Debian 13.1-1.pgdg100+1) on x86_64-pc-linux-gnu, compiled by gcc (Debian 8.3.0-6) 8.3.0, 64-bit
meltano-system-db_1 | 2021-01-15 16:43:09.756 UTC [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
meltano-system-db_1 | 2021-01-15 16:43:09.756 UTC [1] LOG: listening on IPv6 address "::", port 5432
meltano-system-db_1 | 2021-01-15 16:43:09.769 UTC [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
meltano-system-db_1 | 2021-01-15 16:43:09.776 UTC [26] LOG: database system was shut down at 2021-01-15 16:42:19 UTC
meltano-system-db_1 | 2021-01-15 16:43:09.781 UTC [1] LOG: database system is ready to accept connections
ripe-musician-59933
01/15/2021, 5:13 PMIts a AWS lightsail instance with 4gb ram and 2vcpuThat's not a lot for 2 Postgres instances, 2 web UIs, a scheduler, and the actual ELT workloads, but unless you're already seeing processes quit because of memory issues, I don't think that's the issue here
thousands-library-17999
01/15/2021, 5:13 PMripe-musician-59933
01/15/2021, 5:14 PMairflow-scheduler
can't connect with meltano-system-db:5432
even though it's on the same meltano
network (https://gitlab.com/meltano/files-docker-compose/-/blob/master/bundle/docker-compose.prod.yml#L63), that doesn't look like a Meltano-specific issuethousands-library-17999
01/15/2021, 5:15 PMripe-musician-59933
01/15/2021, 5:17 PMthousands-library-17999
01/15/2021, 5:19 PMripe-musician-59933
01/15/2021, 5:22 PMthousands-library-17999
01/15/2021, 6:02 PMripe-musician-59933
01/15/2021, 6:02 PMthousands-library-17999
01/15/2021, 11:02 PMripe-musician-59933
01/15/2021, 11:19 PM