Skip to content
This repository has been archived by the owner on Apr 27, 2022. It is now read-only.

HTTP server unable to load haas.wsgi as python module

Sahil Tikale edited this page Feb 1, 2016 · 1 revision

Symptom:

After rebooting the HaaS server. Running a HaaS command returns 500 Internal Server Error

Checking the httpd error logs shows the following error message:
mod_wsgi (pid=2624): Exception occurred processing WSGI script '/var/www/haas/haas.wsgi'.
mod_wsgi (pid=2624): Target WSGI script '/var/www/haas/haas.wsgi' cannot be loaded as Python module.

Solution

One of the less known causes is that SELinux enforcement is not disabled. Even if it is disabled during runtime and it may set back to original value on server reboot.

To check status of SELinux enforcement do:

$> sudo getenforce <output>: Enforcing

$> sudo setenforce 0
$> sudo getenforce <output:> Permissive

Thereafter restart the httpd daemon. Test running any haas command. This time it should be successful.