DaemonForums  

Go Back   DaemonForums > OpenBSD > OpenBSD Packages and Ports

OpenBSD Packages and Ports Installation and upgrading of packages and ports on OpenBSD.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1   (View Single Post)  
Old 1st January 2017
22decembre 22decembre is offline
Port Guard
 
Join Date: Dec 2014
Posts: 42
Default 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"
                }
I load a webpage with something in isso : https://.../isso/js/embed.min.js

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
----------------------------------------
Starting httpd on debug mode shows nothing now. Other sockets (php) are not affected and running fine.

----------------------

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"
                }
But if I wget the same javascript from the localhost directly from isso, I indeed get the file :

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]
Sorry for it being quite messy (to my own taste !).

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 ?
Reply With Quote
 

Tags
httpd fastcgi, httpd.conf, python


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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


All times are GMT. The time now is 08:34 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick