First time here? Check out the FAQ!
1

askbot gunicorn 404 error

INSTALLED_APPS = ( ... "gunicorn", )

then run

python manage.py run_gunicorn

error as follows

 >python manage.py run_gunicorn 0.0.0.0:8000

2013-01-06 06:25:06 [16815] [INFO] Starting gunicorn 0.17.1
2013-01-06 06:25:06 [16815] [INFO] Listening at: http://0.0.0.0:8000 (16815)
2013-01-06 06:25:06 [16815] [INFO] Using worker: sync
2013-01-06 06:25:06 [16820] [INFO] Booting worker with pid: 16820
WARNING!!! You are using a 'locmem' (local memory) caching backend,
which is OK for a low volume site running on a single-process server.
For a multi-process configuration it is neccessary to have a production
cache system, such as redis or memcached.

With local memory caching and multi-process setup you might intermittently
see outdated content on your site.

/home/ubuntu/.virtualenvs/web/local/lib/python2.7/site-packages/coffin/common.py:73: UserWarning: Cannot translate loader: askbot.skins.loaders.Loader
  warnings.warn('Cannot translate loader: %s' % loader)
jerry_gzy's avatar
53
jerry_gzy
asked 2013-01-06 03:16:07 -0600, updated 2013-01-06 06:29:58 -0600
edit flag offensive 0 remove flag close merge delete

Comments

I'm having the same problems; does anyone know how to fix it?

kate_r's avatar kate_r (2013-05-14 09:57:14 -0600) edit
add a comment see more comments

1 Answer

0

i am not so sure this is the answer, but give it a try

there is a stackoverflow post regarding gunicorn serving statics

http://stackoverflow.com/questions/10862259/can-django-run-on-gunicorn-alone-no-apache-or-nginx

it says:

urlpatterns = patterns('',
# ... the rest of your URLconf goes here ...
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

and the askbot code says

10 
11 urlpatterns = patterns('',
12     (r'%s' % settings.ASKBOT_URL, include('askbot.urls')),
13     (r'^admin/', include(admin.site.urls)),
14     #(r'^cache/', include('keyedcache.urls')), - broken views disable for now
15     (r'^settings/', include('askbot.deps.livesettings.urls')),16     (r'^followit/', include('followit.urls')),
17     (r'^robots.txt$', include('robots.urls')),
18     url( # TODO: replace with django.conf.urls.static ?
19         r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:],
20         'django.views.static.serve',
21         {'document_root': settings.MEDIA_ROOT.replace('\\','/')},
22     ),
23 ) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
24

I am not a develper of askbot but the TODO there looks like some thing related. please let me know if my guess is on the spot, thx.

jerry_gzy's avatar
53
jerry_gzy
answered 2013-01-06 08:22:09 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments