503 Service Temporarily Unavailable in Openshift Flask Application
<p>I've been struggling to deploy a Flask application in Openshift. First of all, I tried to deploy an application I am developing. As I didn't succeed, I decided to create a sample Hello World and deploy it.</p>

<p>Here is the code of app.py</p>

<pre><code>from flask import Flask, render_template
app = Flask(__name__)


@app.route('/')
def hello_world():
    return render_template('index.html')

if __name__ == '__main__':
    app.run()
</code></pre>

<p>I do use the install_requirements in setup.py file:</p>

<pre><code>from setuptools import setup

setup(name='SweetyPro',
     version='1.0',
     description='OpenShift App',
     author='Your Name',
     author_email='waglds@gmail.com',
     url='http://www.python.org/sigs/distutils-sig/',
     install_requires=['Django&gt;=1.3',
                      'Flask==0.11.1'],    )
</code></pre>

<p>I also set up flask and a requirement in requirements.txt. However, Openshift only says it is a Service Temporarily Unavailable. </p>

<p>I checked out the log through <strong>rhc tail -a my_application</strong>, and it prompts me this:</p>

<pre><code>==&gt; app-root/logs/python.log &lt;==
Traceback (most recent call last):
  File "app.py", line 10, in &lt;module&gt;
    app.run()
  File "/var/lib/openshift/57976d4c7628e1a34e000179/python/virtenv/lib/python2.7/site-packages/Flask-0.11.1-py2.7.egg/flask/app.py", line 843, in run
    run_simple(host, port, self, **options)
  File "/var/lib/openshift/57976d4c7628e1a34e000179/python/virtenv/lib/python2.7/site-packages/Werkzeug-0.11.10-py2.7.egg/werkzeug/serving.py", line 694, in run_simple
    inner()
  File "/var/lib/openshift/57976d4c7628e1a34e000179/python/virtenv/lib/python2.7/site-packages/Werkzeug-0.11.10-py2.7.egg/werkzeug/serving.py", line 656, in inner
    fd=fd)
  File "/var/lib/openshift/57976d4c7628e1a34e000179/python/virtenv/lib/python2.7/site-packages/Werkzeug-0.11.10-py2.7.egg/werkzeug/serving.py", line 550, in make_server
    passthrough_errors, ssl_context, fd=fd)
  File "/var/lib/openshift/57976d4c7628e1a34e000179/python/virtenv/lib/python2.7/site-packages/Werkzeug-0.11.10-py2.7.egg/werkzeug/serving.py", line 464, in __init__
    HTTPServer.__init__(self, (host, int(port)), handler)
  File "/opt/rh/python27/root/usr/lib64/python2.7/SocketServer.py", line 419, in __init__
    self.server_bind()
  File "/opt/rh/python27/root/usr/lib64/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/opt/rh/python27/root/usr/lib64/python2.7/SocketServer.py", line 430, in server_bind
    self.socket.bind(self.server_address)
  File "/opt/rh/python27/root/usr/lib64/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.error: [Errno 13] Permission denied
</code></pre>

<p>Could anyone help me out, please? I already did what I could. Thank you!</p>