Monitoring Splunk

An error occurred while rendering the page template. See web_service.log for more details

lionel319
Explorer

Hi there,

When i did splunk start, everything goes well.
There was no error.
but when i try to go to the url in my browser, i see this message==>

"An error occurred while rendering the page template. See web_service.log for more details"

Peeking into web_service.log, i see this error. Please help

2013-08-12 14:29:36,059 ERROR   [520880cffa22fc850] __init__:281 - Mako failed to render:

Traceback (most recent call last):
  File "/ice_scratch/scratch/nf/yltan/nobackup_nf/splunk_alioth/splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/controllers/__init__.py", line 277, in render_template
    return templateInstance.render(**template_args)
  File "/tools/share/python/2.7.1/linux64/lib/python2.7/site-packages/Mako-0.5.0-py2.7.egg/mako/template.py", line 302, in render
    return runtime._render(self, self.callable_, args, data)
  File "/tools/share/python/2.7.1/linux64/lib/python2.7/site-packages/Mako-0.5.0-py2.7.egg/mako/runtime.py", line 660, in _render
    **_kwargs_for_callable(callable_, data))
  File "/tools/share/python/2.7.1/linux64/lib/python2.7/site-packages/Mako-0.5.0-py2.7.egg/mako/runtime.py", line 691, in _render_context
    (inherit, lclcontext) = _populate_self_namespace(context, tmpl)
  File "/tools/share/python/2.7.1/linux64/lib/python2.7/site-packages/Mako-0.5.0-py2.7.egg/mako/runtime.py", line 637, in _populate_self_namespace
    ret = template.module._mako_inherit(template, context)
  File "/ice_scratch/scratch/nf/yltan/nobackup_nf/splunk_alioth/splunk/share/splunk/search_mrsparkle/templates/account/login.html", line 10, in _mako_inherit
    <%namespace name="lib" file="//lib.html" import="*" />
  File "/ice_scratch/scratch/nf/yltan/nobackup_nf/splunk_alioth/splunk/share/splunk/search_mrsparkle/templates/account/login.html", line 10, in _mako_generate_namespaces
    <%namespace name="lib" file="//lib.html" import="*" />
  File "/tools/share/python/2.7.1/linux64/lib/python2.7/site-packages/Mako-0.5.0-py2.7.egg/mako/runtime.py", line 403, in __init__
    calling_uri)
  File "/tools/share/python/2.7.1/linux64/lib/python2.7/site-packages/Mako-0.5.0-py2.7.egg/mako/runtime.py", line 624, in _lookup_template
    uri = lookup.adjust_uri(uri, relativeto)
  File "/ice_scratch/scratch/nf/yltan/nobackup_nf/splunk_alioth/splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/controllers/__init__.py", line 158, in adjust_uri
    result = super(TemplateLookup, self).adjust_uri(uri, relativeto)
  File "/tools/share/python/2.7.1/linux64/lib/python2.7/site-packages/Mako-0.5.0-py2.7.egg/mako/lookup.py", line 227, in adjust_uri
    if key in self._uri_cache:
  File "/ice_scratch/scratch/nf/yltan/nobackup_nf/splunk_alioth/splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/controllers/__init__.py", line 39, in __getitem__
    return self._i18n_dict[key]
KeyError: 0
Tags (1)
0 Karma
1 Solution

sideview
SplunkTrust
SplunkTrust

This indicates one of several problems that you might have in your view XML. I run into this all the time although I'm afraid I forget what the causes actually are. They're all pretty obscure and disparate problems. It basically happens when you have configuration errors besides simple malformed XML. Like weird layoutPanel problems or certain kinds of illegal param values, will fall into this crack where it just generates that message. And unfortunately there's never, or at least almost never, any actual information in web_service.log.

The only thing you can really do is remove half the XML of the view, keeping it well-formed of course, and seeing if the problem goes away. If it does, then remove half of the half that you removed. If it doesn't, remove half of the half you did not remove. It's tedious but if you proceed with this "binary search debugging" you can isolate the individual param or attribute causing the problem within minutes.

View solution in original post

sideview
SplunkTrust
SplunkTrust

This indicates one of several problems that you might have in your view XML. I run into this all the time although I'm afraid I forget what the causes actually are. They're all pretty obscure and disparate problems. It basically happens when you have configuration errors besides simple malformed XML. Like weird layoutPanel problems or certain kinds of illegal param values, will fall into this crack where it just generates that message. And unfortunately there's never, or at least almost never, any actual information in web_service.log.

The only thing you can really do is remove half the XML of the view, keeping it well-formed of course, and seeing if the problem goes away. If it does, then remove half of the half that you removed. If it doesn't, remove half of the half you did not remove. It's tedious but if you proceed with this "binary search debugging" you can isolate the individual param or attribute causing the problem within minutes.

lionel319
Explorer

Yeah. This works for me.
What I did was
1. remove all the views
2. restart the server(it works successfully)
3. and then only i add back those views.

Thanks for the help. It really seems like this is a problem coming from one of the view xml files.

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...