You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@nifi.apache.org by "Jens M. Kofoed" <jm...@gmail.com> on 2021/09/09 10:52:38 UTC

${hostname(true)} returns localhost

Hi

I'm using nifi 1.14.0 and have a single node cluster and a 3 node cluster.
At the single node cluster the ${hostname(true)} returns the FQDN but at my
3 node cluster it returns "localhost".

Any ideas why???

Kind regards
Jens M. Kofoed

Re: ${hostname(true)} returns localhost

Posted by "Jens M. Kofoed" <jm...@gmail.com>.
Thanks, I will check for reboot 

Regards 
Jens

> Den 9. sep. 2021 kl. 15.27 skrev Shawn Weeks <sw...@weeksconsulting.us>:
> 
> Adding the hostname to /etc/hosts with 127.0.0.1 as the IP is common in cloud-init VM images so double check that it’s not getting rewritten on reboot if that applies to you.
>  
> Thanks
> Shawn
>  
> From: Jens M. Kofoed <jm...@gmail.com> 
> Sent: Thursday, September 9, 2021 8:25 AM
> To: users@nifi.apache.org
> Subject: Re: ${hostname(true)} returns localhost
>  
> Thanks Shawn
>  
> Some how the hostname was added to the /etc/hosts file as 127.0.0.1
> It is now deleted and it works fine. 
>  
> Kind regards 
> Jens 
> 
> Den 9. sep. 2021 kl. 13.41 skrev Shawn Weeks <sw...@weeksconsulting.us>:
> 
> Do you have nifi.cluster.node.address set to the hostname? I think that will bypass the issue. The actual issue has to do with how the hostname is auto detected, I think. Some things to check are that you have an appropriate entry in /etc/hosts for your hostname pointing back to it’s IP and that you don’t have an entry for the hostname pointing at 127.0.0.1.
>  
> Thanks
> Shawn
>  
> From: Jens M. Kofoed <jm...@gmail.com> 
> Sent: Thursday, September 9, 2021 5:53 AM
> To: users@nifi.apache.org
> Subject: ${hostname(true)} returns localhost
>  
> Hi
>  
> I'm using nifi 1.14.0 and have a single node cluster and a 3 node cluster. At the single node cluster the ${hostname(true)} returns the FQDN but at my 3 node cluster it returns "localhost".
>  
> Any ideas why???
>  
> Kind regards
> Jens M. Kofoed

RE: ${hostname(true)} returns localhost

Posted by Shawn Weeks <sw...@weeksconsulting.us>.
Adding the hostname to /etc/hosts with 127.0.0.1 as the IP is common in cloud-init VM images so double check that it’s not getting rewritten on reboot if that applies to you.

Thanks
Shawn

From: Jens M. Kofoed <jm...@gmail.com>
Sent: Thursday, September 9, 2021 8:25 AM
To: users@nifi.apache.org
Subject: Re: ${hostname(true)} returns localhost

Thanks Shawn

Some how the hostname was added to the /etc/hosts file as 127.0.0.1
It is now deleted and it works fine.

Kind regards
Jens

Den 9. sep. 2021 kl. 13.41 skrev Shawn Weeks <sw...@weeksconsulting.us>>:
Do you have nifi.cluster.node.address set to the hostname? I think that will bypass the issue. The actual issue has to do with how the hostname is auto detected, I think. Some things to check are that you have an appropriate entry in /etc/hosts for your hostname pointing back to it’s IP and that you don’t have an entry for the hostname pointing at 127.0.0.1.

Thanks
Shawn

From: Jens M. Kofoed <jm...@gmail.com>>
Sent: Thursday, September 9, 2021 5:53 AM
To: users@nifi.apache.org<ma...@nifi.apache.org>
Subject: ${hostname(true)} returns localhost

Hi

I'm using nifi 1.14.0 and have a single node cluster and a 3 node cluster. At the single node cluster the ${hostname(true)} returns the FQDN but at my 3 node cluster it returns "localhost".

Any ideas why???

Kind regards
Jens M. Kofoed

Re: ${hostname(true)} returns localhost

Posted by "Jens M. Kofoed" <jm...@gmail.com>.
Thanks Shawn

Some how the hostname was added to the /etc/hosts file as 127.0.0.1
It is now deleted and it works fine. 

Kind regards 
Jens 

> Den 9. sep. 2021 kl. 13.41 skrev Shawn Weeks <sw...@weeksconsulting.us>:
> 
> Do you have nifi.cluster.node.address set to the hostname? I think that will bypass the issue. The actual issue has to do with how the hostname is auto detected, I think. Some things to check are that you have an appropriate entry in /etc/hosts for your hostname pointing back to it’s IP and that you don’t have an entry for the hostname pointing at 127.0.0.1.
>  
> Thanks
> Shawn
>  
> From: Jens M. Kofoed <jm...@gmail.com> 
> Sent: Thursday, September 9, 2021 5:53 AM
> To: users@nifi.apache.org
> Subject: ${hostname(true)} returns localhost
>  
> Hi
>  
> I'm using nifi 1.14.0 and have a single node cluster and a 3 node cluster. At the single node cluster the ${hostname(true)} returns the FQDN but at my 3 node cluster it returns "localhost".
>  
> Any ideas why???
>  
> Kind regards
> Jens M. Kofoed

RE: ${hostname(true)} returns localhost

Posted by Shawn Weeks <sw...@weeksconsulting.us>.
Do you have nifi.cluster.node.address set to the hostname? I think that will bypass the issue. The actual issue has to do with how the hostname is auto detected, I think. Some things to check are that you have an appropriate entry in /etc/hosts for your hostname pointing back to it’s IP and that you don’t have an entry for the hostname pointing at 127.0.0.1.

Thanks
Shawn

From: Jens M. Kofoed <jm...@gmail.com>
Sent: Thursday, September 9, 2021 5:53 AM
To: users@nifi.apache.org
Subject: ${hostname(true)} returns localhost

Hi

I'm using nifi 1.14.0 and have a single node cluster and a 3 node cluster. At the single node cluster the ${hostname(true)} returns the FQDN but at my 3 node cluster it returns "localhost".

Any ideas why???

Kind regards
Jens M. Kofoed