You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Task fails and cannot read logs. Invalid URL 'http://:8793/log/...': No host supplied #42136
I'm having an issue with an airflow instance where a task fails and I cannot read the logs.
Logs:
*** Could not read served logs: Invalid URL 'http://:8793/log/dag_id=my_dag/run_id=dynamic__apple_3_my_dag_cb353081__2024-09-09T14:41:22.596199__f73c5571719e4f35bf195ded40e5e25b/task_id=cleanup_temporary_directory/attempt=1.log': No host supplied
Event logs:
Executor CeleryExecutor(parallelism=128) reported that the task instance <TaskInstance: my_dag.cleanup_temporary_directory dynamic__apple_3_my_dag_cb353081__2024-09-09T14:41:22.596199__f73c5571719e4f35bf195ded40e5e25b [queued]> finished with state failed, but the task instance's state attribute is queued. Learn more: https://airflow.apache.org/docs/apache-airflow/stable/troubleshooting.html#task-state-changed-externally
Additionally I checked the logs directory for the dag_id/run_id and it's missing the respective task_id folder.
What you think should happen instead?
I should be able to access the logs.
How to reproduce
Not sure how to.
Operating System
Ubuntu 24.04 LTS
Versions of Apache Airflow Providers
No response
Deployment
Other Docker-based deployment
Deployment details
Deployed with docker-compose on Docker Swarm setup on 2 VMs.
Anything else?
Additionally I checked the logs directory for the dag_id/run_id and it's missing the respective task_id folder.
Reacted by Michèle, nikithapk, Pedro, JeanLouisLamezec, Evgeny Liskovets, quack39, Nextdrive-TomHuang, Bear_03, yeonguk kim, Hernan Di Tano and 32 more
I have the same issue with 2.10.0, using the CeleryExecutor.
It worked before I upgrading from version 2.9.0 to 2.10.0.
*** Could not read served logs: Invalid URL 'http://:8793/log/dag_id=service_stop/run_id=manual__2024-09-18T09:42:54+09:00/task_id=make_accountlist_task/attempt=1.log': No host supplied
eventlog
Executor CeleryExecutor(parallelism=6) reported that the task instance <TaskInstance: service_stop.make_accountlist_task manual__2024-09-18T09:42:54+09:00 [queued]> finished with state failed, but the task instance's state attribute is queued. Learn more: https://airflow.apache.org/docs/apache-airflow/stable/troubleshooting.html#task-state-changed-externally
Scheduler has a error log at the same hour as eventlog.
[2024-09-18T00:43:18.036+0000] {celery_executor.py:291} ERROR - Error sending Celery task: module 'redis' has no attribute 'client'
Celery Task ID: TaskInstanceKey(dag_id='service_stop', task_id='make_accountlist_task', run_id='manual__2024-09-18T09:42:54+09:00', try_number=1, map_index=-1)
Traceback (most recent call last):
File "/home/airflow/.local/lib/python3.12/site-packages/airflow/providers/celery/executors/celery_executor_utils.py", line 220, in send_task_to_executor
result = task_to_run.apply_async(args=[command], queue=queue)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/celery/app/task.py", line 594, in apply_async
return app.send_task(
^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/celery/app/base.py", line 797, in send_task
with self.producer_or_acquire(producer) as P:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/celery/app/base.py", line 932, in producer_or_acquire
producer, self.producer_pool.acquire, block=True,
^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/celery/app/base.py", line 1354, in producer_pool
return self.amqp.producer_pool
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/celery/app/amqp.py", line 591, in producer_pool
self.app.connection_for_write()]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/celery/app/base.py", line 829, in connection_for_write
return self._connection(url or self.conf.broker_write_url, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/celery/app/base.py", line 880, in _connection
return self.amqp.Connection(
^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/kombu/connection.py", line 201, in __init__
if not get_transport_cls(transport).can_parse_url:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/kombu/transport/__init__.py", line 91, in get_transport_cls
_transport_cache[transport] = resolve_transport(transport)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/kombu/transport/__init__.py", line 76, in resolve_transport
return symbol_by_name(transport)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/airflow/.local/lib/python3.12/site-packages/kombu/utils/imports.py", line 59, in symbol_by_name
module = imp(module_name, package=package, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.12/importlib/__init__.py", line 90, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "<frozen importlib._bootstrap>", line 1387, in _gcd_import
File "<frozen importlib._bootstrap>", line 1360, in _find_and_load
File "<frozen importlib._bootstrap>", line 1331, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 935, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 995, in exec_module
File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
File "/home/airflow/.local/lib/python3.12/site-packages/kombu/transport/redis.py", line 282, in <module>
class PrefixedRedisPipeline(GlobalKeyPrefixMixin, redis.client.Pipeline):
^^^^^^^^^^^^
AttributeError: module 'redis' has no attribute 'client'
Reacted by SALES, Michèle, Pedro, nikithapk, rahul bhandari and Dewayne Richardson
try to check that dags exist in worker, schedule and webserver. I deploy Airflow in K8S and get this error when putting my dags into scheduler(expecting that in will replicate into another pods), but when I check dags folder in worker it was empty
At this time (#42136 (comment)), I used the airflow db upgrade command , but I realized it has been deprecated.
I retried the upgrade using the airflow db migrate -n "2.10.2" command, and it works for me now.
I am using Helm chart version 1.18.0 with Airflow 3.0.2 on AWS EKS after an update from Helm chart version 1.15.0 with Airflow 2.9.3.
I cannot run DAGs because I get this error. I have tried above suggestions without any success.
Log message source details: sources=["Could not read served logs: Invalid URL 'http://:8793/log/dag_id=demo_DAG/run_id=scheduled__2026-01-26T00:00:00+00:00/task_id=meteo-data_fetching_in_airflow/attempt=1.log': No host supplied"]
If I exec into the airflow-worker pod and cat the logs, the run file exists but it is empty.
Hi @DipBaldha, could you elaborate a bit further? I cannot find the airflow.cfg file because it is being generated as I understand. There is only a airflow-default.cfg if I am not mistaken. Thank you for spending the time to comment.
I quickly deployed latest airflow 3.1.6 version using the same Helm chart and I still get this error:
Log message source details sources=["Could not read served logs: Invalid URL 'http://:8793/log/dag_id=demo_DAG/run_id=manual__2026-02-02T15:38:52+00:00/task_id=meteo-data_fetching_in_airflow/attempt=1.log': No host supplied"]
My DAG code part that fails is something like the following:
from airflow import DAG
from airflow.operators.python import PythonOperator
from airflow.operators.bash import BashOperator
from airflow.providers.ssh.operators.ssh import SSHOperator
from airflow.providers.ssh.hooks.ssh import SSHHook
from datetime import datetime,timedelta
sshHook_py = SSHHook(ssh_conn_id="jupyterlab", cmd_timeout=3600)
sshHook_r = SSHHook(ssh_conn_id="rstudio", cmd_timeout=3600)
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'email_on_failure': False,
'email_on_retry': False,
'retries': 0,
'retry_delay': timedelta(minutes=1)
}
dag = DAG(
dag_id='demo_DAG',
default_args=default_args,
# schedule_interval="@daily", # DEPRECATED in airflow 3.0.2
schedule="@daily",
start_date=datetime(2022, 1, 1),
catchup=False
)
t6 = BashOperator(
task_id='meteo-data_fetching_in_airflow',
bash_command='python /opt/airflow/dags/demo/code/meteo_data_fetching.py',
dag=dag
)
t6 >> [t1, t3]
...
My recent finding is that the task was failing with unexpected 302 responses because I am using oauth2-proxy in front off api-server (previously known as webserver).
Once I disabled the oauth2-proxy the task logs seem to work. I understand now that it might have to do either with the inability to manage task state properly and/or request proxying issues. My previous airflow setup still works with the oauth2-proxy so I am not sure what is to blame in my setup with the new API implementation yet.
Update: I am modifying the Helm chart to include extra ingress paths and a new service to route internal requests separately. I don't think this is helpful to anyone who does not use some kind of an auth layer/sidecar pattern. For now it seems to work for me.
Activity
andrew-stein-sp commentedon Sep 10, 2024
having the same issue with 2.10.1 in k8s, using the CeleryKubernetesExecutor.
Could this be related to the inheritance issue that was discussed in #41891?
pedro-cf commentedon Sep 10, 2024
Additionally I checked the logs directory for the dag_id/run_id and it's missing the respective task_id folder.
adriens commentedon Sep 16, 2024
Having the same issue on
2.10.0through apodman-composeadriens commentedon Sep 16, 2024
We have upgraded on
2.10.1like @andrew-stein-sp and we could reproduce the same behaviorsosystems-dev commentedon Sep 17, 2024
got the same behavior since upgrading from version 2.9.3 to 2.10.1.
We are using LocalExecutor
mn7k commentedon Sep 18, 2024
I have the same issue with 2.10.0, using the CeleryExecutor.
It worked before I upgrading from version 2.9.0 to 2.10.0.
eventlog
Scheduler has a error log at the same hour as eventlog.
damiah commentedon Sep 29, 2024
same issue for us when upgrading to 2.10.2
nikithapk commentedon Oct 3, 2024
We’re encountering the same issue as well.
adriens commentedon Oct 3, 2024
We have switched from Bitnami docker-compose to official Apache docker-compose and we could make it run successfuly 🤩
Dzhalolov commentedon Oct 7, 2024
try to check that dags exist in worker, schedule and webserver. I deploy Airflow in K8S and get this error when putting my dags into scheduler(expecting that in will replicate into another pods), but when I check dags folder in worker it was empty
mn7k commentedon Oct 15, 2024
At this time (#42136 (comment)), I used the
airflow db upgradecommand , but I realized it has been deprecated.I retried the upgrade using the
airflow db migrate -n "2.10.2"command, and it works for me now.https://airflow.apache.org/docs/apache-airflow/2.10.0/installation/upgrading.html#offline-sql-migration-scripts
79 remaining items
dmitrimahayana commentedon Dec 1, 2025
Hi All, I am still facing the same issue in 3.1.3.
Do we have any workaround in here?
miladalahyari commentedon Dec 1, 2025
thanks @andrew-stein-sp
for: ariflow version 3.1.3
I had same problem and i fix it with #42136 (comment)
in my airflow.cfg
define this for all airflow services like worker, api,scheduler,webserver,triggerer
AIRFLOW__API_AUTH__JWT_SECRET="{{ airflow_jwt_secret }}"
and add it as env
@dmitrimahayana
dmitrimahayana commentedon Dec 1, 2025
Thanks, it works @miladalahyari @andrew-stein-sp
nicolamarangoni commentedon Dec 15, 2025
Hello, this issue looks to be fixed.
Regards,
Nicola
opeida commentedon Dec 15, 2025
@nicolamarangoni, I am still facing the issue, and it appears the root cause is deeper than the wrong callables: #42136 (comment)
@ashb, can we proceed with the points you mentioned in #42136 (comment)?
Zub4ir commentedon Jan 16, 2026
Commenting here because the three callables helped me. This was Friday afternoon AirFlow server not sending data to our production system.
This was the error on my sample DAG.
Odd thing was rerunning the individual tasks was working.
Zub4ir commentedon Jan 16, 2026
Oracle Linux 10, Python 3.12, and AirFlow 3.0.2
sstamatiadis-dlt commentedon Jan 26, 2026
Hello, is there any working fix yet?
I am using
Helm chart version 1.18.0 with Airflow 3.0.2on AWS EKS after an update fromHelm chart version 1.15.0 with Airflow 2.9.3.I cannot run DAGs because I get this error. I have tried above suggestions without any success.
If I exec into the airflow-worker pod and cat the logs, the run file exists but it is empty.
My 3.0.2 config is as below:
The older version was 2.9.3:
hostname_callable = airflow.utils.net.get_host_ip_addressdid not fix my issuebase_urlor similar configuration seem to have not alleviate the problemDipBaldha commentedon Jan 28, 2026
Try to use airflow official airflow.cfg file. That worked for me !
sstamatiadis-dlt commentedon Feb 2, 2026
Hi @DipBaldha, could you elaborate a bit further? I cannot find the
airflow.cfgfile because it is being generated as I understand. There is only a airflow-default.cfg if I am not mistaken. Thank you for spending the time to comment.I quickly deployed latest airflow 3.1.6 version using the same Helm chart and I still get this error:
Log message source details sources=["Could not read served logs: Invalid URL 'http://:8793/log/dag_id=demo_DAG/run_id=manual__2026-02-02T15:38:52+00:00/task_id=meteo-data_fetching_in_airflow/attempt=1.log': No host supplied"]My DAG code part that fails is something like the following:
sstamatiadis-dlt commentedon Feb 3, 2026
My recent finding is that the task was failing with unexpected 302 responses because I am using oauth2-proxy in front off api-server (previously known as webserver).
Once I disabled the oauth2-proxy the task logs seem to work. I understand now that it might have to do either with the inability to manage task state properly and/or request proxying issues. My previous airflow setup still works with the oauth2-proxy so I am not sure what is to blame in my setup with the new API implementation yet.
Update: I am modifying the Helm chart to include extra ingress paths and a new service to route internal requests separately. I don't think this is helpful to anyone who does not use some kind of an auth layer/sidecar pattern. For now it seems to work for me.
xcRRRRt commentedon Feb 16, 2026
I just configure AIRFLOW__API__BASE_URL and it works!
phanikumv commentedon Mar 3, 2026
Are we good to close this issue? Based on the last couple of updates it seems to be working.