Failed to start OpenShift proxy server

This is the place for queries that don't fit in any of the other categories.

Failed to start OpenShift proxy server

Postby tal » Sat Oct 12, 2013 6:33 pm

I'm trying to establish a basic transparent proxy(wsgi-proxy 0.3.0) server in OpenShift, and I failed.

Here is the wsgi/application file:
Code: Select all
#!/usr/bin/python
import os
 
virtenv = os.environ['OPENSHIFT_PYTHON_DIR'] + '/virtenv/'
os.environ['PYTHON_EGG_CACHE'] = os.path.join(virtenv, 'lib/python2.7/site-packages')
virtualenv = os.path.join(virtenv, 'bin/activate_this.py')
try:
    execfile(virtualenv, dict(__file__=virtualenv))
except IOError:
    pass
#
# IMPORTANT: Put any additional includes below this line.  If placed above this
# line, it's possible required libraries won't be in your searchable path
#
 
import wsgi_proxy
def application(environ, start_response):
 
    wsgi_proxy.app.handler(environ, start_response)
 
#
# Below for testing only
#
if __name__ == '__main__':
    from wsgiref.simple_server import make_server
    httpd = make_server('localhost', 8051, application)
    # Wait for a single request, serve it and quit.
    httpd.handle_request()


I get this error in the server:
Code: Select all
* mod_wsgi (pid=21369): Exception occurred processing WSGI script '/var/lib/openshift/5256d9cfe0b8cd7081000032/app-root/runtime/repo/wsgi/application'.
* [error] [client 127.5.51.1] TypeError: 'NoneType' object is not iterable


I opened up a help post in the OpenShift forum, but nobody replyed.
original post in OpenShift forum

Does someone know what is wrong with such proxy server?
tal
 
Posts: 3
Joined: Sat Oct 12, 2013 6:23 pm

Re: Failed to start OpenShift proxy server

Postby micseydel » Sat Oct 12, 2013 8:18 pm

I don't want to download the dependency to run your code, but we can help you if you post the exception that's probably in this file
tal wrote:/var/lib/openshift/5256d9cfe0b8cd7081000032/app-root/runtime/repo/wsgi/application
Join the #python-forum IRC channel on irc.freenode.net!

Please do not PM members regarding questions which are meant to be discussed publicly. The point of the forum is so that others can benefit from it. We don't want to help you over PMs or emails.
User avatar
micseydel
 
Posts: 1505
Joined: Tue Feb 12, 2013 2:18 am
Location: Mountain View, CA

Re: Failed to start OpenShift proxy server

Postby tal » Sun Oct 13, 2013 4:57 pm

micseydel wrote:I don't want to download the dependency to run your code, but we can help you if you post the exception that's probably in this file
tal wrote:/var/lib/openshift/5256d9cfe0b8cd7081000032/app-root/runtime/repo/wsgi/application

I don't know how to give a more detailed exception from a web server python app.
tal
 
Posts: 3
Joined: Sat Oct 12, 2013 6:23 pm


Return to General Coding Help

Who is online

Users browsing this forum: Mekire, micseydel, Nix0101, silas247, Yoriz and 6 guests