luis-fnogueira commented on issue #16313:
URL: https://github.com/apache/airflow/issues/16313#issuecomment-2059801670

   > @morningcloud I hit this issue after my Airflow helm update. I resolved it 
today without loosing any history data or whatever. The point is that you need 
to delete all of your existing airflow connections
   > 
   > 1. You will find them by looking at the PostgreSQL RDS
   > 
   > ```
   > airflow db shell
   > SELECT conn_id FROM connection;
   > ```
   > 
   > 2. Then iterate over them and delete, I used some bash for that
   > 
   > ```
   > #!/bin/bash
   > 
   > declare -a arr=("airflow_db" "aws_default" "azure_batch_default" 
"azure_container_instances_default" "azure_cosmos_default" 
"azure_data_explorer_default" "azure_data_lake_default" "cassandra_default" 
"databricks_default" "dingding_default" "druid_broker_default" 
"druid_ingest_default" "elasticsearch_default" "emr_default" "facebook_default" 
"fs_default" "google_cloud_default" "hive_cli_default" "hiveserver2_default" 
"http_default" "kubernetes_default" "kylin_default" "livy_default" 
"local_mysql" "metastore_default" "mongo_default" "mssql_default" 
"mysql_default" "opsgenie_default" "pig_cli_default" "pinot_admin_default" 
"pinot_broker_default" "postgres_default" "presto_default" "qubole_default" 
"redis_default" "segment_default" "sftp_default" "spark_default" 
"sqlite_default" "sqoop_default" "ssh_default" "tableau_default" 
"vertica_default" "wasb_default" "webhdfs_default" "yandexcloud_default" 
"azure_default" "drill_default")
   > 
   > for i in "${arr[@]}"
   > do
   >     airflow connections delete ${i}
   > done
   > ```
   > 
   > 3. In my case 4 connections where not deleted with bash and I had to 
connect to RDS directly and delete them from the table
   > 
   > ```
   > airflow db shell
   > SELECT * FROM connection;
   > DELETE FROM connection WHERE id = <id from above>;
   > ```
   > 
   > After that my connections list was empty and I could visit the GUI or 
check in CLI. I just added the databricks connection back `airflow connections 
add ..` as it was the only connection we were using.
   
   This has really helped me. Thanks a lot!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to