I want to make a connection from Airflow to Google Cloud. I have made a service account in Google Cloud, downloaded the JSON file, and saved the JSON file inside the docker.
I am following this https://cloud.google.com/composer/docs/how-to/managing/connections documentation, but it returns the following error:
HTTPSConnectionPool(host='oauth2.googleapis.com', port=443): Max retries exceeded with url: /token (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f765dfbeb10>: Failed to establish a new connection: [Errno 113] No route to host'))
Am I doing something wrong or is there an update on the documentation?
Nb:
You can create a connection to Google Cloud
from Airflow
webserver admin menu. In this menu you can pass the Service Account key file path.
In this picture, the keyfile Path
is /usr/local/airflow/dags/gcp.json
.
Beforehand you need to mount your key file as a volume in your Docker
container with the previous path.
You can also directly copy the key json content in the Airflow connection, in the keyfile Json
field:
You can check from these following links:
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.