Bug 1071201

Summary: "500 internal server error" shown when access the python-3.3 flask quickstart
Product: OpenShift Online Reporter: Yan Du <yadu>
Component: TemplatesAssignee: Vojtech Vitek <vvitek>
Status: CLOSED CURRENTRELEASE QA Contact: libra bugs <libra-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 2.xCC: hripps, mfojtik, peter_raeth, wsun
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-10-10 00:46:55 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Yan Du 2014-02-28 09:10:51 UTC
Description of problem:
Create a flask quickstart with python-3.3 and access the app in webpage. 500 internal server shown



Version-Release number of selected component (if applicable):
fork_ami_origin_cartridge_138_python_1065
devenv_4436



How reproducible:
always


Steps to Reproduce:
1. rhc app create flask33 python-3.3
cd flask
git remote add upstream -m master https://github.com/openshift/flask-example.git
git pull -s recursive -X theirs upstream master

2. Access the app url




Actual results:
App can be created, but "500 internal server error" shown when access the url



Expected results:
app can be accessed successfully without error



Additional info:
python-2.6 and 2.7 works well with flask quickstart

Comment 1 Wei Sun 2014-03-10 09:47:15 UTC
Tested this bug on devenv-stage_737,still could reproduce this bug.

Comment 2 Jakub Hadvig 2014-03-27 15:52:11 UTC
Tested on devenv_4589 and I am able to create the Flask quickstart successfully, can't reproduce the issue.

Moving to ON_QA

Comment 3 Yan Du 2014-03-28 02:44:32 UTC
Test on devenv_4595

Still show "500 internal server error" when access python-3.3 flask quickstart in webpage.

Comment 4 Jakub Hadvig 2014-04-02 11:26:41 UTC
Assigning to vvitek due to his changes in python cartridge.

Comment 5 Peter Raeth 2014-04-13 18:16:31 UTC
Using OpenShift, I tried the Flask example using Python 3.3. I also get the described error. In case it helps, here are the log entries just after I tried it:


C:\Program_Files\Git\stem\flask>rhc tail flask
[Sun Apr 13 13:54:18 2014] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:openshift_t:s0:c2,c868
[Sun Apr 13 13:54:18 2014] [notice] Digest: generating secret for digest authentication ...
[Sun Apr 13 13:54:18 2014] [notice] Digest: done
[Sun Apr 13 13:54:18 2014] [notice] Apache/2.2.15 (Unix) mod_wsgi/3.4 Python/3.3.2 configured -- resuming normal operations
- - - [13/Apr/2014:13:55:26 -0400] "OPTIONS * HTTP/1.0" 200 - "-" "Apache/2.2.15 (Red Hat) (internal dummy connection)"
[Sun Apr 13 13:55:26 2014] [notice] caught SIGWINCH, shutting down gracefully
[Sun Apr 13 13:55:49 2014] [notice] SELinux policy enabled; httpd running as context unconfined_u:system_r:openshift_t:s0:c2,c868
[Sun Apr 13 13:55:49 2014] [notice] Digest: generating secret for digest authentication ...
[Sun Apr 13 13:55:49 2014] [notice] Digest: done
[Sun Apr 13 13:55:49 2014] [notice] Apache/2.2.15 (Unix) mod_wsgi/3.4 Python/3.3.2 configured -- resuming normal operations
[Sun Apr 13 14:05:20 2014] [error] [client 127.5.175.129] mod_wsgi (pid=422462): Target WSGI script '/var/lib/openshift/534acf0ae0b8cd150f000048/app-root/r
untime/repo/wsgi/application' cannot be loaded as Python module.
[Sun Apr 13 14:05:20 2014] [error] [client 127.5.175.129] mod_wsgi (pid=422462): Exception occurred processing WSGI script '/var/lib/openshift/534acf0ae0b8
cd150f000048/app-root/runtime/repo/wsgi/application'.
[Sun Apr 13 14:05:20 2014] [error] [client 127.5.175.129] Traceback (most recent call last):
[Sun Apr 13 14:05:20 2014] [error] [client 127.5.175.129]   File "/var/lib/openshift/534acf0ae0b8cd150f000048/app-root/runtime/repo/wsgi/application", line
 17, in <module>
