You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@airflow.apache.org by Anton Hughes <an...@gmail.com> on 2020/02/01 05:29:06 UTC

Where does 'hostname' value come from?

Hello

I've recently starting working on a Airflow project, and have noticed that
all task instances claim to be running on a host (hostname) that is remote,
and not where they are actually running.

What makes this issue more confusing is, I've search through the code of
the project, and there is no reference to the hostname anywhere.

I'm running the Airflow project in a Docker container, and when I create a
shell into the running container, it doesnt have the hostname that is shown
in Airflow.

So, my question is, where does the value of the hostname come from?

Thanks for your help

Re: Where does 'hostname' value come from?

Posted by Anton Hughes <an...@gmail.com>.
Thanks Kamil

This lead me to the problem. I had a mistake in my local /etc/hosts file.

Thanks again

On Sat, 1 Feb 2020 at 18:41, Kamil Breguła <ka...@polidea.com>
wrote:

> Here is related code:
> https://github.com/apache/airflow/blob/151934c/airflow/utils/net.py#L33-L53
>
> https://github.com/apache/airflow/blob/151934cd83ec8a4b9d82d534c3abb190ea3e4f78/airflow/config_templates/default_airflow.cfg#L38-L43
>
> Best Regards,
> Kamil Breguła
>
> On Sat, Feb 1, 2020 at 6:29 AM Anton Hughes <an...@gmail.com>
> wrote:
> >
> > Hello
> >
> > I've recently starting working on a Airflow project, and have noticed
> that all task instances claim to be running on a host (hostname) that is
> remote, and not where they are actually running.
> >
> > What makes this issue more confusing is, I've search through the code of
> the project, and there is no reference to the hostname anywhere.
> >
> > I'm running the Airflow project in a Docker container, and when I create
> a shell into the running container, it doesnt have the hostname that is
> shown in Airflow.
> >
> > So, my question is, where does the value of the hostname come from?
> >
> > Thanks for your help
>

Re: Where does 'hostname' value come from?

Posted by Kamil Breguła <ka...@polidea.com>.
Here is related code:
https://github.com/apache/airflow/blob/151934c/airflow/utils/net.py#L33-L53
https://github.com/apache/airflow/blob/151934cd83ec8a4b9d82d534c3abb190ea3e4f78/airflow/config_templates/default_airflow.cfg#L38-L43

Best Regards,
Kamil Breguła

On Sat, Feb 1, 2020 at 6:29 AM Anton Hughes <an...@gmail.com> wrote:
>
> Hello
>
> I've recently starting working on a Airflow project, and have noticed that all task instances claim to be running on a host (hostname) that is remote, and not where they are actually running.
>
> What makes this issue more confusing is, I've search through the code of the project, and there is no reference to the hostname anywhere.
>
> I'm running the Airflow project in a Docker container, and when I create a shell into the running container, it doesnt have the hostname that is shown in Airflow.
>
> So, my question is, where does the value of the hostname come from?
>
> Thanks for your help