Puppet Agent does not connect to master after installing Dashboard

414 views
Skip to first unread message

shlo....@gmail.com

unread,
Nov 26, 2013, 4:33:39 AM11/26/13
to puppet...@googlegroups.com


Hi,
I had Puppet + Passenger installed and working.
 
Then I installed Dashboard on the puppet master.

I had to change the apache configuration file and replace the virtual host I had when I install Passenger with contain:
<VirtualHost *:80>
    ServerName puppetsrv.domain.com
    DocumentRoot /usr/share/puppet-dashboard/public/
    <Directory /usr/share/puppet-dashboard/public/>
        Options None
        AllowOverride AuthConfig
        Order Allow,Deny
        Allow from All
    </Directory>
    ErrorLog /etc/httpd/logs/dashboard_error.log
    LogLevel warn
    CustomLog /etc/httpd/logs/dashboard_access.log Combined
    ServerSignature On
</VirtualHost>

Now when I run on the agent :
 puppet agent  --no-daemonize --verbose
 
I got the error:
Notice: Starting Puppet client version 3.3.1
Error: Failed to apply catalog: Connection refused - connect(2)
Error: Could not send report: Connection refused - connect(2)
/usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:89:in `exit': no implicit conversion from nil to integer (TypeError)
        from /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:89:in `run_in_fork'
        from /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:86:in `fork'
        from /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:86:in `run_in_fork'
        from /usr/lib/ruby/site_ruby/1.8/puppet/agent.rb:41:in `run'
.... .... .... .... ....  
 
and have no nodes in the Dashboard on the puppet master.

How can I solve this problem?
Thanks.  

shlo....@gmail.com

unread,
Nov 27, 2013, 4:51:26 AM11/27/13
to puppet...@googlegroups.com
I think the problem is with merging Dashboard with Passenger.
What I need to have in my Apache config file?
For Passenger I need to have  in the Apache configuration file the lines:
Listen 8140
<VirtualHost *:8140>
    SSLEngine On
    SSLProtocol             All -SSLv2
    SSLCipherSuite          HIGH:!ADH:RC4+RSA:-MEDIUM:-LOW:-EXP
    SSLCertificateFile      /var/lib/puppet/ssl/certs/puppetsrv.domain.com.pem
    SSLCertificateKeyFile   /var/lib/puppet/ssl/private_keys/puppetsrv.domain.com.pem
    SSLCertificateChainFile /var/lib/puppet/ssl/ca/ca_crt.pem
    SSLCACertificateFile    /var/lib/puppet/ssl/ca/ca_crt.pem
    SSLCARevocationFile     /var/lib/puppet/ssl/ca/ca_crl.pem
    SSLVerifyClient         optional
    SSLVerifyDepth          1
    SSLOptions              +StdEnvVars +ExportCertData
 
    RequestHeader set X-SSL-Subject %{SSL_CLIENT_S_DN}e
    RequestHeader set X-Client-DN %{SSL_CLIENT_S_DN}e
    RequestHeader set X-Client-Verify %{SSL_CLIENT_VERIFY}e
 
    DocumentRoot /usr/share/puppet/rack/puppetmasterd/public/
    <Directory /usr/share/puppet/rack/puppetmasterd/>
        Options -MultiViews
        AllowOverride all

        Order Allow,Deny
        Allow from All
    </Directory>
</VirtualHost>

but for Dashboard I need to have the lines:

<VirtualHost *:80>
    ServerName puppetsrv.domain.com
    DocumentRoot /usr/share/puppet-dashboard/public/
    <Directory /usr/share/puppet-dashboard/public/>
        Options None
        AllowOverride AuthConfig
        Order Allow,Deny
        Allow from All
    </Directory>
    ErrorLog /etc/httpd/logs/dashboard_error.log
    LogLevel warn
    CustomLog /etc/httpd/logs/dashboard_access.log Combined
    ServerSignature On
</VirtualHost>

How can I merge between the 2 virtual host to make Passenger  work with Dashboard?
Any help is welcome.
Thanks.

Felix Frank

unread,
Nov 28, 2013, 3:42:54 AM11/28/13
to puppet...@googlegroups.com
Hi,

actually, I believe both puppetmaster and dashboard use passenger.

The idea behind apache's virtual hosts is that you can have independent
sets of configuration applied to different ports, or different IP
addresses available on the same server.

What you need to do is adding *both* <VirtualHost> blocks to your apache
config.

What platform is this? On Debian-likes, those go in
/etc/apache2/sites-available (with symlinks in sites-enabled/), for
RedHat-ish systems the structure in /etc/apache2 is slightly different,
but it should be easy to find.

HTH,
Felix

shlo....@gmail.com

unread,
Dec 2, 2013, 8:26:58 AM12/2/13
to puppet...@googlegroups.com
Thanks, I test it today and now both work. 

shlo....@gmail.com

unread,
Dec 2, 2013, 9:46:49 AM12/2/13
to puppet...@googlegroups.com
I continue with the instruction of configure Dashboard.
First, I dont see a list of nodes I have, Do I need to add them manually to Dashboard or it should came up automatically?

I tried to set "Importing exiting reports"  :
I dont have /var/puppet/lib/reports, how can I know where my report exist  so I can run the command 
'rake RAILS_ENV=production reports:migrate'  successfully?
 
I also tried to set 'Live report aggregation'.

As a result I have no reports in Dashboard. How can I see the reports?
Any help welcome.

kaustubh chaudhari

unread,
Dec 2, 2013, 12:18:40 PM12/2/13
to puppet...@googlegroups.com
what are you [master] setting in puppet.conf what is the 'report = ' configured for ?

-Kaustubh

shlo....@gmail.com

unread,
Dec 3, 2013, 1:16:25 AM12/3/13
to puppet...@googlegroups.com
under [master] tag I have:
    reports = store, http
    reporturl = http://puppetsrv:80/reports

kaustubh chaudhari

unread,
Dec 3, 2013, 1:48:54 AM12/3/13
to puppet...@googlegroups.com

I guess its http//pupetsrv/reports/uploads
==
http://docs.puppetlabs.com/dashboard/manual/1.2/bootstrapping.html#using-dashboard-for-reports
==

Also if you are using http, you dont need to specify port 80, one more thing, have you configured all your agent to report ?
report = true

-Kaustubh

shlo....@gmail.com

unread,
Dec 3, 2013, 4:52:24 AM12/3/13
to puppet...@googlegroups.com
Hi,
I follow book of older puppet version. I saw in the link you sent about 'Background Tasks' window, with ' pending tasks' and the command:
sudo -u puppet-dashboard env RAILS_ENV=production script/delayed_job -p dashboard -n 4 -m start
I run it and now I have the nodes and logs. 
Thank you very much for that!

Is there place a good document how to work with Dashboard - Logs and ENC?
Thanks a lot.

kaustubh chaudhari

unread,
Dec 3, 2013, 6:30:26 AM12/3/13
to puppet...@googlegroups.com
Hi,

Good to hear that!!!

Best docs i feel is http://docs.puppetlabs.com/dashboard/manual/1.2/index.html

-Kaustubh
Reply all
Reply to author
Forward
0 new messages