Error : Could not find default node or by name with 'xxxxx.domain.local, xxxxx.domain, xxxxx' on node xxxxx.domain.local

2,622 views
Skip to first unread message

Olivier Lemoine

unread,
Feb 1, 2016, 11:27:58 AM2/1/16
to Puppet Users
Hello,

I use Puppet for some weeks in mutli-environments mode (I have 4 environments : "developpement", "homologation", "production" and "dmz") and i still have the same problem when i want to switch node's environment.

Example :

I install and configure for the first time an agent.

"/etc/puppet/puppet.conf" on "stestsles03" :
[main]
logdir
=/var/log/puppet
vardir
=/var/lib/puppet
ssldir
=/var/lib/puppet/ssl
rundir
=/var/run/puppet
factpath
=$vardir/lib/facter
server
=mypuppetmaster.domain.local
environment
=developpement


I execute "puppet agent--test" on my node and i go to the puppetmaster to sign SSL certificat.
I create in the manifests file my new node ("/etc/puppet/environment/developpement/manifests/site.pp":

node 'stestsles03.domain.local' {
      include repos
      include client_vtom
}

and i return on my new node to execute "puppet agent --test"

Result : OK

After, i want to change the environment of my new node to "homologation", so i change it in "/etc/puppet/puppet.conf" on stestsles03.local.

And when i run again "puppet agent --test" i have this error :

stestsles03:~ # puppet agent --test
err
: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find default node or by name with 'stestsles03.domain.local, stestsles03.domain, stestsles03' on node stestsles03.domain.local
warning
: Not using cache on failed catalog
err
: Could not retrieve catalog; skipping run

I have testing this :

- Cleaning node on the puppet master : "puppet cert --clean stestsles03.domain.local", delete ssl directory in "/var/lib/puppet" and execute agent to create new ssl certificate (I cut/copy my node decalaration (manifests) from developpement environnement to homologation environnement)

What is wrong ?

Sorry for bad english :-)

Best regards,

Olivier





Frederik Bjerggaard Nielsen

unread,
Feb 2, 2016, 6:40:29 AM2/2/16
to Puppet Users
You need to move/create/copy the manifest file to the correct environment folder when you move a node between environments which it seems that you haven't done

Regards,
Frederik

jcbollinger

unread,
Feb 2, 2016, 9:44:24 AM2/2/16
to Puppet Users

On Monday, February 1, 2016 at 10:27:58 AM UTC-6, Olivier Lemoine wrote:
 
After, i want to change the environment of my new node to "homologation", so i change it in "/etc/puppet/puppet.conf" on stestsles03.local.

And when i run again "puppet agent --test" i have this error :

stestsles03:~ # puppet agent --test
err
: Could not retrieve catalog from remote server: Error 400 on SERVER: Could not find default node or by name with 'stestsles03.domain.local, stestsles03.domain, stestsles03' on node stestsles03.domain.local
warning
: Not using cache on failed catalog
err
: Could not retrieve catalog; skipping run



The master is complaining that it cannot match any node block to the node's identifier (which by default is its hostname, apparently "stestsles03.domain.local").  It tries the whole hostname, and it tries each nonempty substring it can construct by removing one name segment, and finally it tries to fall back to a default node block; none of these is present in the new environment.


I have testing this :

- Cleaning node on the puppet master : "puppet cert --clean stestsles03.domain.local", delete ssl directory in "/var/lib/puppet" and execute agent to create new ssl certificate (I cut/copy my node decalaration (manifests) from developpement environnement to homologation environnement)



You should not need to manipulate the node's certificate to move it between environments, but if the new environment contains any node blocks at all then it must be able to match the node to at least one of them.  Perhaps the thing to do is to copy the appropriate node block into a manifest somewhere in the new environment's site manifest directory, but if you are intentionally avoiding default node blocks then it is by no means clear that whatever node declaration matches your node in its original environment would still be appropriate for it in its new environment.


John

Reply all
Reply to author
Forward
0 new messages