Thin stop acts funny with Swiftiplied servers
Reported by Carl | April 20th, 2008 @ 04:42 AM | in 0.8.2
This is all running under "root":
[root@domU-12-31-38-00-9D-28:/var/www/defensio.com/www] thin stop -C /etc/thin.conf
Stopping server on 127.0.0.1:30000:0 ...
Sending QUIT signal to process 1519 ...
>> Exiting!
/usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/daemonizing.rb:136:in `delete': Operation not permitted - /tmp/thin.0.pid (Errno::EPERM)
from /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/daemonizing.rb:136:in `remove_pid_file'
from /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/daemonizing.rb:53:in `daemonize'
from /usr/bin/thin:19
Stopping server on 127.0.0.1:30000:1 ...
Sending QUIT signal to process 30943 ...
>> Exiting!
/usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/daemonizing.rb:136:in `delete': Operation not permitted - /tmp/thin.1.pid (Errno::EPERM)
from /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/daemonizing.rb:136:in `remove_pid_file'
from /usr/lib/ruby/gems/1.8/gems/thin-0.8.1/lib/thin/daemonizing.rb:53:in `daemonize'
from /usr/bin/thin:19
Stopping server on 127.0.0.1:30000:2 ...
Sending QUIT signal to process 30967 ...
>> Exiting!
Comments and changes to this ticket
-
Carl April 20th, 2008 @ 02:18 PM
I found out why it's happening. The PID files are owned by my current user instead of the user I specified in my configuration file. The user in the config file has lower privileges.
If I chown the PID files to my "web" user, Thin can stop just fine.
-
macournoyer April 20th, 2008 @ 08:06 PM
- → Milestone changed from to 0.8.2
- → State changed from new to resolved
The pid file is created before changing the user and stopping doesn't change the current user.
Probably you started it the first time w/ another user.
Let me know if you think this is an issue in thin.
-
Carl April 20th, 2008 @ 11:19 PM
I think it's an issue that should be fixed quite frankly. As a user, I expect "stop" to stop the servers and not give me a bunch of errors because of the internals.
You could easily change the ownership of the PID files after they're created. That'd solve the problem.
-
macournoyer April 21st, 2008 @ 10:02 AM
It's the same thing as if you
sudo touch something.txtYou won't be able to
rm something.txtYou need to start and stop w/ the same user like you do w/ any web server, apache, nginx, mongrel.
And what do you mean by internals? The backtrace?
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
