List Info

Thread: mongrel_cluster and sudo to new user/group




mongrel_cluster and sudo to new user/group
country flaguser name
Germany
2007-10-18 09:35:53
I'm having trouble getting my mongrel_cluster to start up as
a specified
user/group.

If I don't have a user/group specified in
mongrel_cluster.yml, I can
start up my app with 'mongrel_rails cluster::start', no
problem.

As soon as I put a user and group in, and I do 'sudo
mongrel_rails
cluster::start', my process does NOT start up. And I get
this in my
mongrel log:

/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in

`gem_original_requi
re': no such file to load --
/home/rochkind/U2/config/environment
(LoadError)
        from
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in
`requi
re'
        from
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/lib/mongrel/rails.
rb:155:
in `rails'
[... omitted middle of stack trace -jrochkind ...]
        from
/usr/lib/ruby/gems/1.8/gems/mongrel-1.0.1/bin/mongrel_rails:
243
        from /usr/bin/mongrel_rails:18:in `load'
        from /usr/bin/mongrel_rails:18


Here's what my mongrel_cluster.yml looks like:

---
user: umlaut
group: umlaut
prefix: /utest
cwd: /home/rochkind/U2/
log_file: log/mongrel.log
port: "3001"
environment: production
pid_file: tmp/pids/mongrel.pid
servers: 1


Any ideas?  I'm at my wits end here.
-- 
Posted via http://www.ruby-forum.com
/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Deploying Rails" group.
To post to this group, send email to
rubyonrails-deploymentgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-deployment-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment
?hl=en
-~----------~----~----~----~------~----~------~--~---


Re: mongrel_cluster and sudo to new user/group
country flaguser name
Germany
2007-10-18 13:31:36
Jonathan Rochkind wrote:
> I'm having trouble getting my mongrel_cluster to start
up as a specified
> user/group.
> 
[...]
> 
>
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in

> `gem_original_require': no such file to load --
/home/rochkind/U2/config/environment (LoadError)

Answering my own question, cause I can find this question on
google, but 
not an answer:  My apps directory was not properly
accessible from the 
account I was trying to run it under. The app directories
_parent_ dir 
needed 'x' permissions for the account I was telling
mongrel_cluster to 
run as.

As a result, mongrel_cluster couldn't properly 'cd' to the
app 
directory. I figured that out by actually manually 'su'ing
to the 
account in question, and trying to start with mongrel_rails

cluster:start without a 'user:/group:' configured in the 
mongrel_cluster.yml. Under that scenario, I got an accurate
error 
message warning me of the problem. Under the other scenario
where you 
use 'sudo' and put account/group in mongrel_cluster.yml, for
some reason 
instead of getting the informative error message you get
that weird 
misdirected one that looks like a (weird) gem loading error.
But at any 
rate, I have solved my problem.

-- 
Posted via http://www.ruby-forum.com
/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Deploying Rails" group.
To post to this group, send email to
rubyonrails-deploymentgooglegroups.com
To unsubscribe from this group, send email to
rubyonrails-deployment-unsubscribegooglegroups.com
For more options, visit this group at http://groups.google.com/group/rubyonrails-deployment
?hl=en
-~----------~----~----~----~------~----~------~--~---


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )