airflow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Howell (JIRA)" <>
Subject [jira] [Commented] (AIRFLOW-1061) Log URL in Task Instance list is incorrect when running locally
Date Tue, 19 Sep 2017 02:58:00 GMT


David Howell commented on AIRFLOW-1061:

I have this issue too. I've traced back through the code and can see 
This file `airflow/www/`
Has this method `def log_url_formatter() `
Gets the log_url from `airflow/`
Uses `def log_url`
Which has a call to get this: `BASE_URL = configuration.get('webserver', 'BASE_URL')`

This is sourced directly from the airflow.cfg file, the default values shown below:
# The base url of your website as airflow cannot guess what domain or
# cname you are using. This is used in automated emails that
# airflow sends to point links to the right web server
base_url = http://localhost:8080
There's another entry in the cfg file under [cli] for endpoint_url which also uses localhost,
but in that case it makes sense because I can't see the cli being used other than on the master

So a *quick ( and very nasty) workaround is to replace that base_url with the IP address,
& restart the webserver.* 
I have tested this and it works! Yay, typing over that url was getting very annoying.

However, as you've pointed out other links are able to determine the IP correctly, so this
should too.

For example:
`` : `def task_instance_link` uses the `url_for` method which is part of flask. That's
as far as I got. I assume flask is reading the core model hierarchy from somewhere and determining
urls that way. Without deep diving into flask, I'd assume this method `def log_url_formatter()`
should be able to use something like `url_for(airflow.taskinstance)` . I

> Log URL in Task Instance list is incorrect when running locally
> ---------------------------------------------------------------
>                 Key: AIRFLOW-1061
>                 URL:
>             Project: Apache Airflow
>          Issue Type: Bug
>    Affects Versions: Airflow 1.8
>            Reporter: Nicholas Duffy
> The Log URL in the Task Instance list links to BASE_URL + /admin/airflow/log (
while it should link to only /admin/airflow/log.
> The current behavior causes the link to be incorrect if you are running Airflow locally.

> Example:
> - Running Airflow on Vagrant on my local machine
> - URL is
> - Browse to task instance list at
> - Click the Log URL book glyphicon
> - The link takes you to
> - I expect the link to go to

This message was sent by Atlassian JIRA

View raw message