problem using apache & passenger to run dashboard

2,427 views
Skip to first unread message

Hai Tao

unread,
Jul 10, 2012, 7:39:34 PM7/10/12
to puppet...@googlegroups.com
Hi,

My puppetmaster is running through apache, and now I am setting up
dashboard to be run by apache too.

I followed docs in
http://docs.puppetlabs.com/dashboard/manual/1.2/bootstrapping.html#starting-and-managing-delayed-job-workers,
but after I restarted httpd, I see a apache welcome page.


I set documentroot to be:

DocumentRoot /usr/share/puppet-dashboard/public/
<Directory /usr/share/puppet-dashboard/public/>
Options None
Order allow,deny
allow from all
</Directory>

but /usr/share/puppet-dashboard/public/ seems does not have my
dashboard content:

]# ll /usr/share/puppet-dashboard/public
total 28
-rw-r--r-- 1 apache apache 947 Jun 13 14:49 404.html
-rw-r--r-- 1 apache apache 930 Jun 13 14:49 422.html
-rw-r--r-- 1 apache apache 1112 Jun 13 14:49 500.html
drwxr-xr-x 3 apache apache 4096 Jul 6 12:12 images
drwxr-xr-x 2 apache apache 4096 Jul 10 16:09 javascripts
-rw-r--r-- 1 apache apache 26 Jun 13 14:49 robots.txt
drwxr-xr-x 4 apache apache 4096 Jul 10 16:09 stylesheets


can someone help on this?

Craig White

unread,
Jul 10, 2012, 7:51:28 PM7/10/12
to puppet...@googlegroups.com
----
that would seem to be right (though I have my puppet-dashboard directory owned by puppet:puppet)

you might want to check log files for apache and for /usr/share/puppet-dashboard/log/production.log for hints/clues

Craig

Hai Tao

unread,
Jul 10, 2012, 8:13:01 PM7/10/12
to puppet...@googlegroups.com
I receive a lot of errors:
[Tue Jul 10 17:03:17 2012] [error] [client 10.224.78.200] File does
not exist: /usr/share/puppet-dashboard/public/reports
[Tue Jul 10 17:03:19 2012] [error] [client 10.224.78.200] File does
not exist: /usr/share/puppet-dashboard/public/reports
[Tue Jul 10 17:03:25 2012] [error] [client 10.224.78.200] File does
not exist: /usr/share/puppet-dashboard/public/reports
[Tue Jul 10 17:03:28 2012] [error] [client 10.224.78.200] File does
not exist: /usr/share/puppet-dashboard/public/reports
[Tue Jul 10 17:03:31 2012] [error] [client 10.224.78.200] File does
not exist: /usr/share/puppet-dashboard/public/reports
[Tue Jul 10 17:03:37 2012] [error] [client 10.224.78.200] File does
not exist: /usr/share/puppet-dashboard/public/reports


why there is no reports folder?
> --
> You received this message because you are subscribed to the Google Groups "Puppet Users" group.
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to puppet-users...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/puppet-users?hl=en.
>



--
Hai Tao

Hai Tao

unread,
Jul 10, 2012, 11:48:41 PM7/10/12
to puppet...@googlegroups.com
Can someone help on this?

Thanks.
--
Hai Tao

llo...@oreillyauto.com

unread,
Jul 11, 2012, 12:47:05 PM7/11/12
to puppet...@googlegroups.com
Comments inline.


On Tuesday, July 10, 2012 10:48:41 PM UTC-5, Hai wrote:
Can someone help on this?

Thanks.

 
<snip>
 
>
>
> why there is no reports folder?
>


Do you have your agents set to report, and have you ran 'puppet agent --test' on them?

Are you using port 80 (default) or 3000 (recommended) for the vhost?

If you changed it, did you remember to add the Listen 3000 line? It tripped me up for a moment when I set this up earlier today.

Which version of ruby gems do you have?

Does the dashboard work if you start it using webrick?

 <snip>

>>> but /usr/share/puppet-dashboard/public/ seems does not have my
>>> dashboard content:

