twistd scripts don't work when installed
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| | Graphite |
Fix Released
|
Undecided
|
Unassigned | |
| | graphite-web (Ubuntu) |
Undecided
|
Unassigned | ||
Bug Description
I installed the latest graphite from bazaar (v426):
mkdir -p /tmp/graphite_
cd /tmp/graphite_
bzr branch lp:graphite
pushd graphite/whisper
python setup.py install
popd
pushd graphite/carbon
python setup.py install
popd
pushd graphite
python setup.py install
popd
But when I try to rub carbon, I get an exception:
# cd /opt/graphite
# ./bin/carbon-
Traceback (most recent call last):
File "/opt/graphite/
run_
File "/opt/graphite/
config.
File "/usr/lib/
usage.
File "/usr/lib/
raise UsageError("Unknown command: %s" % sub)
twisted.
| Matt Conway (wr0ngway) wrote : | #1 |
I'll take a look.
-Nick
On Jul 18, 2011, at 10:11 AM, wr0ngway <email address hidden> wrote:
> Looks like the twisted and twisted.plugins packages are missing from
> carbon/setup.py (ant he associated __init__.py in the associated
> directories)
>
> I tried adding them in, but then util.py can't find the system installed
> twisted package - I don't know enough about python to say how to fix
> this.
>
>
> root@matt:
> Traceback (most recent call last):
> File "./bin/
> from carbon.util import run_twistd_plugin
> File "/opt/graphite/
> from twisted.python.util import initgroups
> ImportError: No module named python.util
>
> --
> You received this bug notification because you are subscribed to
> Graphite.
> https:/
>
> Title:
> twistd scripts don't work when installed
>
> Status in Graphite - Enterprise scalable realtime graphing:
> New
>
> Bug description:
> I installed the latest graphite from bazaar (v426):
>
> mkdir -p /tmp/graphite_
> cd /tmp/graphite_
> bzr branch lp:graphite
>
> pushd graphite/whisper
> python setup.py install
> popd
>
> pushd graphite/carbon
> python setup.py install
> popd
>
> pushd graphite
> python setup.py install
> popd
>
> But when I try to rub carbon, I get an exception:
>
> # cd /opt/graphite
> # ./bin/carbon-
> Traceback (most recent call last):
> File "/opt/graphite/
> run_twistd_
> File "/opt/graphite/
> config.
> File "/usr/lib/
> usage.Options.
> File "/usr/lib/
> raise UsageError("Unknown command: %s" % sub)
> twisted.
>
> To manage notifications about this bug go to:
> https:/
| Matt Conway (wr0ngway) wrote : | #3 |
As a test, I tried removing the __init__.py from the install dir /opt/graphite/
Basically, I think graphite (twisted?) relies on the plugin files being in a known package so that they get automatically loaded (my original problem). However, having them in the source tree as "packages" causes them to shadow the system package.
| Andreas Hasenack (ahasenack) wrote : | #4 |
Same happens here, carbon doesn't run, same backtrace as the OP. I'm on lucid, python 2.6.
| Nicholas Leskiw (nleskiw) wrote : | #5 |
I'm pretty sure this has been fixed. Please confirm.
If I don't hear back I'll close this bug...
| Jon Schedler - IMVU (jschedler) wrote : | #6 |
I pulled the latest head this morning and I get this error (slightly different traceback though)
root@jschedler-
Traceback (most recent call last):
File "bin/carbon-
run_
File "/opt/graphite/
config.
File "/usr/lib/
usage.
File "/usr/lib/
raise UsageError("Unknown command: %s" % sub)
twisted.
| Nicholas Leskiw (nleskiw) wrote : | #7 |
Hmmm I thought the current revision was in the high 570's are you using the 1.1 branch?
Jon Schedler - IMVU <email address hidden> wrote:
>I pulled the latest head this morning and I get this error (slightly
>different traceback though)
>
>root@jschedler
>Traceback (most recent call last):
> File "bin/carbon-
> run_twistd_
> File "/opt/graphite/
> config.
> File "/usr/lib/
> usage.Options.
> File "/usr/lib/
> raise UsageError("Unknown command: %s" % sub)
>twisted.
>
>--
>You received this bug notification because you are subscribed to
>Graphite.
>https:/
>
>Title:
> twistd scripts don't work when installed
>
>Status in Graphite - Enterprise scalable realtime graphing:
> New
>
>Bug description:
> I installed the latest graphite from bazaar (v426):
>
> mkdir -p /tmp/graphite_
> cd /tmp/graphite_
> bzr branch lp:graphite
>
> pushd graphite/whisper
> python setup.py install
> popd
>
> pushd graphite/carbon
> python setup.py install
> popd
>
> pushd graphite
> python setup.py install
> popd
>
> But when I try to rub carbon, I get an exception:
>
> # cd /opt/graphite
> # ./bin/carbon-
> Traceback (most recent call last):
> File "/opt/graphite/
> run_twistd_
> File "/opt/graphite/
> config.
> File "/usr/lib/
> usage.Options.
> File "/usr/lib/
> raise UsageError("Unknown command: %s" % sub)
> twisted.
>
>To manage notifications about this bug go to:
>https:/
| chrismd (chrismd) wrote : | #8 |
Also what version of twisted are you using?
| chrismd (chrismd) wrote : | #9 |
This was a problem with the way twisted caches modules and conflicting with the way we were importing modules. It's been fixed in trunk.
| Changed in graphite: | |
| status: | New → Fix Committed |
| Kuba Berlinski (berlinski-jakub) wrote : | #10 |
I have the same problem with v. 599.
I use Centos 6.0 image thoughtpolice:
http://
I install python (2.6.5) and other required items:
*******
dhclient eth0
yum install -y python bzr pycairo wget unzip
mkdir -p /tmp/graphite_
cd /tmp/graphite_
wget http://
wget http://
tar -zxvf Django-1.3.1.tar.gz
cd Django-1.3.1
python setup.py install
cd ..
unzip django-
cd django-
python setup.py install
cd ..
*******
... then i get the latest revision (599) from bazar:
*******
bzr branch lp:graphite
pushd graphite/whisper
python setup.py install
popd
pushd graphite/carbon
python setup.py install
popd
pushd graphite
python setup.py install
popd
*******
I try to configure and run the application:
*******
pushd /opt/graphite/conf
cp carbon.conf.example carbon.conf
cp storage-
popd
cd /opt/graphite/
python manage.py syncdb
cp local_settings.
cd /opt/graphite/
./bin/carbon-
*******
... and I get the same error message:
[root@localhost graphite]# ./bin/carbon-
Traceback (most recent call last):
File "./bin/
from carbon.util import run_twistd_plugin
File "/opt/graphite/
from twisted.python.util import initgroups
ImportError: No module named twisted.python.util
What am I missing?
| Kuba Berlinski (berlinski-jakub) wrote : | #11 |
Well, I managed to move a step further after installing Twisted and zope.interface manually...
yum install python-devel
wget http://
bunzip2 Twisted-
tar -xvf Twisted-11.0.0.tar
python setup.py install
wget http://
tar -zxvf zope.interface-
cd zope.interface-
python setup.py install
cd /opt/graphite/
[root@localhost graphite]# bin/carbon-cache.py start
Starting carbon-cache (instance a)
[root@localhost graphite]# bin/carbon-cache.py status
carbon-cache (instance a) is running with pid 1467
looks much better now...
| Michael Leinartas (mleinartas) wrote : | #12 |
Released in 0.9.9
| Changed in graphite: | |
| status: | Fix Committed → Fix Released |
| Launchpad Janitor (janitor) wrote : | #13 |
Status changed to 'Confirmed' because the bug affects multiple users.
| Ross Gammon (rosco2) wrote : | #14 |
This was apparently fixed by the Graphite project in 0.9.9. As the currently supported Ubuntu versions all have at least 0.9.12, could you please confirm whether this issue has been fixed for you?
| Changed in graphite-web (Ubuntu): | |
| status: | New → Confirmed |
| affects: | ubuntu → graphite-web (Ubuntu) |
| Changed in graphite-web (Ubuntu): | |
| status: | New → Incomplete |


Looks like the twisted and twisted.plugins packages are missing from carbon/setup.py (ant he associated __init__.py in the associated directories)
I tried adding them in, but then util.py can't find the system installed twisted package - I don't know enough about python to say how to fix this.
root@matt: /opt/graphite# ./bin/carbon- cache.py start carbon- cache.py" , line 28, in <module> lib/carbon/ util.py" , line 8, in <module>
Traceback (most recent call last):
File "./bin/
from carbon.util import run_twistd_plugin
File "/opt/graphite/
from twisted.python.util import initgroups
ImportError: No module named python.util