Mehdi Adda
2007-Jul-16 04:31 UTC
[Mongrel] mongrel_rails start working mongrel_rails cluster::start not working
Hi everybody, I have installed mongrel and mongrel cluster in a new linux box .... at the end of the day I was able to lunch mongrel (mongrel_rails start -e production) and all is working fine with. However, when I tried to set a mongrel cluster the command mongrel_rails cluster::start get the following output : starting port 8000 starting port 8001 starting port 8002 But when I lunched the browser to the application url and port 8000 for example, the mongrels seems not working. I looked at the log file and get for the first mongrel instance : ** Daemonized, any open files are closed. Look at tmp/mongrel.8000.pid and log/mongrel.8000.log for info. ** Starting Mongrel listening at 0.0.0.0:8000 ** Changing group to mongrel. ** Changing user to mongrel. ** Starting Rails with production environment... ** Mounting Rails at /home/rails/projects/myapps... /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in `gem_original_require'': no such file to load -- /home/rails/projects/myapps/config/environment (LoadError) from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in `require'' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:157:in `rails'' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:116:in `cloaker_'' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in `call'' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in `listener'' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:98:in `cloaker_'' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in `call'' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in `initialize'' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in `new'' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in `run'' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in `run'' from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:248 from /usr/bin/mongrel_rails:16:in `load'' from /usr/bin/mongrel_rails:16 It''s the same thing for the two other instances. My mongrel cluster configuration is as follows : user: mongrel group: mongrel cwd: /home/rails/projects/myapps log_file: log/mongrel.log port: "8000" environment: production address: 127.0.0.1 pid_file: tmp/mongrel.pid servers: 3 My server configuration is as follows : Linux Centos 5 ruby 1.8.6 rubygems 0.9.4 Rails 1.2.3 Mongrel Web Server 1.0.1 mongrel_cluster 1.0.2 nginx version: nginx/0.5.27 Can anyone give help me to get this out ? Thanks a lot in advance Addame -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070716/4b622447/attachment.html
Bill Siggelkow
2007-Jul-16 12:11 UTC
[Mongrel] mongrel_rails start working mongrel_rails cluster::start not working
Two things I would check: 1) Make sure you that you are not missing any gems that your application uses; 2) Check to see if your application will run under webrick Bill Siggelkow bsiggelkow at mac.com AIM: siggelkowb Home: 770-457-8854 Mobile: 770-354-2584 On Jul 16, 2007, at 12:31 AM, Mehdi Adda wrote:> Hi everybody, > > I have installed mongrel and mongrel cluster in a new linux > box .... at the end of the day I was able to lunch mongrel > (mongrel_rails start -e production) and all is working fine with. > > However, when I tried to set a mongrel cluster the command > mongrel_rails cluster::start get the following output : > > starting port 8000 > starting port 8001 > starting port 8002 > > But when I lunched the browser to the application url and port 8000 > for example, the mongrels seems not working. > > I looked at the log file and get for the first mongrel instance : > > ** Daemonized, any open files are closed. Look at tmp/mongrel. > 8000.pid and log/mongrel.8000.log for info. > ** Starting Mongrel listening at 0.0.0.0:8000 > ** Changing group to mongrel. > ** Changing user to mongrel. > ** Starting Rails with production environment... > ** Mounting Rails at /home/rails/projects/myapps... > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in > `gem_original_require'': no such file to load -- /home/rails/ > projects/myapps/config/environment (LoadError) > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > 30:in `require'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > rails.rb:157:in `rails'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > mongrel_rails:116:in `cloaker_'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > configurator.rb:138:in `call'' > from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/lib/mongrel/ > configurator.rb:138:in `listener'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > mongrel_rails:98:in `cloaker_'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > configurator.rb:51:in `call'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > configurator.rb:51:in `initialize'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > mongrel_rails:83:in `new'' > from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/bin/ > mongrel_rails:83:in `run'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > command.rb:211:in `run'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > mongrel_rails:248 > from /usr/bin/mongrel_rails:16:in `load'' > from /usr/bin/mongrel_rails:16 > > It''s the same thing for the two other instances. > > My mongrel cluster configuration is as follows : > > user: mongrel > group: mongrel > cwd: /home/rails/projects/myapps > log_file: log/mongrel.log > port: "8000" > environment: production > address: 127.0.0.1 > pid_file: tmp/mongrel.pid > servers: 3 > > > My server configuration is as follows : > > Linux Centos 5 > ruby 1.8.6 > rubygems 0.9.4 > Rails 1.2.3 > Mongrel Web Server 1.0.1 > mongrel_cluster 1.0.2 > nginx version: nginx/0.5.27 > > > Can anyone give help me to get this out ? > > Thanks a lot in advance > > > Addame > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users-------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070716/374cc092/attachment.html
mehdi adda
2007-Jul-16 16:39 UTC
[Mongrel] mongrel_rails start working mongrel_rails cluster::start not working
YAY ...... I finally find the problem !!!! Here''s how I proceeded ..... there are some mongrel_cluster behavior I don''t yet understand but at least it''s now working fine on my server. I checked if mongrel_rails start will work without specifying a mongrel_cluster.yml ... and yes it works !! However, in the default setting only two instances are lunched from ports 3000 and 3001. As I checked the code source of mongrel_rails, it seems that it''s merging the parameters passed to it with default ones (right ?). So I tried to overwrite only the important parameters .... like the port numbers the number of servers and the environment variable. So I modified my mongrel_cluster.yml from : user: mongrel group: mongrel cwd: /home/rails/projects/myapps log_file: log/mongrel.log port: "8000" environment: production address: 127.0.0.1 pid_file: tmp/pids/mongrel.pid servers: 3 debug: true to port: "8000" environment: production servers: 3 And now the command : mongrel_rails cluster::start -C /home/rails/projects/myapps/config/mongrel_cluster.yml et voil? tout marche bien !!! I hope that this will help some of you. Addame mongrel-users-request at rubyforge.org wrote:> Send Mongrel-users mailing list submissions to > mongrel-users at rubyforge.org > > To subscribe or unsubscribe via the World Wide Web, visit > http://rubyforge.org/mailman/listinfo/mongrel-users > or, via email, send a message with subject or body ''help'' to > mongrel-users-request at rubyforge.org > > You can reach the person managing the list at > mongrel-users-owner at rubyforge.org > > When replying, please edit your Subject line so it is more specific > than "Re: Contents of Mongrel-users digest..." > > > Today''s Topics: > > 1. mongrel_rails start working mongrel_rails cluster::start not > working (Mehdi Adda) > 2. Re: mongrel_rails start working mongrel_rails cluster::start > not working (Bill Siggelkow) > 3. mongrel_rails start working mongrel_rails (Mehdi Adda) > > > ---------------------------------------------------------------------- > > Message: 1 > Date: Mon, 16 Jul 2007 00:31:41 -0400 > From: "Mehdi Adda" <mehdi.adda at gmail.com> > Subject: [Mongrel] mongrel_rails start working mongrel_rails > cluster::start not working > To: mongrel-users at rubyforge.org > Message-ID: > <b17b768a0707152131k68aea767g7657496bebe153e2 at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Hi everybody, > > I have installed mongrel and mongrel cluster in a new linux box .... at the > end of the day I was able to lunch mongrel (mongrel_rails start -e > production) and all is working fine with. > > However, when I tried to set a mongrel cluster the command mongrel_rails > cluster::start get the following output : > > starting port 8000 > starting port 8001 > starting port 8002 > > But when I lunched the browser to the application url and port 8000 for > example, the mongrels seems not working. > > I looked at the log file and get for the first mongrel instance : > > ** Daemonized, any open files are closed. Look at tmp/mongrel.8000.pid and > log/mongrel.8000.log for info. > ** Starting Mongrel listening at 0.0.0.0:8000 > ** Changing group to mongrel. > ** Changing user to mongrel. > ** Starting Rails with production environment... > ** Mounting Rails at /home/rails/projects/myapps... > /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in > `gem_original_require'': no such file to load -- > /home/rails/projects/myapps/config/environment (LoadError) > from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in > `require'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.rb:157:in > `rails'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:116:in > `cloaker_'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in > `call'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:138:in > `listener'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:98:in > `cloaker_'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in > `call'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/configurator.rb:51:in > `initialize'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in > `new'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:83:in > `run'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/command.rb:211:in > `run'' > from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:248 > from /usr/bin/mongrel_rails:16:in `load'' > from /usr/bin/mongrel_rails:16 > > It''s the same thing for the two other instances. > > My mongrel cluster configuration is as follows : > > user: mongrel > group: mongrel > cwd: /home/rails/projects/myapps > log_file: log/mongrel.log > port: "8000" > environment: production > address: 127.0.0.1 > pid_file: tmp/mongrel.pid > servers: 3 > > > My server configuration is as follows : > > Linux Centos 5 > ruby 1.8.6 > rubygems 0.9.4 > Rails 1.2.3 > Mongrel Web Server 1.0.1 > mongrel_cluster 1.0.2 > nginx version: nginx/0.5.27 > > > Can anyone give help me to get this out ? > > Thanks a lot in advance > > > Addame > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070716/4b622447/attachment-0001.html > > ------------------------------ > > Message: 2 > Date: Mon, 16 Jul 2007 08:11:15 -0400 > From: Bill Siggelkow <bsiggelkow at mac.com> > Subject: Re: [Mongrel] mongrel_rails start working mongrel_rails > cluster::start not working > To: mongrel-users at rubyforge.org > Message-ID: <A27E6D78-6D9D-43B9-B2A0-776729889FFD at mac.com> > Content-Type: text/plain; charset="us-ascii" > > Two things I would check: > > 1) Make sure you that you are not missing any gems that your > application uses; > 2) Check to see if your application will run under webrick > > Bill Siggelkow > bsiggelkow at mac.com > AIM: siggelkowb > Home: 770-457-8854 > Mobile: 770-354-2584 > > > On Jul 16, 2007, at 12:31 AM, Mehdi Adda wrote: > > >> Hi everybody, >> >> I have installed mongrel and mongrel cluster in a new linux >> box .... at the end of the day I was able to lunch mongrel >> (mongrel_rails start -e production) and all is working fine with. >> >> However, when I tried to set a mongrel cluster the command >> mongrel_rails cluster::start get the following output : >> >> starting port 8000 >> starting port 8001 >> starting port 8002 >> >> But when I lunched the browser to the application url and port 8000 >> for example, the mongrels seems not working. >> >> I looked at the log file and get for the first mongrel instance : >> >> ** Daemonized, any open files are closed. Look at tmp/mongrel. >> 8000.pid and log/mongrel.8000.log for info. >> ** Starting Mongrel listening at 0.0.0.0:8000 >> ** Changing group to mongrel. >> ** Changing user to mongrel. >> ** Starting Rails with production environment... >> ** Mounting Rails at /home/rails/projects/myapps... >> /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in >> `gem_original_require'': no such file to load -- /home/rails/ >> projects/myapps/config/environment (LoadError) >> from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: >> 30:in `require'' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ >> rails.rb:157:in `rails'' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ >> mongrel_rails:116:in `cloaker_'' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ >> configurator.rb:138:in `call'' >> from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/lib/mongrel/ >> configurator.rb:138:in `listener'' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ >> mongrel_rails:98:in `cloaker_'' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ >> configurator.rb:51:in `call'' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ >> configurator.rb:51:in `initialize'' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ >> mongrel_rails:83:in `new'' >> from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/bin/ >> mongrel_rails:83:in `run'' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ >> command.rb:211:in `run'' >> from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ >> mongrel_rails:248 >> from /usr/bin/mongrel_rails:16:in `load'' >> from /usr/bin/mongrel_rails:16 >> >> It''s the same thing for the two other instances. >> >> My mongrel cluster configuration is as follows : >> >> user: mongrel >> group: mongrel >> cwd: /home/rails/projects/myapps >> log_file: log/mongrel.log >> port: "8000" >> environment: production >> address: 127.0.0.1 >> pid_file: tmp/mongrel.pid >> servers: 3 >> >> >> My server configuration is as follows : >> >> Linux Centos 5 >> ruby 1.8.6 >> rubygems 0.9.4 >> Rails 1.2.3 >> Mongrel Web Server 1.0.1 >> mongrel_cluster 1.0.2 >> nginx version: nginx/0.5.27 >> >> >> Can anyone give help me to get this out ? >> >> Thanks a lot in advance >> >> >> Addame >> _______________________________________________ >> Mongrel-users mailing list >> Mongrel-users at rubyforge.org >> http://rubyforge.org/mailman/listinfo/mongrel-users >> > > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070716/374cc092/attachment-0001.html > > ------------------------------ > > Message: 3 > Date: Mon, 16 Jul 2007 09:10:02 -0400 > From: "Mehdi Adda" <mehdi.adda at gmail.com> > Subject: [Mongrel] mongrel_rails start working mongrel_rails > To: mongrel-users at rubyforge.org > Message-ID: > <b17b768a0707160610l180aa726x8dc2d14659f2adf2 at mail.gmail.com> > Content-Type: text/plain; charset="iso-8859-1" > > Thanks Bill for the answer ! > > In fact, my application is working well with webrick and also with a > single mongrel instance lunched via > the command : mongrel_rails start > > When I check what is the difference in the gem loaded in both cases > (mongrel_rails start and > mongrel_rails cluster::start) it seems that mongrel_rails > cluster::start does not load all the gems that the first command is > loading. > So I think it''s related to the rails load environment, but I don''t > know how this environment is not loaded in the case of mongrel_rails > cluster::start > but loaded with mongrel_rails start. > > Do you have any idea on why mongrel_rails cluster::start is not > loading the environment ? I checked the path for the rails application > ans it''s ok > Is there any other alternative to force mongrel_rails cluster::start > to load the rails environment ? > > > Cheers, > > Addame > > > > Two things I would check: > > 1) Make sure you that you are not missing any gems that your > application uses; > 2) Check to see if your application will run under webrick > > Bill Siggelkow > bsiggelkow at mac.com <http://rubyforge.org/mailman/listinfo/mongrel-users> > AIM: siggelkowb > Home: 770-457-8854 > Mobile: 770-354-2584 > > > On Jul 16, 2007, at 12:31 AM, Mehdi Adda wrote: > > >> * Hi everybody, >> > *>* > *>* I have installed mongrel and mongrel cluster in a new linux > *>* box .... at the end of the day I was able to lunch mongrel > *>* (mongrel_rails start -e production) and all is working fine with. > *>* > *>* However, when I tried to set a mongrel cluster the command > *>* mongrel_rails cluster::start get the following output : > *>* > *>* starting port 8000 > *>* starting port 8001 > *>* starting port 8002 > *>* > *>* But when I lunched the browser to the application url and port 8000 > *>* for example, the mongrels seems not working. > *>* > *>* I looked at the log file and get for the first mongrel instance : > *>* > *>* ** Daemonized, any open files are closed. Look at tmp/mongrel. > *>* 8000.pid and log/mongrel.8000.log for info. > *>* ** Starting Mongrel listening at 0.0.0.0:8000 > *>* ** Changing group to mongrel. > *>* ** Changing user to mongrel. > *>* ** Starting Rails with production environment... > *>* ** Mounting Rails at /home/rails/projects/myapps... > *>* /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:30:in > *>* `gem_original_require'': no such file to load -- /home/rails/ > *>* projects/myapps/config/environment (LoadError) > *>* from /usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb: > *>* 30:in `require'' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > *>* rails.rb:157:in `rails'' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > *>* mongrel_rails:116:in `cloaker_'' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > *>* configurator.rb:138:in `call'' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/lib/mongrel/ > *>* configurator.rb:138:in `listener'' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > *>* mongrel_rails:98:in `cloaker_'' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > *>* configurator.rb:51:in `call'' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > *>* configurator.rb:51:in `initialize'' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > *>* mongrel_rails:83:in `new'' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel- 1.0.1/bin/ > *>* mongrel_rails:83:in `run'' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/ > *>* command.rb:211:in `run'' > *>* from /usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/ > *>* mongrel_rails:248 > *>* from /usr/bin/mongrel_rails:16:in `load'' > *>* from /usr/bin/mongrel_rails:16 > *>* > *>* It''s the same thing for the two other instances. > *>* > *>* My mongrel cluster configuration is as follows : > *>* > *>* user: mongrel > *>* group: mongrel > *>* cwd: /home/rails/projects/myapps > *>* log_file: log/mongrel.log > *>* port: "8000" > *>* environment: production > *>* address: 127.0.0.1 > *>* pid_file: tmp/mongrel.pid > *>* servers: 3 > *>* > *>* > *>* My server configuration is as follows : > *>* > *>* Linux Centos 5 > *>* ruby 1.8.6 > *>* rubygems 0.9.4 > *>* Rails 1.2.3 > *>* Mongrel Web Server 1.0.1 > *>* mongrel_cluster 1.0.2 > *>* nginx version: nginx/0.5.27 > *>* > *>* > *>* Can anyone give help me to get this out ? > *>* > *>* Thanks a lot in advance > *>* > *>* > *>* Addame > *>* _______________________________________________ > *>* Mongrel-users mailing list > *>* Mongrel-users at rubyforge.org > <http://rubyforge.org/mailman/listinfo/mongrel-users>* > -------------- next part -------------- > An HTML attachment was scrubbed... > URL: http://rubyforge.org/pipermail/mongrel-users/attachments/20070716/6b8fe3d4/attachment.html > > ------------------------------ > > _______________________________________________ > Mongrel-users mailing list > Mongrel-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/mongrel-users > > End of Mongrel-users Digest, Vol 18, Issue 6 > ******************************************** > > >