|
OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD. |
|
Thread Tools | Display Modes |
|
|||
isso and fastcgi
I am trying to setup isso (python comment system) on OpenBSD/httpd. It is installed fine (all dependencies installed in a virtualenv inside the httpd chroot). My problem comes with the link between httpd and isso.
Here is what I get if isso get an unix socket in /var/www/tmp/isso.sock with this httpd conf': Code:
location "/isso/*" { #root /isso strip 1 log style combined log error isso-error.log log access isso-access.log fastcgi socket "/tmp/isso.sock" } Code:
stephane@blackblock:/var/www/isso doas -u www env LANG=C.UTF-8 bin/isso -c isso.cfg run ---------------------------------------- Exception happened during processing of request from Traceback (most recent call last): File "/usr/local/lib/python2.7/SocketServer.py", line 290, in _handle_request_noblock self.process_request(request, client_address) File "/usr/local/lib/python2.7/SocketServer.py", line 318, in process_request self.finish_request(request, client_address) File "/usr/local/lib/python2.7/SocketServer.py", line 331, in finish_request self.RequestHandlerClass(request, client_address, self) File "/usr/local/lib/python2.7/SocketServer.py", line 652, in __init__ self.handle() File "/var/www/isso/lib/python2.7/site-packages/werkzeug/serving.py", line 228, in handle rv = BaseHTTPRequestHandler.handle(self) File "/usr/local/lib/python2.7/BaseHTTPServer.py", line 340, in handle self.handle_one_request() File "/var/www/isso/lib/python2.7/site-packages/werkzeug/serving.py", line 262, in handle_one_request elif self.parse_request(): File "/usr/local/lib/python2.7/BaseHTTPServer.py", line 286, in parse_request self.send_error(400, "Bad request syntax (%r)" % requestline) File "/usr/local/lib/python2.7/BaseHTTPServer.py", line 364, in send_error self.log_error("code %d, message %s", code, message) File "/var/www/isso/lib/python2.7/site-packages/werkzeug/serving.py", line 287, in log_error self.log('error', *args) File "/var/www/isso/lib/python2.7/site-packages/werkzeug/serving.py", line 293, in log _log(type, '%s - - [%s] %s\n' % (self.address_string(), File "/var/www/isso/lib/python2.7/site-packages/werkzeug/serving.py", line 278, in address_string return self.client_address[0] IndexError: string index out of range ---------------------------------------- ---------------------- Now I launch isso with a network socket, I don't see anything while loading pages : Code:
location "/isso/*" { #root /isso strip 1 log style combined log error isso-error.log log access isso-access.log fastcgi socket ":1234" #fastcgi socket "/tmp/isso.sock" } Code:
stephane@blackblock:/tmp wget http://localhost:1234/js/embed.min.js --2017-01-01 20:35:27-- http://localhost:1234/js/embed.min.js Resolving localhost (localhost)... ::1, 127.0.0.1 Connecting to localhost (localhost)|::1|:1234... failed: Connection refused. Connecting to localhost (localhost)|127.0.0.1|:1234... connected. HTTP request sent, awaiting response... 200 OK Length: 55941 (55K) [application/javascript] Saving to: 'embed.min.js' embed.min.js 100%[===============>] 54.63K --.-KB/s in 0.01s 2017-01-01 20:35:27 (4.22 MB/s) - 'embed.min.js' saved [55941/55941] I cannot figure it out : isso seems to run fine when running as a small webapp, but then httpd does not seem to forward requests. But when isso is running as a file socket, we can see httpd forward something to isso, just it does not work fine. Someone has a suggestion ? |
|
||||
I found the quickstart guide for your application. It indicates the webserver is configured via proxy, and not via FastCGI.
If this were my application, I'd install nginx and follow the quickstart guide. |
|
|||
It says also about other deployement methods, like uwsgi, fastcgi with apache...
https://posativ.org/isso/docs/extras/deployment/ I have tried to use the uwsgi method with low result, so I came back to this one I present upside, which was the closest to an actual result. (NB : I must admit I am not really up to web dev' and deploy, so I might say stupid things here, reason why I love pelican static html system. But having some commets would be great) Can't I use some more basic stuff rather than having Nginx ? Thanks for the answer. |
|
||||
It appears to me that you reported the problem to isso developers in September. They recommended you use loopback rather than a Unix socket, since loopback worked.
These examples of OpenBSD's httpd(8) with uWSGI use loopback, rather than Unix sockets. As I perceive the problem, you have two possible circumventions to your problem.
|
|
|||
I have just now made a lot of cleaning on the server. So I could try again to setup this properly. Thanks.
|
|
|||
I managed to get it to work, with a file socket !
It looks like I needed to change a bit some system settings (semaphores) and be extra carefull with which type of socket (fastcgi, not http !) I ask. I use now uwsgi + isso, managed by supervisor. |
|
|||
This semaphore thing is yet quite annoying. What would be some sane defaults if anyone knows ?
|
Tags |
httpd fastcgi, httpd.conf, python |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
httpd fastcgi configuration and programming | hanzer | OpenBSD General | 11 | 27th February 2015 01:45 PM |
php 5.3 fastcgi | Fekete | OpenBSD Packages and Ports | 5 | 16th July 2013 11:59 PM |