This is a rails app, so it doesn't need to have the "real" files in there, as long as everything else is setup correctly.
 

Lee

Hai Tao

unread,
Jul 11, 2012, 1:01:11 PM7/11/12
to puppet...@googlegroups.com
Lee,

Thanks for your help.

Yes, I set "report = true" on clients, and they all worked well with
webrick ( dashboard can see the reports in the resport tab). My gem
version is 1.3.7.

Here is mty dashboard-vhost.conf:

# cat dashboard-vhost.conf | grep -v \# | grep -v ^$
LoadModule passenger_module
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.13/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.13
PassengerRuby /usr/bin/ruby
PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
PassengerMaxRequests 1000
PassengerStatThrottleRate 120
RailsAutoDetect On
Listen 3000
<VirtualHost *:3000>
ServerName ***.***.com (this is my server's fqdn)
DocumentRoot /usr/share/puppet-dashboard/public/
<Directory /usr/share/puppet-dashboard/public/>
Options None
Order allow,deny
allow from all
</Directory>
ErrorLog /var/log/httpd/dashboard_error.log
LogLevel warn
CustomLog /var/log/httpd/dashboard_access.log combined
ServerSignature On
</VirtualHost>

do we need a file, config.ru like what we have in /etc/puppet/rack ?
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/j-fUFzUY9cIJ.

Jo Rhett

unread,
Jul 11, 2012, 2:13:48 PM7/11/12
to puppet...@googlegroups.com
On Jul 10, 2012, at 4:39 PM, Hai Tao wrote:
but after I restarted httpd, I see a apache welcome page.

Did you read the page? It probably tells you to remove /etc/httpd/conf.d/welcome.conf ...

-- 
Jo Rhett
Net Consonance : net philanthropy to improve open source and internet projects.



llo...@oreillyauto.com

unread,
Jul 11, 2012, 2:18:30 PM7/11/12
to puppet...@googlegroups.com


On Wednesday, July 11, 2012 1:13:48 PM UTC-5, Jo wrote:
On Jul 10, 2012, at 4:39 PM, Hai Tao wrote:
but after I restarted httpd, I see a apache welcome page.

Did you read the page? It probably tells you to remove /etc/httpd/conf.d/welcome.conf ...


That or specify the right port in the browser.
 

Hai Tao

unread,
Jul 11, 2012, 2:28:30 PM7/11/12
to puppet...@googlegroups.com
The welcome page should only display when there is no webpage to
display. I tried to remove the welcome page, and it still is not
working.

It looks to me that the passenger is not working correctly.

httpd error log show this errors:

# tail -f dashboard_error.log
[Wed Jul 11 11:27:26 2012] [error] [client ::1] File does not exist:
/usr/share/puppet-dashboard/public/nodes
[Wed Jul 11 11:27:26 2012] [error] [client 10.224.78.200] File does
not exist: /usr/share/puppet-dashboard/public/reports
[Wed Jul 11 11:27:32 2012] [error] [client ::1] File does not exist:
/usr/share/puppet-dashboard/public/nodes
[Wed Jul 11 11:27:32 2012] [error] [client 10.224.78.200] File does
not exist: /usr/share/puppet-dashboard/public/reports
[Wed Jul 11 11:27:34 2012] [error] [client ::1] File does not exist:
/usr/share/puppet-dashboard/public/nodes
[Wed Jul 11 11:27:34 2012] [error] [client 10.224.78.200] File does
not exist: /usr/share/puppet-dashboard/public/reports
[Wed Jul 11 11:27:35 2012] [error] [client ::1] File does not exist:
/usr/share/puppet-dashboard/public/nodes
[Wed Jul 11 11:27:35 2012] [error] [client 10.224.78.200] File does
not exist: /usr/share/puppet-dashboard/public/reports
[Wed Jul 11 11:27:43 2012] [error] [client ::1] File does not exist:
/usr/share/puppet-dashboard/public/nodes
[Wed Jul 11 11:27:44 2012] [error] [client 10.224.78.200] File does
not exist: /usr/share/puppet-dashboard/public/reports
[Wed Jul 11 11:27:46 2012] [error] [client ::1] File does not exist:
/usr/share/puppet-dashboard/public/nodes
[Wed Jul 11 11:27:46 2012] [error] [client 10.224.78.200] File does
not exist: /usr/share/puppet-dashboard/public/reports
[Wed Jul 11 11:27:46 2012] [error] [client ::1] File does not exist:
/usr/share/puppet-dashboard/public/nodes
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.

Denmat

unread,
Jul 12, 2012, 3:47:39 AM7/12/12
to puppet...@googlegroups.com
Hi,

Haven't got details in front of me but check the puppet docs on passenger - I think you haven't set the right perms on your config.ru - should be owned by puppet.

Cheers
Den

Hai Tao

unread,
Jul 12, 2012, 12:04:40 PM7/12/12
to puppet...@googlegroups.com
I do have a config.ru under /etc/puppet/rack, and it is owned by
puppet. And that is the only config.ru I have.

Under /usr/share/puppet-dashboard/public, there is no config.ru. But
there is a /usr/share/puppet-dashboard/vendor/rails/railties/dispatches/config.ru.

In the procedure I followed, it never ask me to config a config.ru
file. http://docs.puppetlabs.com/dashboard/manual/1.2/bootstrapping.html


Thanks.

Hai Tao

Hai Tao

unread,
Jul 12, 2012, 12:05:31 PM7/12/12
to puppet...@googlegroups.com
note, I also have a /usr/share/puppet/ext/rack/files/config.ru file.
--
Hai Tao

Clay

unread,
Jul 12, 2012, 5:50:07 PM7/12/12
to puppet...@googlegroups.com
you don't need a config.ru  for  puppet-dashboard public folder,  I just  switched to apache passenger for dashboard,  it's working without the config.ru file.

Hai Tao

unread,
Jul 12, 2012, 6:09:53 PM7/12/12
to puppet...@googlegroups.com
what version of dashboard you are running?

can you provide your httpd configuration for dashboard?

Thanks.
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/mCuf6Wbh8HEJ.

Clay

unread,
Jul 12, 2012, 7:30:10 PM7/12/12
to puppet...@googlegroups.com
I'm running puppet dashboard 1.2.9 ,   just followed document at  http://docs.puppetlabs.com/dashboard/manual/1.2/bootstrapping.html#running-dashboard-in-a-production-quality-server

[root@puppet conf.d]# grep -v ^# dashboard-vhost.conf

Listen 3000
<VirtualHost *:3000>
        ServerName puppet.domain.com

        DocumentRoot /usr/share/puppet-dashboard/public/
        <Directory /usr/share/puppet-dashboard/public/>
                Options None
                Order allow,deny
                allow from all
        </Directory>
  ErrorLog /var/log/httpd/dashboard_error.log
  LogLevel warn
  CustomLog /var/log/httpd/dashboard_access.log combined
  ServerSignature On
</VirtualHost>

I have  the passenger module config in /etc/httpd/conf/httpd.conf because  puppet master is also using passenger.

LoadModule passenger_module /usr/lib64/ruby/gems/1.8/gems/passenger-3.0.13/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib64/ruby/gems/1.8/gems/passenger-3.0.13
PassengerRuby /usr/bin/ruby


Hai Tao

unread,
Jul 12, 2012, 7:42:39 PM7/12/12
to puppet...@googlegroups.com
that is almost exactly what I have , except I put the mod_passenger.so
to /var/lib instead of /var/lib64.

LoadModule passenger_module
/usr/lib/ruby/gems/1.8/gems/passenger-3.0.13/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.13
PassengerRuby /usr/bin/ruby

But I do not think that would affect anything.

The thing is I have no experience with passenger, and I do not know
how to trouble shoot this problem.

Is there suggestions?

Thanks.
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/rl1IMNDZR3MJ.

Hai Tao

unread,
Jul 19, 2012, 7:22:53 PM7/19/12
to puppet...@googlegroups.com
Can someone help me in this forum?
--
Hai Tao

banjer

unread,
Jul 24, 2012, 2:30:46 PM7/24/12
to puppet...@googlegroups.com
I'm having the same exact problem trying to get Apache to serve puppet dashboard on CentOS 6.3.  Apache is set up to serve my puppet master, and the puppetmaster is configured and working just fine.  I get this in the apache error log:

  Directory index forbidden by Options directive: /usr/share/puppet-dashboard/public/

Here are my configs.  Added these lines to /etc/httpd/conf/httpd.conf:

ServerName merkin.mydomain.com

# Passenger for rails apps (puppet)
LoadModule passenger_module /usr/lib/ruby/gems/1.8/gems/passenger-3.0.14/ext/apache2/mod_passenger.so
PassengerRoot /usr/lib/ruby/gems/1.8/gems/passenger-3.0.14
PassengerRuby /usr/bin/ruby


This is my /etc/httpd/conf.d/dashboard-vhost.conf

# you may want to tune these settings

PassengerHighPerformance on
PassengerMaxPoolSize 12
PassengerPoolIdleTime 1500
# PassengerMaxRequests 1000
PassengerStatThrottleRate 120
RailsAutoDetect On

Listen 3000
<VirtualHost *:3000>
        ServerName merkin.mydomain.com

        DocumentRoot /usr/share/puppet-dashboard/public/
        <Directory /usr/share/puppet-dashboard/public/>
                Options None
                Order allow,deny
                allow from all
        </Directory>
  ErrorLog /var/log/httpd/dashboard.com_error.log
  LogLevel warn
  CustomLog /var/log/httpd/dashboard.com_access.log combined
  ServerSignature On
</VirtualHost>


When I visit merkin.mydomain.com:3000, all I'm seeing is an Apache test page.  Seems like Hai and myself are using (close to) the same version of gems and passenger, so perhaps something related to 3.x passenger. 

Perhaps RailsAutoDetect is not auto-detecting correctly?  Can I try explicitly setting RailsBaseURI?  If so, what should it point to?

Thanks for the help.
>> puppet-users+unsubscribe@googlegroups.com.

banjer

unread,
Jul 24, 2012, 2:35:00 PM7/24/12
to puppet...@googlegroups.com
And 2 minutes after I posted this, I got it working :).  It was indeed the RailsAutoDetect.  I commented it out and set RailsBaseURI to /.   Like this:

 
  #RailsAutoDetect On
  RailsBaseURI /


  Listen 3000
  <VirtualHost *:3000>
  ...snip...


