passenger setup oddities

179 views
Skip to first unread message

Erick J

unread,
May 15, 2012, 2:43:03 AM5/15/12
to Phusion Passenger Discussions
Hey all,

I just did my first passener deployment this week and I have to say
it's a fantastic new way to work with my ruby applications, I really
love it. I have a few questions about my setup though. First is in
regards to user switching - I've read the user guides and came across
this post - http://groups.google.com/group/phusion-passenger/browse_thread/thread/53309c85b10513ac
- which answered my main issues but I still don't have everything
exact. Here are my questions:

1. with the following apache configuration (below) and ps output why
does PassengerWatchdog run as root? Why does PassengerLoggingAgent
run as nobody? Is there anyway to get all processes running as the
same user?

2. i've followed the gem install/passenger-install-apache2-module
route. there seem to be a few weird issues with my install (although
my app is working without issue):
- issue 1 is that "passenger-status" seems to believe passenger is
not running - is "passenger-status" only useful for standalone
passenger deployments?
- issue 2 - I can't seem to touch a restart.txt file to restart the
passenger processes no matter what I set PassengerRestartDir to. any
known issues with that?

Thanks

Erick Johnson

following are some relevant configs/data for questions above

[root@dev2 io.vos]# gem list | grep passenger
passenger (3.0.12)

[root@dev2 io.vos]# cat /etc/httpd/conf.d/passenger.conf
LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p194/gems/
passenger-3.0.12/ext/apache2/mod_passenger.so
PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p194/gems/
passenger-3.0.12
PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p194/ruby
PassengerUserSwitching off
PassengerUser apache
PassengerGroup apache
PassengerDefaultUser apache
PassengerDefaultGroup apache

[root@dev2 io.vos]# ps auxw | grep -i passenger
root 19648 0.0 0.7 213916 1844 ? Ssl 06:25 0:00
PassengerWatchdog
apache 19651 0.0 0.8 290356 2156 ? Sl 06:25 0:00
PassengerHelperAgent
apache 19653 0.2 3.4 112584 8416 ? Sl 06:25 0:00
Passenger spawn server
nobody 19656 0.0 1.5 148060 3772 ? Sl 06:25 0:00
PassengerLoggingAgent

[root@dev2 io.vos]# passenger-status -v
----------- General information -----------
max = 6
count = 0
active = 0
inactive = 0
Waiting on global queue: 0

----------- Application groups -----------
[root@dev2 io.vos]#

----------- Application groups -----------

Hongli Lai

unread,
May 17, 2012, 8:22:32 AM5/17/12
to phusion-...@googlegroups.com
On Tuesday, May 15, 2012, Erick J wrote:
Hey all,

I just did my first passener deployment this week and I have to say
it's a fantastic new way to work with my ruby applications, I really
love it.  I have a few questions about my setup though.  First is in
regards to user switching - I've read the user guides and came across
this post - http://groups.google.com/group/phusion-passenger/browse_thread/thread/53309c85b10513ac
- which answered my main issues but I still don't have everything
exact.  Here are my questions:

1. with the following apache configuration (below) and ps output why
does PassengerWatchdog run as root?  Why does PassengerLoggingAgent
run as nobody?  Is there anyway to get all processes running as the
same user?

Watchdog runs as root because it must spawn processes that run as different users, namely the helperagent and the logging agent. You can configure the logging agent's user by setting PassengerAnalyticsUser (or something. I am on my ipad and cannot check the code)
At present, the only way to get the watchdog to run as non-root is by running apache as non-root.
 

2. i've followed the gem install/passenger-install-apache2-module
route.  there seem to be a few weird issues with my install (although
my app is working without issue):
 - issue 1 is that "passenger-status" seems to believe passenger is
not running - is "passenger-status" only useful for standalone
passenger deployments?

No. Passenger for apache writes some status files to /tmp. Passenger-status determines whether passenger is running by inspecting those files. If it cannot access /tmp, or if $TMPDIR does not point to /tmp, then passenger-status may not work corrctly. Try running passenger-status as root or st $TMPDIR properly.
 
 - issue 2 - I can't seem to touch a restart.txt file to restart the
passenger processes no matter what I set PassengerRestartDir to.  any
known issues with that?

Does the helperagent have enough permissions to check the metadata of our restart.txt?



--
Phusion | Ruby & Rails deployment, scaling and tuning solutions

Web: http://www.phusion.nl/
E-mail: in...@phusion.nl
Chamber of commerce no: 08173483 (The Netherlands)
Reply all
Reply to author
Forward
0 new messages