Friday, 15 January 2010

python - How to fix the daemonize import error in graphite? -



python - How to fix the daemonize import error in graphite? -

i configuring graphite monitoring system. when next tutorial on https://gist.github.com/surjikal/2777886 ran next import error:

python /opt/graphite/bin/carbon-cache.py start traceback (most recent phone call last): file "/opt/graphite/bin/carbon-cache.py", line 28, in <module> carbon.util import run_twistd_plugin file "/opt/graphite/lib/carbon/util.py", line 21, in <module> twisted.scripts._twistd_unix import daemonize importerror: cannot import name daemonize

googling around found several possible solutions issue:

1) remove daemonize imports /opt/graphite/lib/carbon/util.py (https://answers.launchpad.net/graphite/+question/239063):

from time import sleep, time twisted.python.util import initgroups twisted.scripts.twistd import runapp # twisted.scripts._twistd_unix import daemonize # daemonize = daemonize # backwards compatibility

2) utilize twisted 13.1.0 instead of higher twisted version.

3) install daemonize via pip , import directly (https://www.digitalocean.com/community/tutorials/installing-and-configuring-graphite-and-statsd-on-an-ubuntu-12-04-vps):

# twisted.scripts._twistd_unix import daemonize import daemonize

what stable , proven solution twisted environment prepare import issue?

option (2) sounds best alternative me - particularly if can find documentation graphite team twisted 13.1 beingness supported version of twisted (they should document supported versions of dependencies).

with alternative (1) you're diverging installation upstream. going admin headache.

i'm pretty sure alternative (3) won't help. daemonize module related in has same name , vaguely same thing. not drop-in replacement, though.

python twisted graphite python-daemon

No comments:

Post a Comment