Il 15 settembre 2026, tutti gli ambienti Cloud Composer 1 e Cloud Composer 2 versione 2.0.x raggiungeranno la fine del ciclo di vita pianificata e non potrai più utilizzarli. Ti consigliamo di pianificare la migrazione a Cloud Composer 3.
Questa pagina fornisce passaggi e informazioni per la risoluzione dei problemi comuni del server web Airflow.
Il server web di Airflow è un componente di Airflow che fornisce un'interfaccia utente
per la gestione di DAG e attività di Airflow. Questa pagina descrive i passaggi per la risoluzione dei problemi
relativi all'accesso al server web Airflow del tuo ambiente o
agli avvisi relativi al server web visibili nei log di Airflow.
Impossibile accedere alla UI di Airflow quando i controlli di accesso alla rete sono abilitati
Sintomo: dopo aver configurato i controlli di accesso al server web, non è possibile
accedere alla UI di Airflow. In genere, il codice di errore visualizzato in questa situazione è
403.
Informazioni sul problema: Cloud Composer supporta i
controlli dell'accesso di rete al server web,
che ti consentono di specificare gli intervalli IP autorizzati a connettersi al server web.
I problemi di accesso all'interfaccia utente di Airflow in genere comportano l'errore 403. Per verificare se l'errore
è correlato ai controlli dell'accesso di rete al server web:
Nell'elenco degli ambienti, fai clic sul nome del tuo ambiente.
Viene visualizzata la pagina Dettagli ambiente.
Vai alla scheda Configurazione ambiente.
Controlla se l'elemento Controllo dell'accesso al server web è impostato su
Tutti gli indirizzi IP hanno accesso (impostazione predefinita).
Se è configurato un valore diverso da Tutti gli indirizzi IP hanno accesso (impostazione predefinita), il controllo dell'accesso di rete è abilitato e la visibilità della UI di Airflow è limitata agli intervalli di indirizzi IPv4 e IPv6 forniti. In questo caso, il problema potrebbe essere correlato ai controlli di accesso alla rete del server web.
Nella maggior parte dei casi, la causa del problema è la mancata corrispondenza tra l'IP previsto
che hai specificato e l'IP effettivamente risolto per connettersi all'interfaccia utente
di Airflow. Per risolvere il problema:
Nell'elenco degli ambienti, fai clic sul nome del tuo ambiente.
Viene visualizzata la pagina Dettagli ambiente.
Vai alla scheda Configurazione ambiente.
Individua l'elemento Controllo dell'accesso al server web e fai clic su Modifica.
Nella finestra di dialogo Controllo dell'accesso di rete al server web, seleziona
Consenti l'accesso da tutti gli indirizzi IP.
Accedi più volte all'interfaccia utente di Airflow e verifica che funzioni senza problemi:
Se non riscontri problemi, vai al passaggio successivo.
Se riscontri un problema a questo punto, significa che potrebbe
essere correlato alla configurazione delle autorizzazioni IAM. Per
maggiori informazioni sulle autorizzazioni IAM per
Cloud Composer, consulta Controllo dell'accesso.
Nella finestra di dialogo Controllo dell'accesso di rete al server web, seleziona
Consenti l'accesso solo da indirizzi IP specifici.
Aggiungi l'intervallo IP 0.0.0.0/0, quindi accedi più volte all'interfaccia utente di Airflow e
verifica che funzioni senza problemi:
Se non riscontri problemi, l'IP con cui ti connetti
è un indirizzo IPv4.
Se a questo punto riscontri un problema, significa che l'IP a cui ti connetti è un indirizzo IPv6.
Elimina l'intervallo IP 0.0.0.0/0 e aggiungi l'intervallo IP ::/0.
Se non riscontri problemi, l'IP con cui ti connetti
è un indirizzo IPv6.
Se a questo punto si verifica un problema, significa che l'IP con cui ti connetti è un indirizzo IPv4.
Ora hai determinato se l'indirizzo risolto è IPv4 o IPv6.
A seconda del tipo di indirizzo, restringi gli intervalli ::/0 o 0.0.0.0/0
a quelli più specifici per verificare l'intervallo più ampio quando l'accesso smette
di funzionare:
Puoi iniziare con la subnet mask ampia (ad esempio 192.0.2.0/8) che
include l'indirizzo che ritieni sia il tuo indirizzo IP.
Per determinare il tuo indirizzo IP, puoi utilizzare un servizio di terze parti che
fornisce il tuo indirizzo IP esterno quando visiti la sua pagina. Puoi
cercare questi servizi con la query di ricerca "qual è il mio indirizzo IP").
I valori di configurazione non vengono visualizzati nella pagina di configurazione
Alcuni parametri di configurazione di Airflow sono nascosti nella
pagina di configurazione per impedire l'accesso a informazioni potenzialmente sensibili. Ad esempio, le credenziali per accedere al database Airflow non vengono visualizzate.
Per visualizzare i campi nascosti, esegui l'override della seguente opzione di configurazione di Airflow. Ti consigliamo di ripristinare le modifiche dopo aver ottenuto i valori richiesti.
Sezione
Chiave
Valore
Note
webserver
expose_config
True
Il valore predefinito è non-sensitive-only. Imposta questo parametro su False per nascondere
tutti i parametri di configurazione.
Il DAG arresta in modo anomalo il server web Airflow o fa sì che restituisca un errore "Timeout gateway 502"
Gli errori del server web possono verificarsi per diversi motivi. Controlla
i log airflow-webserver in
Cloud Logging per determinare la causa dell'errore
502 gateway timeout.
[[["Facile da capire","easyToUnderstand","thumb-up"],["Il problema è stato risolto","solvedMyProblem","thumb-up"],["Altra","otherUp","thumb-up"]],[["Difficile da capire","hardToUnderstand","thumb-down"],["Informazioni o codice di esempio errati","incorrectInformationOrSampleCode","thumb-down"],["Mancano le informazioni o gli esempi di cui ho bisogno","missingTheInformationSamplesINeed","thumb-down"],["Problema di traduzione","translationIssue","thumb-down"],["Altra","otherDown","thumb-down"]],["Ultimo aggiornamento 2025-09-03 UTC."],[[["\u003cp\u003eThis document provides troubleshooting steps for common issues related to the Airflow web server, a key component for managing Airflow DAGs and tasks within Cloud Composer environments.\u003c/p\u003e\n"],["\u003cp\u003eA common problem is the inability to access the Airflow UI, often indicated by a 403 error, which typically stems from misconfigurations in web server network access controls.\u003c/p\u003e\n"],["\u003cp\u003eCloud Composer supports the ability to limit Airflow UI access to specific IP ranges, and problems may arise due to mismatches between the intended IP and the actual resolved IP address.\u003c/p\u003e\n"],["\u003cp\u003eTo diagnose IP related issues, users can temporarily allow access from all IP addresses, and then add either \u003ccode\u003e0.0.0.0/0\u003c/code\u003e or \u003ccode\u003e::/0\u003c/code\u003e IP ranges to determine if the connecting IP is IPv4 or IPv6.\u003c/p\u003e\n"],["\u003cp\u003eUsers can utilize a third-party service to determine the connecting IP address to allow them to narrow down the subnet masks for access, allowing for a more secure and controlled access.\u003c/p\u003e\n"]]],[],null,["\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\n[Cloud Composer 3](/composer/docs/composer-3/troubleshooting-web-server \"View this page for Cloud Composer 3\") \\| **Cloud Composer 2** \\| [Cloud Composer 1](/composer/docs/composer-1/troubleshooting-web-server \"View this page for Cloud Composer 1\")\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\n\u003cbr /\u003e\n\nThis page provides troubleshooting steps and information for common Airflow\nweb server issues.\n\nThe Airflow web server is an Airflow component that provides a user interface\nfor managing Airflow DAGs and tasks. This page describes troubleshooting steps\nfor various issues with accessing the Airflow web server of your environment or\nfor web server-related warnings visible in Airflow logs.\n\nCan't access Airflow UI when network access controls are enabled\n\n**Symptom**: After web server access controls are configured, it's not possible\nto access Airflow UI. Usually, the error code displayed in this situation is\n403.\n\n**Information about the issue** : Cloud Composer supports\n[web server network access controls](/composer/docs/composer-2/access-airflow-web-interface#network-access-controls),\nwhich lets you specify IP ranges that are allowed to connect to the web server.\n\nProblems with accessing Airflow UI usually result in error 403. To check if the\nerror is related to web server network access controls, do the following:\n\n1. In the list of environments, click the name of your environment. The **Environment details** page opens.\n2. Go to the **Environment configuration** tab.\n3. Check if the **Web server access control** item is set to **All IP addresses have access (default)**.\n4. If a value different than **All IP addresses have access (default)** is configured, then network access control is enabled and the visibility of the Airflow UI is limited to the provided IPv4 and IPv6 address ranges. In this case, the problem might be related to web server network access controls.\n\nIn most cases, the cause of the issue is the mismatch between the intended IP\nthat you specified and the IP that is actually resolved to connect to the\nAirflow UI. To troubleshoot the problem, do the following:\n\n1. In the list of environments, click the name of your environment.\n The **Environment details** page opens.\n\n2. Go to the **Environment configuration** tab.\n\n3. Find the **Web server access control** item and click **Edit**.\n\n4. In the **Web server network access control** dialog, select\n **Allow access from all IP addresses**.\n\n5. Access the Airflow UI multiple times and verify that it works without any\n issues:\n\n - If you don't experience problems, continue to the next step.\n\n - If you experience a problem at this point, it means that the issue might\n be related to your IAM permissions configuration. For\n more information about the IAM permissions for\n Cloud Composer, see [Access control](/composer/docs/composer-2/access-control).\n\n6. In the **Web server network access control** dialog, select\n **Allow access only from specific IP addresses**.\n\n7. Add the `0.0.0.0/0` IP range, then access the Airflow UI multiple times and\n verify that it works without issues:\n\n - If you don't experience problems, then the IP that you're connecting\n with is an IPv4 address.\n\n - If you experience a problem at this point, it means the IP you're\n connecting with is an IPv6 address.\n\n8. Delete the `0.0.0.0/0` IP range, and add the `::/0` IP range.\n\n - If you don't experience problems, then the IP that you're connecting\n with is an IPv6 address.\n\n - If you experience a problem at this point, it means the IP you're\n connecting with is an IPv4 address.\n\n9. Now you determined if your resolved address is IPv4 or IPv6.\n\n10. Depending on the address type, narrow down the `::/0` or `0.0.0.0/0` ranges\n to more specific ones, to verify the broadest range when the access stops\n working:\n\n - You can start with the wide subnet mask (such as `192.0.2.0/8`) that\n includes the address that you assume to be your IP address.\n\n - To determine your IP address, you can use a third-party service that\n provides your external IP address when you visit its page. You can\n search for such services by the \"what is my IP address\" search query).\n\nConfiguration values aren't displayed on the configuration page\n\nSome Airflow configuration parameters of Airflow are hidden on the\nconfiguration page to prevent access to potentially sensitive information. For\nexample, credentials to access the Airflow database are not displayed.\n| **Warning:** If you configure Airflow to display these parameters, then\n| **any Airflow user with `Admin` and `Op` permission will be able to access this\n| information.**\n| By default, Airflow assigns the `Op` role to new Airflow users.\n|\n| To prevent Airflow users with the `Op` role from accessing the configuration page:\n|\n| 1. Go to the **Security** \\\u003e **List Roles** configuration page in the Airflow UI.\n| 2. Revoke the **can read Configurations** and **menu access on Configurations** permissions from the `Op` role.\n\nTo display hidden fields, [override](/composer/docs/composer-2/override-airflow-configurations) the following Airflow\nconfiguration option. We recommend to revert the changes after you obtain the\nrequired values.\n\n| Section | Key | Value | Notes |\n|-------------|-----------------|--------|-------------------------------------------------------------------------------------------------|\n| `webserver` | `expose_config` | `True` | The default value is `non-sensitive-only`. Set to `False` to hide all configuration parameters. |\n\nDAG crashes the Airflow web server or causes it to return a '502 gateway timeout' error\n\nWeb server failures can occur for several different reasons. Check\nthe **airflow-webserver** logs in\n[Cloud Logging](/composer/docs/composer-2/view-logs#streaming) to determine the cause of the\n`502 gateway timeout` error.\n\nWhat's next\n\n- [Access Airflow UI](/composer/docs/composer-2/access-airflow-web-interface)\n- [Access control](/composer/docs/composer-2/access-control)"]]