Net-ng / kansha

Manage and share collaborative pinboards on the web.
http://www.kansha.org
BSD 3-Clause "New" or "Revised" License
147 stars 27 forks source link

problem with production setup #286

Closed salleman33 closed 6 years ago

salleman33 commented 6 years ago

Hi,

I followed the guide to install kansha in production, but when i execute it with the command /usr/local/kansha/bin/nagare-admin serve /usr/local/kansha/kansha.cfg and go to the URL, i have this error :

 ----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 49866)
Traceback (most recent call last):
  File "/usr/local/kansha/lib/python2.7/site-packages/Paste-2.0.3-py2.7.egg/paste/httpserver.py", line 1085, in process_request_in_thread
    self.finish_request(request, client_address)
  File "/usr/local/stackless/lib/python2.7/SocketServer.py", line 331, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/usr/local/stackless/lib/python2.7/SocketServer.py", line 652, in __init__
    self.handle()
  File "/usr/local/kansha/lib/python2.7/site-packages/Paste-2.0.3-py2.7.egg/paste/httpserver.py", line 459, in handle
    BaseHTTPRequestHandler.handle(self)
  File "/usr/local/stackless/lib/python2.7/BaseHTTPServer.py", line 340, in handle
    self.handle_one_request()
  File "/usr/local/kansha/lib/python2.7/site-packages/Paste-2.0.3-py2.7.egg/paste/httpserver.py", line 454, in handle_one_request
    self.wsgi_execute()
  File "/usr/local/kansha/lib/python2.7/site-packages/Paste-2.0.3-py2.7.egg/paste/httpserver.py", line 304, in wsgi_execute
    self.wsgi_start_response)
  File "/usr/local/kansha/lib/python2.7/site-packages/Paste-2.0.3-py2.7.egg/paste/urlmap.py", line 216, in __call__
    return app(environ, start_response)
  File "/usr/local/kansha/lib/python2.7/site-packages/kansha-2.0.4-py2.7.egg/kansha/app/comp.py", line 303, in __call__
    ret = perf.runcall(super(WSGIApp, self).__call__, environ, start_response)
  File "/usr/local/stackless/lib/python2.7/cProfile.py", line 149, in runcall
    return func(*args, **kw)
  File "/usr/local/kansha/lib/python2.7/site-packages/nagare-0.4.1.post473-py2.7.egg/nagare/wsgi.py", line 411, in __call__
    response = self.create_response(request, 'text/html' if self.always_html else str(request.accept))
  File "/usr/local/kansha/lib/python2.7/site-packages/nagare-0.4.1.post473-py2.7.egg/nagare/wsgi.py", line 299, in create_response
    return self.response_factory(accept)
  File "/usr/local/kansha/lib/python2.7/site-packages/nagare-0.4.1.post473-py2.7.egg/nagare/wsgi.py", line 40, in __init__
    accept = acceptparse.Accept(accept)
TypeError: object() takes no parameters
----------------------------------------

A second problem : i want use nginx with fastcgi, i put the config (like specified on guide), but the server always starts to listen 127.0.0.1:8080

Could you help me ?

Regards

bcroq commented 6 years ago

Duplicate of #281

salleman33 commented 6 years ago

ok, but the setup.py of kansha is only on developpment setup, right ?

bcroq commented 6 years ago

It looks like there is a problem in http://kansha.readthedocs.io/en/stable/production.html#configure-kansha-for-fcgi

http://www.nagare.org/core/publisher_file.html explains that the publisher configuration should be in another file (eg. fastcgi.cfg) and the command to serve should be:

$ <VENV_DIR>/bin/nagare-admin serve </path/to/your/kansha.cfg> -c </path/to/your/fastcgi.cfg>

bcroq commented 6 years ago

@salleman33 the commit 7cf98a0ade25ce5c61f450efbbe155cab106f3e3 changes the documentation, as you can see at http://kansha.readthedocs.io/en/latest/production.html#configure-kansha-for-fcgi

Does it fix this issue?

salleman33 commented 6 years ago

Yes, it does ! Thank you