[Puppet Users] Can't get puppetdb work with foreman/puppet

2015-10-12 Thread em
Hi,

I have a foreman/puppet installation (done with foreman-installer) running 
on ubuntu 14.
I was using it for a while already, with about 40 hosts, using the 
'role/profile' approach to classify the nodes.

Which means that I have only one role per node, and the role calls 
different profiles.
Many things are configured via yaml.

I want to add icinga/nagios module but I need storeconfigs for that. So, I 
installed puppetdb on another host, configured the following files on the 
puppet server:

routes.yaml:
---
master:
  facts:
terminus: puppetdb
cache: yaml

puppetdb.conf:
[main]
port = 8081
soft_write_failure = false
server = puppetdb.server

and added to puppet.conf:
storeconfigs   = true
thin_storeconifgs = false
storeconfigs_backend = puppetdb


After restarting apache and running puppet agent -t I got:
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Invalid relationship: Apt::Source[puppetlabs] { notify => 
Class[apt::update] }, because Class[apt::update] doesn't seem to be in the 
catalog
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

Doing a 'select * from catalogs;' on the puppetdb database returns an empty 
set.

Any ideas on what could be wrong?

thanks!

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/9d66b610-f966-4fe1-8ff3-dff644bda6c5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[Puppet Users] puppet + puppetdb: No Catalog received

2015-10-27 Thread em
Hi,

I have a running puppet installation (version 3.8.3)
I installed and configured a puppetdb node (2.3.8 with postgresql).
Configured puppet master to user the new puppetdb node.

When I run puppet agent from any of the nodes I get a 'Invalid 
relationship Class doesn't seem to be in the catalog'
When I run puppet node status I get:
root@puppet:/etc/puppet# puppet node status test.local
test.local
Currently active
No catalog received
Last facts: 2015-10-27T10:40:49.778Z

In the puppetdb logs I see '[replace facts]', but no '[replace catalog]' 
like mentioned in the documentation.

any idas?

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/215a44ca-79d7-4a4f-be29-ed3266e07bb8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet + puppetdb: No Catalog received

2015-10-27 Thread em
Hi Ken,

The actual error is:
# puppet agent -t
Info: Retrieving pluginfacts
Info: Retrieving plugin
Info: Loading facts
Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
Invalid relationship: Apt::Source[puppetlabs] { notify => 
Class[apt::update] }, because Class[apt::update] doesn't seem to be in the 
catalog
Warning: Not using cache on failed catalog
Error: Could not retrieve catalog; skipping run

This works fine if I don't use puppetdb (remove the routes.yaml and comment 
the storeconfig files:
#storeconfigs   = true
#thin_storeconifgs = false
#storeconfigs_backend = puppetdb



On Tuesday, October 27, 2015 at 12:35:11 PM UTC+1, Ken Barber wrote:
>
> > I have a running puppet installation (version 3.8.3) 
> > I installed and configured a puppetdb node (2.3.8 with postgresql). 
> > Configured puppet master to user the new puppetdb node. 
> > 
> > When I run puppet agent from any of the nodes I get a 'Invalid 
> > relationship Class doesn't seem to be in the catalog' 
>
> This is the error we should be focusing on. Can you post the full 
> error in context with the surrounding agent log? Can you double check 
> the relationship its pointing out in the error, and check for any 
> upper/lower case issues and ensure the name in the relationship is 
> 100% correct, I've seen this kind of thing before and sometimes its 
> down to a typo. Try removing the relationship and seeing if it solves 
> it at least for test purposes perhaps. 
>
> > When I run puppet node status I get: 
> > root@puppet:/etc/puppet# puppet node status test.local 
> > test.local 
> > Currently active 
> > No catalog received 
> > Last facts: 2015-10-27T10:40:49.778Z 
> > 
> > In the puppetdb logs I see '[replace facts]', but no '[replace catalog]' 
> > like mentioned in the documentation. 
>
> The first error above means the catalog does not compile correctly, so 
> no catalog is ever submitted to PuppetDB. 
>
> ken. 
>
> > 
> > any idas? 
> > 
> > -- 
> > You received this message because you are subscribed to the Google 
> Groups 
> > "Puppet Users" group. 
> > To unsubscribe from this group and stop receiving emails from it, send 
> an 
> > email to puppet-users...@googlegroups.com . 
> > To view this discussion on the web visit 
> > 
> https://groups.google.com/d/msgid/puppet-users/215a44ca-79d7-4a4f-be29-ed3266e07bb8%40googlegroups.com.
>  
>
> > For more options, visit https://groups.google.com/d/optout. 
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/6f28d274-a56f-4a47-ba3c-752f4a4ae066%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Puppet Users] puppet + puppetdb: No Catalog received

2015-10-27 Thread em
Sorry, I was missing one 'upper/lower case' Class.

I fixed all of them and now it's working.

thanks! :)

On Tuesday, October 27, 2015 at 1:43:03 PM UTC+1, em wrote:
>
> Hi Ken,
>
> The actual error is:
> # puppet agent -t
> Info: Retrieving pluginfacts
> Info: Retrieving plugin
> Info: Loading facts
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Invalid relationship: Apt::Source[puppetlabs] { notify => 
> Class[apt::update] }, because Class[apt::update] doesn't seem to be in the 
> catalog
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
>
> This works fine if I don't use puppetdb (remove the routes.yaml and 
> comment the storeconfig files:
> #storeconfigs   = true
> #thin_storeconifgs = false
> #storeconfigs_backend = puppetdb
>
>
>
> On Tuesday, October 27, 2015 at 12:35:11 PM UTC+1, Ken Barber wrote:
>>
>> > I have a running puppet installation (version 3.8.3) 
>> > I installed and configured a puppetdb node (2.3.8 with postgresql). 
>> > Configured puppet master to user the new puppetdb node. 
>> > 
>> > When I run puppet agent from any of the nodes I get a 'Invalid 
>> > relationship Class doesn't seem to be in the catalog' 
>>
>> This is the error we should be focusing on. Can you post the full 
>> error in context with the surrounding agent log? Can you double check 
>> the relationship its pointing out in the error, and check for any 
>> upper/lower case issues and ensure the name in the relationship is 
>> 100% correct, I've seen this kind of thing before and sometimes its 
>> down to a typo. Try removing the relationship and seeing if it solves 
>> it at least for test purposes perhaps. 
>>
>> > When I run puppet node status I get: 
>> > root@puppet:/etc/puppet# puppet node status test.local 
>> > test.local 
>> > Currently active 
>> > No catalog received 
>> > Last facts: 2015-10-27T10:40:49.778Z 
>> > 
>> > In the puppetdb logs I see '[replace facts]', but no '[replace 
>> catalog]' 
>> > like mentioned in the documentation. 
>>
>> The first error above means the catalog does not compile correctly, so 
>> no catalog is ever submitted to PuppetDB. 
>>
>> ken. 
>>
>> > 
>> > any idas? 
>> > 
>> > -- 
>> > You received this message because you are subscribed to the Google 
>> Groups 
>> > "Puppet Users" group. 
>> > To unsubscribe from this group and stop receiving emails from it, send 
>> an 
>> > email to puppet-users...@googlegroups.com. 
>> > To view this discussion on the web visit 
>> > 
>> https://groups.google.com/d/msgid/puppet-users/215a44ca-79d7-4a4f-be29-ed3266e07bb8%40googlegroups.com.
>>  
>>
>> > For more options, visit https://groups.google.com/d/optout. 
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to puppet-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/1a8e097a-0487-4671-8170-0c8664087360%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.