Hai, hope this works for you!

Hai Tao

unread,
Jul 24, 2012, 2:38:08 PM7/24/12
to puppet...@googlegroups.com
I have figured it out. Simply move "RailsAutoDetect On" into the
virtualhost block will resolve the issue.

Basically, their example should be fixed the same way.
>> >> puppet-users...@googlegroups.com.
>> >> For more options, visit this group at
>> >> http://groups.google.com/group/puppet-users?hl=en.
>> >
>> >
>> >
>> > --
>> > Hai Tao
>>
>>
>>
>> --
>> Hai Tao
>
> --
> You received this message because you are subscribed to the Google Groups
> "Puppet Users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/puppet-users/-/WHnHWvRpEPEJ.
>
> To post to this group, send email to puppet...@googlegroups.com.
> To unsubscribe from this group, send email to
> puppet-users...@googlegroups.com.

Anh Lê Vũ

unread,
Jan 14, 2014, 4:20:28 AM1/14/14
to puppet...@googlegroups.com
Dear Hai

I got the exactly same problem and I have no experience in Passenger too

I use passenger-4.0.33 and when I try to move the "RailsAutoDetect On" into the 
virtualhost i got the following error 

Invalid command 'RailsAutoDetect', perhaps misspelled or defined by a module not included in the server configuration

And I don't know how to check if the passenger run ok

Do you experience this problem?
Reply all
Reply to author
Forward
0 new messages