[Sun Apr 13 14:05:20 2014] [error] [client 127.5.175.129]     execfile(virtualenv, dict(__file__=virtualenv))
[Sun Apr 13 14:05:20 2014] [error] [client 127.5.175.129] NameError: name 'execfile' is not defined
108.87.25.106 - - [13/Apr/2014:14:05:20 -0400] "GET / HTTP/1.1" 500 629 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox/28.0"
[Sun Apr 13 14:05:20 2014] [error] [client 127.5.175.129] mod_wsgi (pid=422463): Target WSGI script '/var/lib/openshift/534acf0ae0b8cd150f000048/app-root/r
untime/repo/wsgi/application' cannot be loaded as Python module.
[Sun Apr 13 14:05:20 2014] [error] [client 127.5.175.129] mod_wsgi (pid=422463): Exception occurred processing WSGI script '/var/lib/openshift/534acf0ae0b8
cd150f000048/app-root/runtime/repo/wsgi/application'.
[Sun Apr 13 14:05:20 2014] [error] [client 127.5.175.129] Traceback (most recent call last):
[Sun Apr 13 14:05:20 2014] [error] [client 127.5.175.129]   File "/var/lib/openshift/534acf0ae0b8cd150f000048/app-root/runtime/repo/wsgi/application", line
 17, in <module>
[Sun Apr 13 14:05:20 2014] [error] [client 127.5.175.129]     execfile(virtualenv, dict(__file__=virtualenv))
[Sun Apr 13 14:05:20 2014] [error] [client 127.5.175.129] NameError: name 'execfile' is not defined
108.87.25.106 - - [13/Apr/2014:14:05:20 -0400] "GET /favicon.ico HTTP/1.1" 500 629 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox
/28.0"
[Sun Apr 13 14:05:21 2014] [error] [client 127.5.175.129] mod_wsgi (pid=422462): Target WSGI script '/var/lib/openshift/534acf0ae0b8cd150f000048/app-root/r
untime/repo/wsgi/application' cannot be loaded as Python module.
[Sun Apr 13 14:05:21 2014] [error] [client 127.5.175.129] mod_wsgi (pid=422462): Exception occurred processing WSGI script '/var/lib/openshift/534acf0ae0b8
cd150f000048/app-root/runtime/repo/wsgi/application'.
[Sun Apr 13 14:05:21 2014] [error] [client 127.5.175.129] Traceback (most recent call last):
[Sun Apr 13 14:05:21 2014] [error] [client 127.5.175.129]   File "/var/lib/openshift/534acf0ae0b8cd150f000048/app-root/runtime/repo/wsgi/application", line
 17, in <module>
[Sun Apr 13 14:05:21 2014] [error] [client 127.5.175.129]     execfile(virtualenv, dict(__file__=virtualenv))
[Sun Apr 13 14:05:21 2014] [error] [client 127.5.175.129] NameError: name 'execfile' is not defined
108.87.25.106 - - [13/Apr/2014:14:05:21 -0400] "GET /favicon.ico HTTP/1.1" 500 629 "-" "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:28.0) Gecko/20100101 Firefox
/28.0"

Comment 6 Peter Raeth 2014-04-25 17:31:38 UTC
Looking forward to being a beta tester of the proposed fix. Just let me know when you are ready for me to try it again.

Comment 7 Balazs Varga 2014-07-17 12:54:38 UTC
Fixed with https://github.com/openshift/flask-example/pull/8

@Vojtech : could you mark it as resolved?

Comment 8 Yan Du 2014-07-22 05:16:00 UTC
Test on devenv_4992, flash quikstart works well with python-3.3.

Move bug to verified. Thanks.