Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

init.d/carbon pidfile logging prevents startup in Ubuntu #3

Closed
neutmute opened this issue Aug 31, 2012 · 4 comments
Closed

init.d/carbon pidfile logging prevents startup in Ubuntu #3

neutmute opened this issue Aug 31, 2012 · 4 comments

Comments

@neutmute
Copy link

Hi there
Thanks very much for this fabric - I'm a windows dev who knows a very small amount of Linux to get by and this enabled me to get statsd/graphite going a few months ago in my dev environment.

I just built out the production server on a clean EC2 Ubuntu Server 12.04 instance and ran into a problem where carbon wasn't starting automatically on boot. The console.log showed permission denied trying to create the /var/run/carbon/carbon.pid file.

If I remove the pidfile bits from /etc/init.d/carbon that were added in this commit:
409bd88
then it starts up fine.

Just fyi - I really don't know what the pid file is for and maybe there is good reason to have it. I'm just fumbling in the dark here in Linux :)

@neutmute
Copy link
Author

ah - I also just noticed the change to fabfile.py in that same commit.

sudo('mkdir -p /var/run/carbon')
sudo('chown -R www-data: /var/run/carbon')

I think the problem is this is nuked on reboot due to /var/run being mounted in tmpfs
http://askubuntu.com/questions/89352/does-ubuntu-periodically-clean-empty-directories-under-var-run

This would explain the permission denied issue I think.

@gingerlime
Copy link
Owner

Hi @neutmute

Thanks for reporting this. I just pushed a small change to the init.d script for carbon. Can you try this out now and see if this works better?

@neutmute
Copy link
Author

neutmute commented Sep 2, 2012

I swapped out my tweaked /init.d/carbon, put yours in and rebooted. Looks good!

02/09/2012 21:32:56 :: Server Shut Down.
02/09/2012 21:33:32 :: Log opened.
02/09/2012 21:33:32 :: twistd 12.1.0 (/usr/bin/python 2.7.3) starting up.
02/09/2012 21:33:32 :: reactor class: twisted.internet.epollreactor.EPollReactor.
02/09/2012 21:33:32 :: ServerFactory starting on 2003
02/09/2012 21:33:32 :: Starting factory <twisted.internet.protocol.ServerFactory instance at 0x1b0e3b0>
02/09/2012 21:33:32 :: ServerFactory starting on 2004
02/09/2012 21:33:32 :: Starting factory <twisted.internet.protocol.ServerFactory instance at 0x1b23170>
02/09/2012 21:33:32 :: ServerFactory starting on 7002
02/09/2012 21:33:32 :: Starting factory <twisted.internet.protocol.ServerFactory instance at 0x1b23290>

@neutmute neutmute closed this as completed Sep 2, 2012
@gingerlime
Copy link
Owner

There were also a few tweaks based on your comments into the fabfile. Once you have it installed though you only need to change the init.d script. Good to know it's working for you too.

Thanks again @neutmute

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants