OpenInternet / copilot

An easy to use censorship simulating access point in a box
https://openinternet.github.io/copilot/
GNU Lesser General Public License v3.0
26 stars 2 forks source link

Proper testing process for an Internal Server Error #142

Open seamustuohy opened 8 years ago

seamustuohy commented 8 years ago

We need a write up the proper testing process for an Internal Server Error. It should be put on http://openinternet.github.io/copilot/developer/2016/01/09/troubleshooting.html

The short version of the debugging process for getting accurate logs of server errors is as follows. By doing the following the Copilot process should throw an exception in that process which one can use to track down the actual error their device is seeing. The 500 error is a very general status code that says that "something" is wrong with the server, the output from that command should show me what exactly is wrong.

Add the following line to the top of /home/www/copilot/instance/config.py

DEBUG = True

Then to stop copilot like so:

supervisorctl stop copilot

Then to run it from the command line so you get the error that is causing it.

cd /home/www/copilot
gunicorn --log-level debug run:app -b localhost:8000