Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Thin stop acts funny with Swiftiplied servers

#65

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!

Reported by Carl · April 20th, 2008 @ 04:42 AM

State: resolved
Milestone: 0.8.2
Assigned to: macournoyer macournoyer

Activity

  1. Carl
    Carl

    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.

    April 20th, 2008 @ 02:18 PM

  2. macournoyer
    macournoyer
    • 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.

    April 20th, 2008 @ 08:06 PM

  3. Carl
    Carl

    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.

    April 20th, 2008 @ 11:19 PM

  4. macournoyer
    macournoyer

    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?

    April 21st, 2008 @ 10:02 AM

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.