/etc/init.d/statsd restart broken on CentOS #10

Closed
mconigliaro opened this Issue Mar 14, 2013 · 5 comments

Projects

None yet

3 participants

Contributor

# /etc/init.d/statsd restart Stopping statsd daemon: kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] [FAILED]

It looks like this is being caused by the "pid=" line in the "stop" function:

pid=$(ps aux | grep stats.js | grep nodejs | awk '{print $2}')

That grep nodejs doesn't match anything. Are you trying to match on the username? If so, that should be grep statsd.

Owner

Will try to take a look at this over the weekend, but wanted to ping @ChrisLundquist because he added support for init.d.

Contributor

I'm still working on a complete fix, but I found another problem. On CentOS 6.4, Defaults requiretty is set by default in /etc/sudoers, which prevents sudo from being used in an init script. You end up with this error in /var/log/statsd.log when Chef tries to start the service:

sudo: sorry, you must have a tty to run sudo

Contributor

We should probably use daemon from init functions which I learned about from somewhere recently.

Owner

@ChrisLundquist can you elaborate on use of daemon?

Owner

Fixed by PR #11.

@hectcastro hectcastro closed this Mar 16, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment