vin-c-ent opened a new pull request, #67785:
URL: https://github.com/apache/airflow/pull/67785

   The key of the port that api-server used to retrieve triggerer`s log 
(triggerer_log_server_port) is not align with the one defined in 
[configurations-ref](https://airflow.apache.org/docs/apache-airflow/stable/configurations-ref.html#trigger-log-server-port)
 ((trigger_log_server_port)):
   
   ```
       def _get_log_retrieval_url(
           self,
           ti: TaskInstance | TaskInstanceHistory,
           log_relative_path: str,
           log_type: LogType | None = None,
       ) -> tuple[str | None, str | None]:
           """Given TI, generate URL with which to fetch logs from service log 
server."""
           if log_type == LogType.TRIGGER:
               if not ti.triggerer_job:
                   raise RuntimeError("Could not build triggerer log URL; no 
triggerer job.")
               config_key = "trigger_log_server_port"
               config_default = 8794
               hostname = ti.triggerer_job.hostname
               log_relative_path = self.add_triggerer_suffix(log_relative_path, 
job_id=ti.triggerer_job.id)
           else:
               hostname = ti.hostname
               config_key = "worker_log_server_port"
               config_default = 8793
   
           if not hostname:
               return None, None
   
           return (
               urljoin(
                   f"http://{hostname}:{conf.get('logging', config_key, 
fallback=config_default)}/log/",
                   log_relative_path,
               ),
               log_relative_path,
           )
   ```
   
   So api-server will always fetch triggerer`s log with the default port - 8794.
   When triggerer is not using the default server port (8794), api-server will 
hit connection refused error
   
   **Fix:**
   - Change the key from triggerer_log_server_port to trigger_log_server_port 
to make it align.
   
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] No
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to