arjaydee
arjaydee

Reputation: 11

Airflow View Logs error "No host supplied" only if task fails otherwise logs are Visible

On Task failure state: * Log file does not exist: /home/polaris/.airflow/logs/etl_dag_gcp_walmart_stg/etl_items_pangaea/2020-06-17T13:02:17+00:00/2.log * Fetching from: http://:8793/log/etl_dag_gcp_walmart_stg/etl_items_pangaea/2020-06-17T13:02:17+00:00/2.log *** Failed to fetch log file from worker. Invalid URL u'http://:8793/log/etl_dag_gcp_walmart_stg/etl_items_pangaea/2020-06-17T13:02:17+00:00/2.log': No host supplied

On task success or task running state: Logs are Visible * Log file does not exist: /home/polaris/.airflow/logs/etl_dag_gcp_walmart_stg/etl_items_pangaea/2020-06-17T13:02:17+00:00/2.log * Fetching from: http://sib-stg-usgm-client.wmt-mtech-search-dp-sib-stg.us-central1.us.walmart.net:8793/log/etl_dag_gcp_walmart_stg/etl_items_pangaea/2020-06-17T13:02:17+00:00/2.log

[2020-06-17 13:51:41,776] {taskinstance.py:655} INFO - Dependencies all met for

any ideas?

Upvotes: 0

Views: 7278

Answers (2)

Yi Dong
Yi Dong

Reputation: 11

restart celery and fixed the problem

Upvotes: 1

Naag
Naag

Reputation: 7

A few things to try:

  1. Rerun (delete) the task, if possible, to see if logs show up This will clear/reset tasks and prompt them to run again
  2. Change the log_fetch_timeout_sec to something more than 5 seconds (default) This is the amount of time (in seconds) that the Webserver will wait for an initial handshake while fetching logs from other workers.
  3. Give your workers a little more power. If you're using Astronomer, you can do this in the Configure tab of the Astronomer UI.

Upvotes: 0

Related Questions