#65 ✓resolved
Carl

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

    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

    macournoyer April 20th, 2008 @ 08:06 PM

    • Milestone set 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

    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

    macournoyer April 21st, 2008 @ 10:02 AM

    It's the same thing as if you

    sudo touch something.txt
    

    You won't be able to

    rm something.txt
    

    You 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 Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

People watching this ticket

Tags

Pages