Puppet Dashboard with Passenger - 500 Internal Server Error (Mysql::Error: Can't create/write to file Errcode: 13)

448 views
Skip to first unread message

Jason Friedrich

unread,
Nov 21, 2013, 11:40:42 AM11/21/13
to puppet...@googlegroups.com
Distribution: Ubuntu 12.04.3
Ruby version: ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
Gem version: 1.8.15
Puppet version: 3.3.2-1puppetlabs1 (Puppetlabs apt repo)
Puppet Dashboard: 1.2.23-1puppetlabs1 (Puppetlabs apt repo)


I have successfully set up a puppet master, with two agents and the
Puppet Dashboard following the instructions from the puppetlabs web
site. When I use the internal, built-in web server, everything seems to
work fine. Even though the init scripts in the Ubuntu packages seem to
have a bug or two, it worked fine for me.

Now I wanted to move everything to the apache web server, as a test for
a bigger environment later. The puppetmaster was easily set up, the
puppetmaster-passenger deb works really great, like a charm.

With the install/config of the Puppet Dashboard in Apache2 I have more
problems. I have edited the settings.yml file
(http://pastebin.com/UUDKaJTi) and the database.yml
(http://pastebin.com/mpznUhdQ) to configure the Dashboard and the MySQL
database I use. I have copied the config.ru
(http://pastebin.com/myZzrA9p) file to the /usr/share/puppet-dashboard
directory and created the Apache configuration
(http://pastebin.com/XDpSkvbk).

When I try to hit the site though, I am getting the message "Puppet
Dashboard encountered an error. Something went wrong, and Puppet
Dashboard was unable to render the requested page [...]" and a strange
errror output in the production.log file (http://pastebin.com/aYYBRkEX).

I do not understand why Puppet Dashboard tries to create a MYI file in
/tmp. It should not create anything locally at all. It should use the
configured MySQL server.

When I execute

rake RAILS_ENV=production db:migration

in the Puppet Dashboard Directory, I get the same the same error. All
these settings worked fine when I used the built-in Webrick, so I do not
quite understand why this happens right now.

Hope that someone can help and put me on the right track.

Thanks,
-Jason

Felix Frank

unread,
Nov 25, 2013, 10:52:24 AM11/25/13
to puppet...@googlegroups.com
Hi,

my guess would be that this error is handed through from MySQL itself.

Are there perhaps problems with the permissions on your /tmp?

It is indeed strange that Webrick behaves different from passenger for
this use case, though. Can you somehow make absolutely certain that ruby
is contacting the correct MySQL instance?

Cheers,
Felix

Matheus Santos

unread,
Dec 20, 2013, 10:03:47 AM12/20/13
to puppet...@googlegroups.com
Hi folks, 

I am having the exact same problem. The Webrick works fine but the apache/passenger server does not. What would I need to have installed in ruby in order to ensure the connection between dashboard-passenger and the mysql that I don't need with the webrick? The /tmp (or do you mean the mysql.socket file?)  the  permission would have to be 777 right?

ps.: I also got the migration version (no_migration_check) error (probably because passenger can't read/write from/to mysql ) so when I set the env no_migration_check = 1 I got the 500 error...

Thanks!
Reply all
Reply to author
Forward
0 new messages