Ask Your Question
0

Could not retrieve fact='ipaddress'

asked 2014-11-24 10:29:39 -0500

ohadb gravatar image

HI,

I recently had to reinstall my lab environment of puppet, and for some reason I get this message on my puppet nodes when running - "facter ipaddress"

I'm kinda new to puppet and I have no idea why that happen, last time I installed exactly the same and it didn't happen.

Here's is the full error message:

"Could not retrieve fact='ipaddress', resolution='<anonymous>': Could not execute 'host puppet-node1': command not found"

Thanks!

edit retag flag offensive close merge delete

Comments

Please provide links to the relevant code that generates this error. It looks like you might have a problem with the PATH variable in the environment that Puppet executes in.

GregLarkin gravatar imageGregLarkin ( 2014-11-25 00:20:20 -0500 )edit

Solved it, see below comment :)

ohadb gravatar imageohadb ( 2014-11-25 03:01:03 -0500 )edit

2 answers

Sort by ยป oldest newest most voted
1

answered 2014-11-25 03:00:01 -0500

ohadb gravatar image

Well I solved it.

After looking at the ipaddress.rb which facter ipaddress calls to, on linux systems it tries to use ifconfig to get the ipaddress, after it does not succeed it will try to the host command.

on CentOS 7 ifconfig isn't available by default, so after installing net-tools, facter ipaddress works!

edit flag offensive delete link more

Comments

Good news, and I found that this has been fixed in Github: https://github.com/puppetlabs/facter/pull/730 A future release of Facter should include the fix.

GregLarkin gravatar imageGregLarkin ( 2014-11-25 16:34:18 -0500 )edit
0

answered 2016-02-22 02:06:37 -0500

FranzCC gravatar image

Hi,
i found this post and wanted to report a problem with the ipaddress fact when there are only ipv6 addresses.
I will file a bug report.
Also the error message is wrong.
Warning: Could not retrieve fact ipaddress

 Facter: custom fact "ipaddress" was not found.

ipaddress is a standard fact and no custom fact.

Rgds. Franz

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

Asked: 2014-11-24 10:29:39 -0500

Seen: 1,190 times

Last updated: Feb 22 '16