Anil, I ran into this problem as well. Here's the solution:

puppetdb binds to learn.localdomain at startup for the https service, as 
you can see in /etc/puppetlabs/puppetdb/conf.d/jetty.ini.

The problem you have is probably the same as the one I had. I edited 
/etc/hosts to move learn.localdomain to the assigned IP address in place of 
127.0.0.1, but did not restart pe-puppetdb. So the IP binding didn't 
change, and it only answered on localhost.

Do this after editing /etc/hosts: /etc/init.d/pe-puppetdb restart

Best regards,
Mojo

On Thursday, December 5, 2013 1:23:07 PM UTC-8, anil maddipatla wrote:
>
> I was going over a related post in puppet developers (unfortunately seems 
> to wrong place for my questions )and my questions are pasted on the top of 
> the chain.
>
> Hi Chris,
>               I exactly have the same problem.
>
>
>
> ###########################################################################################3
> [root@anilAgent ~]# puppet agent --test
> Info: Caching certificate for agent1.localdomain
> Info: Caching certificate_revocation_list for ca
> Warning: Unable to fetch my node definition, but the agent run will 
> continue:
> Warning: Error 400 on SERVER: Could not retrieve facts for 
> agent1.localdomain: Failed to find facts from PuppetDB at 
> learn.localdomain:8081: Connection refused - connect(2)
> Info: Retrieving plugin
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/postgresql/lib/facter/postgres_default_version.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/concat/lib/facter/concat_basedir.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/auth_conf/lib/facter/custom_auth_conf.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/stdlib/lib/facter/puppet_vardir.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/stdlib/lib/facter/facter_dot_d.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/stdlib/lib/facter/pe_version.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/stdlib/lib/facter/root_home.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/firewall/lib/facter/ip6tables_version.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/firewall/lib/facter/iptables_persistent_version.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/firewall/lib/facter/iptables_version.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/pe_puppetdb/lib/facter/puppetdb_server_status.rb
> Info: Loading facts in 
> /opt/puppet/share/puppet/modules/pe_common/lib/facter/windows.rb
> Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/windows.rb
> Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/puppet_vardir.rb
> Info: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/postgres_default_version.rb
> Info: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/ip6tables_version.rb
> Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/facter_dot_d.rb
> Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/pe_version.rb
> Info: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/iptables_persistent_version.rb
> Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/root_home.rb
> Info: Loading facts in /var/opt/lib/pe-puppet/lib/facter/concat_basedir.rb
> Info: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/custom_auth_conf.rb
> Info: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/puppetdb_server_status.rb
> Info: Loading facts in 
> /var/opt/lib/pe-puppet/lib/facter/iptables_version.rb
> Error: Could not retrieve catalog from remote server: Error 400 on SERVER: 
> Failed to submit 'replace facts' command for agent1.localdomain to PuppetDB 
> at learn.localdomain:8081: Connection refused - connect(2)
> Warning: Not using cache on failed catalog
> Error: Could not retrieve catalog; skipping run
>
> #################################################################################################
>
>
>
>  I have downloaded the learn puppet vm and have 2 instances of it running 
> adn from 2 days struggling to get both behave as master and agent.
>
> In my case 
>
> #################################################
> [root@learn manifests]# service pe-puppetdb status
> pe-puppetdb (pid  1110) is running...
>
>
> [root@learn manifests]# telnet localhost 8081
> Trying 127.0.0.1...
> Connected to localhost.
>
> ##########################################################
>
> But when i try telnet using ip it doesnt work.I am sorry i am not a linux 
> guy (basically trying to find my head around puppet) .
>
> Can you please let me know a solution or a way to move forward.
>
> Regards
> anil
>
> On Wednesday, July 10, 2013 8:07:57 PM UTC+5:30, Chris Price wrote:
>>
>> It's also possible that PuppetDB is not running due to the postgres 
>> error.  On the PuppetDB machine, you can run these to find out:
>>
>>     service pe-puppetdb status
>>     telnet localhost 8081
>>
>> PuppetDB logs can be found in /var/log/pe-puppetdb/puppetdb.log (I 
>> believe).  If there is an error at the end of that about not being able to 
>> connect to postgres, then that's the issue.
>>
>>
>> On Wed, Jul 10, 2013 at 7:05 AM, Joseph Mwesigwa Bbaale <
>> [email protected]> wrote:
>>
>>> Hi Chris,
>>>
>>> Thanks for the reply.
>>>
>>> Please bare with me a little while... I will move to the suggested group.
>>>
>>> I have been grappling with the 8081 port issue...
>>>
>>> telnet produces this:
>>>
>>> connect to address 192.168.60.130: Connection refused
>>>
>>> I used something like this: iptables -A INPUT -p tcp --dport 8081 -j 
>>> ACCEPT
>>>
>>> but for some reason it seems it is not effective yet - maybe doing 
>>> something wrong.
>>>
>>>
>>> On Wednesday, 10 July 2013 16:34:32 UTC+3, Chris Price wrote:
>>>
>>>> Hi Joseph,
>>>>
>>>> Based on this line:
>>>>
>>>>     SERVER: Failed to submit 'replace facts' command for 
>>>> pptconsole.ca.local to PuppetDB at pptconsole.ca.local:8081: No route to 
>>>> host - connect(2) 
>>>>
>>>> It sounds as though you may have a DNS issue.  If you log in to your 
>>>> puppet master VM, are you able to ping 'pptconsole.ca.local' from there? 
>>>>  You might also try 'telnet pptconsole.ca.local 8081' to make sure that 
>>>> the 
>>>> firewall setup you mention has taken effect.
>>>>
>>>> The postgres error may be a separate issue, though.  Since you are 
>>>> seeing this:
>>>>
>>>>     Could not start Service[postgresqld]: Execution of '/sbin/service 
>>>> pe-postgresql start' returned 1: 
>>>>
>>>> I would suggest logging into the machine where postgres is installed 
>>>> and running that command by hand: '/sbin/service pe-postgresql start'. 
>>>>  Hopefully you will get some more detailed information from that.
>>>>
>>>> Also, it might be a good idea for us to move this thread over to the 
>>>> pe-users mailing list ( https://groups.google.com/a/
>>>> puppetlabs.com/forum/?hl=en-US#!forum/pe-users ).  Puppet-dev is 
>>>> generally used more for discussions about development around puppet itself.
>>>>
>>>> Please let us know if you are able to get any additional info based on 
>>>> the suggestions above!
>>>>
>>>> Thanks
>>>> Chris
>>>>
>>>>
>>>> On Wed, Jul 10, 2013 at 2:43 AM, Joseph Mwesigwa Bbaale <
>>>> [email protected]> wrote:
>>>>
>>>>> Hello developers.
>>>>>
>>>>> First, I am really new to puppet so, please pardon me if my question 
>>>>> has rather an obvious answer.
>>>>>
>>>>> I have tried to install puppet on both a Debian 6 VM and CentOS 6.3 VM 
>>>>> but always get this error along the way:
>>>>>
>>>>> ## Setting up the database... 
>>>>> Configuring postgresql server... 
>>>>> PostgreSQL server configured. 
>>>>> !! ERROR: The PostgreSQL server failed to start; unable to proceed 
>>>>>
>>>>> I decided to separate the roles. The puppet-master role installs 
>>>>> without a problem but the puppetDB component has always failed with the 
>>>>> same error above.
>>>>>
>>>>> Yesterday I looked at this "install_log.lastrun.<hostname>" file on 
>>>>> the VM intended for the DB role and noticed these errors: 
>>>>>
>>>>>
>>>>> Line 64: Warning: Error 400 on SERVER: Failed to find 
>>>>> pptconsole.ca.local via exec: Execution of '/etc/puppetlabs/puppet-
>>>>> dashboard/external_node pptconsole.ca.local' returned 7: 
>>>>> Line 213: Error: Could not retrieve catalog from remote server: Error 
>>>>> 400 on SERVER: Failed to submit 'replace facts' command for 
>>>>> pptconsole.ca.local to PuppetDB at pptconsole.ca.local:8081: No route to 
>>>>> host - connect(2) 
>>>>> Line 213: Error: Could not retrieve catalog from remote server: Error 
>>>>> 400 on SERVER: Failed to submit 'replace facts' command for 
>>>>> pptconsole.ca.local to PuppetDB at pptconsole.ca.local:8081: No route to 
>>>>> host - connect(2) 
>>>>> Line 215: Error: Could not retrieve catalog; skipping run 
>>>>> Line 347: Error: Could not start Service[postgresqld]: Execution of 
>>>>> '/sbin/service pe-postgresql start' returned 1: 
>>>>> Line 348: Error: 
>>>>> /Stage[main]/Postgresql::Server/Service[postgresqld]/ensure: 
>>>>> change from stopped to running failed: Could not start 
>>>>> Service[postgresqld]: Execution of '/sbin/service pe-postgresql start' 
>>>>> returned 1: 
>>>>>
>>>>> Today I decided to redo the setup. But after installing the 
>>>>> puppet-master component, the "puppet agent --test" command produces these 
>>>>> error:
>>>>>
>>>>> Warning: Unable to fetch my node definition, but the agent run will 
>>>>> continue:
>>>>> Warning: Error 400 on SERVER: Failed to find pptbasic.ca.local via 
>>>>> exec: Execution of '/etc/puppetlabs/puppet-dashboard/external_node 
>>>>> pptbasic.ca.local' returned 7: 
>>>>> Error: Could not retrieve catalog from remote server: Error 400 on 
>>>>> SERVER: Failed to submit 'replace facts' command for pptbasic.ca.local to 
>>>>> PuppetDB at pptbasic.ca.local:8081: Connection refused - connect(2)
>>>>> Warning: Not using cache on failed catalog
>>>>> Error: Could not retrieve catalog; skipping run
>>>>>
>>>>> On this VM, I have enabled traffic on port 8081 using iptables. I have 
>>>>> failed to figure out how to proceed.
>>>>>
>>>>> Any help is highly appreciated.
>>>>>
>>>>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/puppet-users/8615e530-eb06-402b-8f69-77a91461424a%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to