You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Meghsham-Jambhulkar (via GitHub)" <gi...@apache.org> on 2024/04/22 07:16:35 UTC

[I] Trouble to get logs using get_logs function [airflow-client-python]

Meghsham-Jambhulkar opened a new issue, #110:
URL: https://github.com/apache/airflow-client-python/issues/110

   I am 
   `
   from airflow_client.client.api import task_instance_api
   configuration = airflow_client.client.Configuration(
       host="http://localhost:8080/api/v1", username="********", password="********"
   )
       with airflow_client.client.ApiClient(configuration) as api_client:
           get_task_api_response = task_api_instance.get_log(dag_id, dag_run_id, task_id, task_try_number)
           print(get_task_api_response)
   `
   With using above code snipped i want to access logs of a particular DAG
   
   but in return i am getting following response
   
   `{'content': '[(\'\', "*** Log file does not exist: '
               '/opt/airflow/logs/dag_id=dataset_produces_1/run_id=scheduled__2024-04-20T00:00:00+00:00/task_id=producing_task_1/attempt=1.log\\n*** '
               'Fetching from: '
               'http://:8793/log/dag_id=dataset_produces_1/run_id=scheduled__2024-04-20T00:00:00+00:00/task_id=producing_task_1/attempt=1.log\\n*** '
               'Failed to fetch log file from worker. Request URL is missing an '
               '\'http://\' or \'https://\' protocol.\\n")]',
    'continuation_token': 'eyJlbmRfb2ZfbG9nIjp0cnVlfQ.vXFGNvOjpNDb4rW6n4IQQ2F649M'}`


-- 
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: commits-unsubscribe@airflow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Trouble to get logs using get_logs function [airflow-client-python]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk commented on issue #110:
URL: https://github.com/apache/airflow-client-python/issues/110#issuecomment-2068914652

   This is some problem with configuration of your logs - you either have your logging somewhat wrongly configured or  look at "hostname_callable" parameter to make sure you have the right IP adddress where your logs can be pulled from by your webserver.


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Trouble to get logs using get_logs function [airflow-client-python]

Posted by "potiuk (via GitHub)" <gi...@apache.org>.
potiuk closed issue #110: Trouble to get logs using get_logs function 
URL: https://github.com/apache/airflow-client-python/issues/110


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] Trouble to get logs using get_logs function [airflow-client-python]

Posted by "Meghsham-Jambhulkar (via GitHub)" <gi...@apache.org>.
Meghsham-Jambhulkar commented on issue #110:
URL: https://github.com/apache/airflow-client-python/issues/110#issuecomment-2068930760

   Thank you @potiuk  It was really Helpful


-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org