clutchio / clutch

Server component for Clutch Framework and Clutch A/B Testing.
Apache License 2.0
395 stars 50 forks source link

Error importing middleware django_ext.middleware.log #1

Open wka opened 11 years ago

wka commented 11 years ago

I have been trying to get the clutch server up and running but am running into a problem. When I browse to http://127.0.0.1:8000/, I see an Internal Server Error in the browser. This is what I see in terminal:

$ clutch-all conf.py
Starting clutchtunnel on 127.0.0.1:41675 ...
2012-11-14 09:50:58 [868] [INFO] Starting gunicorn 0.14.6
2012-11-14 09:50:58 [868] [INFO] Listening at: http://127.0.0.1:8000 (868)
2012-11-14 09:50:58 [868] [INFO] Using worker: sync
2012-11-14 09:50:58 [869] [INFO] Booting worker with pid: 869
Starting clutchrpc on 0.0.0.0:41674 ...
2012-11-14 14:51:00 [869] [ERROR] Error handling request
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/gunicorn-0.14.6-py2.7.egg/gunicorn/workers/sync.py", line 102, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/Library/Python/2.7/site-packages/Django-1.4.1-py2.7.egg/django/core/handlers/wsgi.py", line 219, in __call__
    self.load_middleware()
  File "/Library/Python/2.7/site-packages/Django-1.4.1-py2.7.egg/django/core/handlers/base.py", line 47, in load_middleware
    raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
ImproperlyConfigured: Error importing middleware django_ext.middleware.log: "No module named middleware.log"
2012-11-14 14:51:01 [869] [ERROR] Error handling request
Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/gunicorn-0.14.6-py2.7.egg/gunicorn/workers/sync.py", line 102, in handle_request
    respiter = self.wsgi(environ, resp.start_response)
  File "/Library/Python/2.7/site-packages/Django-1.4.1-py2.7.egg/django/core/handlers/wsgi.py", line 219, in __call__
    self.load_middleware()
  File "/Library/Python/2.7/site-packages/Django-1.4.1-py2.7.egg/django/core/handlers/base.py", line 47, in load_middleware
    raise exceptions.ImproperlyConfigured('Error importing middleware %s: "%s"' % (mw_module, e))
ImproperlyConfigured: Error importing middleware django_ext.middleware.log: "No module named middleware.log"

I am running Mac OS X 10.7.5. A coworker tried this on debian wheezy and sees the same issue.

yc-huang commented 11 years ago

I have encountered the same issue; my solution is to use easy_install to install all dependencies, and then checkout the latest version to run: just git clone clutch to some directory, then cd that directory and run clutch-config and clutch-all

wka commented 11 years ago

Thanks, that worked. I already had the dependencies installed, so these are the steps I took:

$ git clone https://github.com/clutchio/clutch.git
Cloning into clutch...
remote: Counting objects: 566, done.
remote: Compressing objects: 100% (455/455), done.
remote: Total 566 (delta 101), reused 566 (delta 101)
Receiving objects: 100% (566/566), 5.74 MiB | 1.14 MiB/s, done.
Resolving deltas: 100% (101/101), done.
$ cd clutch/
$ ./bin/clutch-config > conf.py
$ ./bin/clutch-all conf.py 
Starting clutchtunnel on 127.0.0.1:41675 ...
2012-11-15 09:29:00 [1138] [INFO] Starting gunicorn 0.14.6
2012-11-15 09:29:00 [1138] [INFO] Listening at: http://127.0.0.1:8000 (1138)
2012-11-15 09:29:00 [1138] [INFO] Using worker: sync
2012-11-15 09:29:00 [1139] [INFO] Booting worker with pid: 1139
Starting clutchrpc on 0.0.0.0:41674 ...

Maybe it works this way because cd'ing into the clutch/ directory and running it from there makes django_ext/* findable by the rest of the clutch code?

sandeep758 commented 11 years ago

If the system displays

Starting clutchrpc on 0.0.0.0:41674.....

Does it mean it is started? It doesn't show up anything after that. Need some help what does it display after starting?