tethys.byu.edu Server Error

9 views
Skip to first unread message

Jacob Fullerton

unread,
Nov 1, 2016, 11:00:42 AM11/1/16
to Tethys Platform
So I am working to install my tethysapp on the server and make it live on the internet. After several days and a lot of little edits and modifications, I'm now stuck on this error:
End of script output before headers: wsgi.py, referer: http://tethys.byu.edu/apps/aemdewater/

I am trying to find the source of the issue and what this exactly means. I've been looking up the documentation on the wsgi section of Django, but I still don't grasp what exactly is going wrong. What's bothersome is that my app is functional on Ubuntu 16.04, 14.04, and when Drew installed it on his testing server (also based on 16.04) there were not any problems getting the app to work once we fixed a few bugs. However, there is something different about the tethys.byu.edu server that I haven't come to understand yet.

Any help would be appreciated, and thank you very much in advance! 

Zhiyu (Drew) Li

unread,
Nov 1, 2016, 11:10:47 AM11/1/16
to Jacob Fullerton, Tethys Platform
Jacob,

Your 14.04, 16.04 are both in development mode, right?
My testing server (drew.hydromap.com) is 16.04 in production mode using nginx + gunicorn.
tethys.byu.edu is 14.04 in production mode using apache + mod_wsgi. 

I am suspecting your timml lib has some incompatibilities with apache + mod_wsgi.  
I suggest setting your local 14.04 vm to production mode using apache + mod_wsgi and see what will happen.

Thanks
Drew



--
You received this message because you are subscribed to the Google Groups "Tethys Platform" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tethysplatform+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tethysplatform/517a7d67-0838-43b3-90d5-7d85805c75a6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Jacob Fullerton

unread,
Nov 1, 2016, 1:29:20 PM11/1/16
to Tethys Platform
So after several hours of picking through the dependency files, Drew and I finally discovered the heart of the error. Though Django can properly import and read the SciPy module in python, when running in apache mode the wsgi script crashes. To correct this error, the application group environment needs to be set to %GLOBAL by using "WSGIApplicationGroup %{GLOBAL}" after the wsgi script alias (see below):

accepted
ServerName localhost
ServerAlias localhost
ServerAdmin raghav@xyz.com

<Directory /var/www/mysite/mysite>
AddHandler wsgi-script .py
Options +ExecCGI
</Directory>

DocumentRoot /var/www/mysite
WSGIDaemonProcess myproject python-path=/var/www/mysite:/var/www/environ/lib/python2.7/site-packages
#WSGIProcessGroup mysite
WSGIScriptAlias / /var/www/mysite/mysite/wsgi.py

WSGIApplicationGroup %{GLOBAL}

<Directory /var/www/mysite/mysite/>
order deny,allow
Allow from all
</Directory>

Here are links to websites that helped us to isolate the error:




swainn

unread,
Nov 1, 2016, 10:22:38 PM11/1/16
to Tethys Platform
Is this something that needs to be changed in the template for the apache wsgi config file? Seems like this issue will come up everytime someone builds an app that uses scipy.
Reply all
Reply to author
Forward
0 new messages