thinkwell
2013-Mar-26 02:04 UTC
[Puppet Users] Ruby (Rack) application could not be started
My puppet master server got torched so I''m rebuilding - ubuntu 12.04.2 LTS. After fiddling / tweaking / reading docs<http://docs.puppetlabs.com/guides/passenger.html>for hours now and I am reduced to hair-pulling frustration. I''m endeavoring to install 3.1.1 (3.0.2 on the old server) and I''m getting "Ruby (Rack) application could not be started<http://thinkwelldesigns.com/errors2.html>" errors. I updated my config.ru <http://thinkwelldesigns.com/config.txt>file with the 3.1 source<https://github.com/puppetlabs/puppet/blob/master/ext/rack/files/config.ru> . 1. I''m not getting errors in the /var/log/apache2/errors.log as the error message hints I should. 2. I tried my certs from my backup. 3. I tried recreating server certs, but no change. I don''t manage my puppet master with puppet, so I came on this discovery very late. For whatever it''s worth. 1. Installed puppet agent on the puppet master. 2. Ran puppet agent -t to generate an agent certificate 3. Get this error: Error: Could not request certificate: Error 500 on SERVER: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> <html><head> <title>500 Internal Server Error</title> </head><body> <h1>Internal Server Error</h1> <p>The server encountered an internal error or misconfiguration and was unable to complete your request.</p> <p>Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.</p> <p>More information about this error may be available in the server error log.</p> <hr> <address>Apache/2.2.22 (Ubuntu) Server at puppet Port 8140</address> </body></html> here is my gem list which shows rack is installed. *** LOCAL GEMS *** activemodel (3.2.13) activerecord (3.2.13) activesupport (3.2.13) arel (3.0.2) builder (3.0.4) daemon_controller (1.1.2) fastthread (1.0.7) i18n (0.6.1) multi_json (1.7.2) passenger (3.0.19) rack (1.5.2) rake (10.0.4) tzinfo (0.3.37) Many thanks for your assistance. I''m about maxed out. :-( -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Ramin K
2013-Mar-26 03:05 UTC
Re: [Puppet Users] Ruby (Rack) application could not be started
On 3/25/2013 7:04 PM, thinkwell wrote:> My puppet master server got torched so I''m rebuilding - ubuntu 12.04.2 LTS. > > After fiddling / tweaking / reading docs > <http://docs.puppetlabs.com/guides/passenger.html> for hours now and I > am reduced to hair-pulling frustration. > > I''m endeavoring to install 3.1.1 (3.0.2 on the old server) and I''m > getting "Ruby (Rack) application could not be started > <http://thinkwelldesigns.com/errors2.html>" errors. I updated my > config.ru <http://thinkwelldesigns.com/config.txt> file with the 3.1 > source > <https://github.com/puppetlabs/puppet/blob/master/ext/rack/files/config.ru>. > > 1. I''m not getting errors in the /var/log/apache2/errors.log as the > error message hints I should. > 2. I tried my certs from my backup. > 3. I tried recreating server certs, but no change. > > I don''t manage my puppet master with puppet, so I came on this discovery > very late. For whatever it''s worth. > > 1. Installed puppet agent on the puppet master. > 2. Ran puppet agent -t to generate an agent certificate > 3. Get this error: > > Error: Could not request certificate: Error 500 on SERVER: <!DOCTYPE > HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> > <html><head> > <title>500 Internal Server Error</title> > </head><body> > <h1>Internal Server Error</h1> > <p>The server encountered an internal error or > misconfiguration and was unable to complete > your request.</p> > <p>Please contact the server administrator, > [no address given] and inform them of the time the error occurred, > and anything you might have done that may have > caused the error.</p> > <p>More information about this error may be available > in the server error log.</p> > <hr> > <address>Apache/2.2.22 (Ubuntu) Server at puppet Port 8140</address> > </body></html> > > > here is my gem list which shows rack is installed. > *** LOCAL GEMS *** > > activemodel (3.2.13) > activerecord (3.2.13) > activesupport (3.2.13) > arel (3.0.2) > builder (3.0.4) > daemon_controller (1.1.2) > fastthread (1.0.7) > i18n (0.6.1) > multi_json (1.7.2) > passenger (3.0.19) > rack (1.5.2) > rake (10.0.4) > tzinfo (0.3.37) > > Many thanks for your assistance. I''m about maxed out. :-(Your gem listing makes me thing you''ve installed Ruby inside rvm, is that the case? If so, you''ll need to install Puppet within the same Ruby as the one the passenger.so resides in and is configured in /etc/apache2/mod-enabled/passenger.{conf,load} fwiw, you may find it simpler to use the distro packages though I would pull in the official Passenger 3.x repo from apt.brightbox.net as well as apt.puppetlabs.com Ramin -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
thinkwell
2013-Mar-26 12:59 UTC
Re: [Puppet Users] Ruby (Rack) application could not be started
Hello Ramin. Thanks for your reply. I didn''t install rvm, I''m only using system ruby. Regarding the use of gems vs puppet repositories, well, I installed Puppet from the official apt repos but I wasn''t aware that passenger can be installed from there as well. If that''s the case, why is the documentation <http://docs.puppetlabs.com/guides/passenger.html>so out of date? I removed all my gems, installed puppetmaster-passenger & ruby-rack from apt, and get this output (Grrrr): Setting up ruby-rack (1.3.5-1) ... Setting up librack-ruby (1.3.5-1) ... Setting up libapache2-mod-passenger (2.2.11debian-2) ... Setting up puppetmaster-passenger (3.1.1-1puppetlabs1) ... Module ssl already enabled Module headers already enabled Enabling site puppetmaster. To activate the new configuration, you need to run: service apache2 reload Syntax error on line 3 of /etc/apache2/sites-enabled/puppetmaster: Invalid command ''PassengerHighPerformance'', perhaps misspelled or defined by a module not included in the server configuration Action ''configtest'' failed. The Apache error log may have more information. ...fail! invoke-rc.d: initscript apache2, action "restart" failed. dpkg: error processing puppetmaster-passenger (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: puppetmaster-passenger * What is the recommended way to configure Puppet 3.1.1 with Apache!!?* On Monday, March 25, 2013 11:05:14 PM UTC-4, Ramin K wrote:> > On 3/25/2013 7:04 PM, thinkwell wrote: > > My puppet master server got torched so I''m rebuilding - ubuntu 12.04.2 > LTS. > > > > After fiddling / tweaking / reading docs > > <http://docs.puppetlabs.com/guides/passenger.html> for hours now and I > > am reduced to hair-pulling frustration. > > > > I''m endeavoring to install 3.1.1 (3.0.2 on the old server) and I''m > > getting "Ruby (Rack) application could not be started > > <http://thinkwelldesigns.com/errors2.html>" errors. I updated my > > config.ru <http://thinkwelldesigns.com/config.txt> file with the 3.1 > > source > > < > https://github.com/puppetlabs/puppet/blob/master/ext/rack/files/config.ru>. > > > > > 1. I''m not getting errors in the /var/log/apache2/errors.log as the > > error message hints I should. > > 2. I tried my certs from my backup. > > 3. I tried recreating server certs, but no change. > > > > I don''t manage my puppet master with puppet, so I came on this discovery > > very late. For whatever it''s worth. > > > > 1. Installed puppet agent on the puppet master. > > 2. Ran puppet agent -t to generate an agent certificate > > 3. Get this error: > > > > Error: Could not request certificate: Error 500 on SERVER: <!DOCTYPE > > HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"> > > <html><head> > > <title>500 Internal Server Error</title> > > </head><body> > > <h1>Internal Server Error</h1> > > <p>The server encountered an internal error or > > misconfiguration and was unable to complete > > your request.</p> > > <p>Please contact the server administrator, > > [no address given] and inform them of the time the error occurred, > > and anything you might have done that may have > > caused the error.</p> > > <p>More information about this error may be available > > in the server error log.</p> > > <hr> > > <address>Apache/2.2.22 (Ubuntu) Server at puppet Port 8140</address> > > </body></html> > > > > > > here is my gem list which shows rack is installed. > > *** LOCAL GEMS *** > > > > activemodel (3.2.13) > > activerecord (3.2.13) > > activesupport (3.2.13) > > arel (3.0.2) > > builder (3.0.4) > > daemon_controller (1.1.2) > > fastthread (1.0.7) > > i18n (0.6.1) > > multi_json (1.7.2) > > passenger (3.0.19) > > rack (1.5.2) > > rake (10.0.4) > > tzinfo (0.3.37) > > > > Many thanks for your assistance. I''m about maxed out. :-( > > Your gem listing makes me thing you''ve installed Ruby inside rvm, is > that the case? If so, you''ll need to install Puppet within the same Ruby > as the one the passenger.so resides in and is configured in > /etc/apache2/mod-enabled/passenger.{conf,load} > > fwiw, you may find it simpler to use the distro packages though I would > pull in the official Passenger 3.x repo from apt.brightbox.net as well > as apt.puppetlabs.com > > Ramin >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Ramin K
2013-Mar-26 17:35 UTC
Re: [Puppet Users] Ruby (Rack) application could not be started
On 3/26/2013 5:59 AM, thinkwell wrote:> Hello Ramin. Thanks for your reply. I didn''t install rvm, I''m only using > system ruby. Regarding the use of gems vs puppet repositories, well, I > installed Puppet from the official apt repos but I wasn''t aware that > passenger can be installed from there as well. If that''s the case, why > is the documentation > <http://docs.puppetlabs.com/guides/passenger.html>so out of date? > > I removed all my gems, installed puppetmaster-passenger & ruby-rack from > apt, and get this output (Grrrr): > > Setting up ruby-rack (1.3.5-1) ... > Setting up librack-ruby (1.3.5-1) ... > Setting up libapache2-mod-passenger (2.2.11debian-2) ... > Setting up puppetmaster-passenger (3.1.1-1puppetlabs1) ... > Module ssl already enabled > Module headers already enabled > Enabling site puppetmaster. > To activate the new configuration, you need to run: > service apache2 reload > Syntax error on line 3 of /etc/apache2/sites-enabled/puppetmaster: > Invalid command ''PassengerHighPerformance'', perhaps misspelled or > defined by a module not included in the server configuration > Action ''configtest'' failed. > The Apache error log may have more information. > ...fail! > invoke-rc.d: initscript apache2, action "restart" failed. > dpkg: error processing puppetmaster-passenger (--configure): > subprocess installed post-installation script returned error exit status 1 > Errors were encountered while processing: > puppetmaster-passenger > > * > What is the recommended way to configure Puppet 3.1.1 with Apache!!?*Two things. You can get Passenger 3.0.19 from here, http://apt.brightbox.net/ though you''ll need to the key dance outlined here, http://wiki.brightbox.co.uk/docs:brightboxaptrepository I recommend Passenger 3.x for all the reasons here, https://ask.puppetlabs.com/question/468/should-i-run-my-puppet-master-under-passenger-30x-or-22x/ However in your current case I''d make sure that the Passenger module has been enabled. When Apache thinks a command is invalid it''s almost always that the module the command is meant to config is not enabled or loaded. Ramin -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
thinkwell
2013-Mar-26 19:11 UTC
Re: [Puppet Users] Ruby (Rack) application could not be started
Still no luck. Installed from gems, installed from Puppet Apt, installed from brightbox. Some thing must be busted for each one. Puppet runs always generating scads of errors <http://thinkwelldesigns.com/errors2.html>. Is Passenger enabled? I had to create these files manually since the packages from brightbox didn''t. I guess the settings are correct.... Contents of /etc/apache2/mods-available/passenger.conf: PassengerRoot /usr/lib/ruby/1.8/phusion_passenger PassengerRuby /usr/bin/ruby1.8 Contents of /etc/apache2/mods-available/passenger.load: LoadModule passenger_module /usr/lib/apache2/modules/mod_passenger.so This. Is. Getting. To. Be. One. *S**creeeeaaaammmmming.* Pain. Thanks for your help Ramin, but why oh why can''t we have up-to-date documentation that gives correct step-by-step installation directions? How esoteric does this have to be? On Tuesday, March 26, 2013 1:35:19 PM UTC-4, Ramin K wrote:> > > However in your current case I''d make sure that the Passenger module has > been enabled. When Apache thinks a command is invalid it''s almost always > that the module the command is meant to config is not enabled or loaded. > > Ramin >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Felix Frank
2013-Apr-02 11:54 UTC
Re: [Puppet Users] Ruby (Rack) application could not be started
Hi, On 03/26/2013 08:11 PM, thinkwell wrote:> Puppet runs always generating scads of errors > <http://thinkwelldesigns.com/errors2.html>.Is Passenger enabled?Well, the error is titled with "Passanger" so I''d say yes ;) The error also advises to check the webservers''s logfiles. Have you? If apache logs aren''t helpful, there may be something on the puppet side of things. Rack applications may do some logging of their own.> This. Is. Getting. To. Be. One. *S**creeeeaaaammmmming.*Pain.Dude.> Thanks for your help Ramin, but why oh why can''t we have up-to-date > documentation that gives correct step-by-step installation directions? > How esoteric does this have to be?I''ve found that ruby applications can be made to be very portable, but the more so if you do *everything* the intended ruby way. With the different OS environments, there are lots of half-assed compromises (e.g. install some software through packages, others through gems etc.) and the howto''s will often reflect the respective author''s personal preference with regards to the respective details. Also, they want to keep things simple between differen OS releases. Long story short, I concur that in Debian (Ubuntu propably the same), getting Passenger via packages is a better choice than gems. I cannot comment on 3.x vs. 2.x, but I''ve seen good mileage with the stock Debian packages for apache/passenger (not tried a 3.x master yet, though). Sadly that won''t match the docs exactly, but I think this should be painless enough: - start from scratch - get the components via apt - apply the configs from the howto as best you can - clean up the leftover errors from the discrepancies HTH, Felix -- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Ken Barber
2013-Apr-02 12:08 UTC
Re: [Puppet Users] Ruby (Rack) application could not be started
This is me installing a puppetmaster for Ubuntu with the bog-standard apt repos the other day - took less than 5 minutes: https://gist.github.com/kbarber/5209267 As you can see it was pretty straight-forward (apt-get install puppetmaster-passenger, more or less) - note this was a clean Ubuntu 12.04 installation, so do start fresh as Felix suggests. I haven''t got a gist of an installation with the puppetlabs repos recently, but it should be similar - only include the Puppetlabs repos first: http://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html#for-debian-and-ubuntu The puppetlabs repos will give you the latest version of Puppet which is probably the way to go. Note I never: * Installed passenger from brightbox * Installed using any gems * Made any manual changes (at least not with my basic setup, your mileage may vary) So either use the stuff hosted by Ubuntu, or by PL and you should be good. Let us know how you go. ken. On Tue, Apr 2, 2013 at 12:54 PM, Felix Frank <felix.frank@alumni.tu-berlin.de> wrote:> Hi, > > On 03/26/2013 08:11 PM, thinkwell wrote: >> Puppet runs always generating scads of errors >> <http://thinkwelldesigns.com/errors2.html>.Is Passenger enabled? > > Well, the error is titled with "Passanger" so I''d say yes ;) > > The error also advises to check the webservers''s logfiles. Have you? > > If apache logs aren''t helpful, there may be something on the puppet side > of things. Rack applications may do some logging of their own. > >> This. Is. Getting. To. Be. One. *S**creeeeaaaammmmming.*Pain. > > Dude. > >> Thanks for your help Ramin, but why oh why can''t we have up-to-date >> documentation that gives correct step-by-step installation directions? >> How esoteric does this have to be? > > I''ve found that ruby applications can be made to be very portable, but > the more so if you do *everything* the intended ruby way. With the > different OS environments, there are lots of half-assed compromises > (e.g. install some software through packages, others through gems etc.) > and the howto''s will often reflect the respective author''s personal > preference with regards to the respective details. Also, they want to > keep things simple between differen OS releases. > > Long story short, I concur that in Debian (Ubuntu propably the same), > getting Passenger via packages is a better choice than gems. I cannot > comment on 3.x vs. 2.x, but I''ve seen good mileage with the stock Debian > packages for apache/passenger (not tried a 3.x master yet, though). > > Sadly that won''t match the docs exactly, but I think this should be > painless enough: > - start from scratch > - get the components via apt > - apply the configs from the howto as best you can > - clean up the leftover errors from the discrepancies > > HTH, > Felix > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.
Nikola Petrov
2013-Apr-02 13:57 UTC
Re: [Puppet Users] Ruby (Rack) application could not be started
Yep. Sometimes I even wonder why are people considering other options. By default I installed the packages from puppetlabs and I have forgotten about it. P.S. I even think that puppetDB should install with postgresql by default. It scales better debugging is much better and maintenance too. Best, Nikola On Tue, Apr 02, 2013 at 01:08:29PM +0100, Ken Barber wrote:> This is me installing a puppetmaster for Ubuntu with the bog-standard > apt repos the other day - took less than 5 minutes: > > https://gist.github.com/kbarber/5209267 > > As you can see it was pretty straight-forward (apt-get install > puppetmaster-passenger, more or less) - note this was a clean Ubuntu > 12.04 installation, so do start fresh as Felix suggests. I haven''t got > a gist of an installation with the puppetlabs repos recently, but it > should be similar - only include the Puppetlabs repos first: > > http://docs.puppetlabs.com/guides/puppetlabs_package_repositories.html#for-debian-and-ubuntu > > The puppetlabs repos will give you the latest version of Puppet which > is probably the way to go. > > Note I never: > > * Installed passenger from brightbox > * Installed using any gems > * Made any manual changes (at least not with my basic setup, your > mileage may vary) > > So either use the stuff hosted by Ubuntu, or by PL and you should be > good. Let us know how you go. > > ken. > > On Tue, Apr 2, 2013 at 12:54 PM, Felix Frank > <felix.frank@alumni.tu-berlin.de> wrote: > > Hi, > > > > On 03/26/2013 08:11 PM, thinkwell wrote: > >> Puppet runs always generating scads of errors > >> <http://thinkwelldesigns.com/errors2.html>.Is Passenger enabled? > > > > Well, the error is titled with "Passanger" so I''d say yes ;) > > > > The error also advises to check the webservers''s logfiles. Have you? > > > > If apache logs aren''t helpful, there may be something on the puppet side > > of things. Rack applications may do some logging of their own. > > > >> This. Is. Getting. To. Be. One. *S**creeeeaaaammmmming.*Pain. > > > > Dude. > > > >> Thanks for your help Ramin, but why oh why can''t we have up-to-date > >> documentation that gives correct step-by-step installation directions? > >> How esoteric does this have to be? > > > > I''ve found that ruby applications can be made to be very portable, but > > the more so if you do *everything* the intended ruby way. With the > > different OS environments, there are lots of half-assed compromises > > (e.g. install some software through packages, others through gems etc.) > > and the howto''s will often reflect the respective author''s personal > > preference with regards to the respective details. Also, they want to > > keep things simple between differen OS releases. > > > > Long story short, I concur that in Debian (Ubuntu propably the same), > > getting Passenger via packages is a better choice than gems. I cannot > > comment on 3.x vs. 2.x, but I''ve seen good mileage with the stock Debian > > packages for apache/passenger (not tried a 3.x master yet, though). > > > > Sadly that won''t match the docs exactly, but I think this should be > > painless enough: > > - start from scratch > > - get the components via apt > > - apply the configs from the howto as best you can > > - clean up the leftover errors from the discrepancies > > > > HTH, > > Felix > > > > -- > > 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+unsubscribe@googlegroups.com. > > To post to this group, send email to puppet-users@googlegroups.com. > > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > > For more options, visit https://groups.google.com/groups/opt_out. > > > > > > -- > 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+unsubscribe@googlegroups.com. > To post to this group, send email to puppet-users@googlegroups.com. > Visit this group at http://groups.google.com/group/puppet-users?hl=en. > For more options, visit https://groups.google.com/groups/opt_out. > >-- 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+unsubscribe@googlegroups.com. To post to this group, send email to puppet-users@googlegroups.com. Visit this group at http://groups.google.com/group/puppet-users?hl=en. For more options, visit https://groups.google.com/groups/opt_out.