← Back to team overview

openstack team mailing list archive

Re: Folsom Horizon: 500 Internal Server Error

 

On 10/07/2012 06:33 AM, Chandra Kamalakantha wrote:
Hi,

Has anyone able to get past the "500 Internal Server Error " with
Horizon (Folsom).

I have applied work around described in
https://bugs.launchpad.net/horizon/+bug/1036571 but still getting the error
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]
ImproperlyConfigured: Error importing template source loader
horizon.loaders.TemplateLoader: "No module named loaders"


Yes, I have seen this error, too. For me, it was possible to fix it using the following patch:

[mrunge@turing python-django-horizon (master)]$ cat python-django-horizon-template_conf.patch diff --git a/horizon/templates/horizon/_conf.html b/horizon/templates/horizon/_conf.html
index 2dc70fa..e5ee2ac 100644
--- a/horizon/templates/horizon/_conf.html
+++ b/horizon/templates/horizon/_conf.html
@@ -3,6 +3,7 @@
 {% compress js %}
<script src='{{ STATIC_URL }}horizon/js/horizon.js' type='text/javascript' charset='utf-8'></script> <script src='{{ STATIC_URL }}horizon/js/horizon.conf.js' type='text/javascript' charset='utf-8'></script>
+{% endcompress %}
 <script type='text/javascript' charset='utf-8'>
 /* Storage for backend configuration variables which the frontend
  * should be aware of.
@@ -13,4 +14,4 @@ horizon.conf.ajax = {
   queue_limit: {{ HORIZON_CONFIG.ajax_queue_limit|default:"null" }}
 };
 </script>
-{% endcompress %}
+



Here is the full error

[Sun Oct 07 04:16:56 2012] [error]
/usr/lib/python2.7/dist-packages/horizon/api/glance.py:30: UserWarning:
The 'glance.client' module is deprecated in favor of the 'glanceclient'
module provided by python-glanceclient (see
http://github.com/openstack/python-glanceclient).
[Sun Oct 07 04:16:56 2012] [error]   from glance import client as
glance_client
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1] mod_wsgi
(pid=32705): Exception occurred processing WSGI script
'/usr/share/openstack-dashboard/openstack_dashboard/wsgi/django.wsgi'.
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1] Traceback (most
recent call last):
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/dist-packages/django/core/handlers/wsgi.py", line
241, in __call__
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]     response =
self.get_response(request)
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line
179, in get_response
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]     response =
self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/dist-packages/django/core/handlers/base.py", line
228, in handle_uncaught_exception
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]     return
callback(request, **param_dict)
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/dist-packages/django/utils/decorators.py", line 91,
in _wrapped_view
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]     response =
view_func(request, *args, **kwargs)
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/dist-packages/django/views/defaults.py", line 32, in
server_error
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]     t =
loader.get_template(template_name) # You need to create a 500.html template.
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/dist-packages/django/template/loader.py", line 145,
in get_template
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]     template,
origin = find_template(template_name)
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/dist-packages/django/template/loader.py", line 128,
in find_template
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]     loader =
find_template_loader(loader_name)
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]   File
"/usr/lib/python2.7/dist-packages/django/template/loader.py", line 97,
in find_template_loader
[Sun Oct 07 04:16:56 2012] [error] [client 127.0.0.1]     raise
ImproperlyConfigured('Error importing template source loader %s: "%s"' %
(loader, e))

Thanks a lot.

Regards,
Chandra


_______________________________________________
Mailing list: https://launchpad.net/~openstack
Post to     : openstack@xxxxxxxxxxxxxxxxxxx
Unsubscribe : https://launchpad.net/~openstack
More help   : https://help.launchpad.net/ListHelp




References