Getting Data In
Highlighted

TypeError: 'NoneType' object is unsubscriptable when accessing thru apache

Path Finder

Hello,

For maintenance, we had to restart our linux server where Splunk is hosted, after which we get this page when accessing Splunk UI.

500 Internal Server Error
TypeError: 'NoneType' object is unsubscriptable

You are using 127.0.0.1:8000, which is connected to splunkd @85165 at https://127.0.0.1:8089 on Thu Mar 10 18:40:24 2011.

We use Splunk behind Apache, I am able to use splunk if go to Splunk URL directly (:8000), but get the above error when accessing through apache (where we have configured SSO)

I searched in this site and found nothing to help but "a very distinct behavior in the environment" could cause this problem. Also, as I see different browsers are reported, I guess its something to do the Request parameters (in my case, it could be apache).

Any help on how to identify what part of the 'environment' is causing this, is appreciated.

Thanks, Krishna

Tags (1)
0 Karma
Highlighted

Re: TypeError: 'NoneType' object is unsubscriptable when accessing thru apache

Contributor

Can you check your web_service.log file and find the stack trace that accompanies this error?

0 Karma
Highlighted

Re: TypeError: 'NoneType' object is unsubscriptable when accessing thru apache

Path Finder

Following the stack backtrace from web_service.log.

2011-03-10 18:40:24,338 DEBUG   [4d798b984d1e17b410] _cplogging:55 - [10/Mar/2011:18:40:24] HTTP Traceback (most recent call last):
  File "/opt/splunk/lib/python2.6/site-packages/cherrypy/_cprequest.py", line 606, in respond
    cherrypy.response.body = self.handler()
  File "/opt/splunk/lib/python2.6/site-packages/cherrypy/_cpdispatch.py", line 25, in __call__
    return self.callable(*self.args, **self.kwargs)
  File "/opt/splunk/lib/python2.6/site-packages/splunk/appserver/mrsparkle/lib/routes.py", line 307, in default
    return route.target(self, **kw)
  File "<string>", line 1, in <lambda>
  File "/opt/splunk/lib/python2.6/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 38, in rundecs
    return fn(*a, **kw)
  File "<string>", line 1, in <lambda>
  File "/opt/splunk/lib/python2.6/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 93, in check
    return fn(self, *a, **kw)
  File "<string>", line 1, in <lambda>
  File "/opt/splunk/lib/python2.6/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 141, in validate_ip
    return fn(self, *a, **kw)
  File "<string>", line 1, in <lambda>
  File "/opt/splunk/lib/python2.6/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 275, in preform_sso_check
    return fn(self, *a, **kw)
  File "<string>", line 1, in <lambda>
  File "/opt/splunk/lib/python2.6/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 312, in check_login
    return fn(self, *a, **kw)
  File "<string>", line 1, in <lambda>
  File "/opt/splunk/lib/python2.6/site-packages/splunk/appserver/mrsparkle/lib/decorators.py", line 333, in handle_exceptions
    return fn(self, *a, **kw)
  File "/opt/splunk/lib/python2.6/site-packages/splunk/appserver/mrsparkle/controllers/view.py", line 779, in appDispatcher
    nav, defaultView = self.getAppNav(app, views)
  File "/opt/splunk/lib/python2.6/site-packages/splunk/appserver/mrsparkle/controllers/view.py", line 178, in getAppNav
    navDefinition = et.XML(navDefinition['eai:data'], parser)
TypeError: 'NoneType' object is unsubscriptable
0 Karma
Highlighted

Re: TypeError: 'NoneType' object is unsubscriptable when accessing thru apache

Path Finder

I was able to resolve this issue; Thanks to the stack trace - I could see functions like 'preform_sso_check', 'check_login' followed by appDispatcher etc...

We started observing this issue after a switch over from Trial to Free license, and we have SSO configured with Apache (NIS auth actually). Since, SSO doesn't make sense on a free license, I suspected that setting 'REMOTE-USER' from apache could potentially fiddle with the default 'admin' user in which Splunk is running (on free mode) and the NoneType is an effect of some missing validation (in User Preferences or sth like that :)).

I commented out setting the REMOTE-USER request header in apache and Bingo! the issue is resolved.

I understand this is a negative test-case (where the configuration is not proper resulting in the NoneType error), but do you think I should report a bug for a more meaningful message, or for better handling of this scenario?

0 Karma