Hi,
I'm in process of enabling SplunkJS Stack as per this link (Splunk 6.0.1)
I was able to install "myWebApp" successfully using..
/opt/splunk/etc/apps/framework/splunkdj createapp myWebApp
But when I'm running the app via GUI, it throws error..
Traceback (most recent call last):
File "/opt/splunk/lib/python2.7/site-packages/cherrypy/wsgiserver/__init__.py", line 1237, in communicate
req.respond()
File "/opt/splunk/lib/python2.7/site-packages/cherrypy/wsgiserver/__init__.py", line 554, in respond
self._respond()
File "/opt/splunk/lib/python2.7/site-packages/cherrypy/wsgiserver/__init__.py", line 566, in _respond
response = self.wsgi_app(self.environ, self.start_response)
File "/opt/splunk/lib/python2.7/site-packages/cherrypy/_cptree.py", line 239, in __call__
return app(environ, start_response)
File "/opt/splunk/lib/python2.7/site-packages/django/core/handlers/wsgi.py", line 255, in __call__
response = self.get_response(request)
File "/opt/splunk/lib/python2.7/site-packages/django/core/handlers/base.py", line 178, in get_response
response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
File "/opt/splunk/etc/apps/framework/server/splunkdj/management/commands/runwsgiserver.py", line 189, in handle_uncaught_exception
return super(LoggingWSGIHandler, self).handle_uncaught_exception(request, resolver, exc_info, *args, **kwargs)
File "/opt/splunk/lib/python2.7/site-packages/django/core/handlers/base.py", line 220, in handle_uncaught_exception
if resolver.urlconf_module is None:
File "/opt/splunk/lib/python2.7/site-packages/django/core/urlresolvers.py", line 342, in urlconf_module
self._urlconf_module = import_module(self.urlconf_name)
File "/opt/splunk/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
__import__(name)
File "/opt/splunk/etc/apps/framework/server/urls.py", line 114, in <module>
jsurls.create_javascript_urlpatterns()
File "/opt/splunk/etc/apps/framework/server/splunkdj/utility/jsurls.py", line 83, in create_javascript_urlpatterns
makedirs(dirpath)
File "/opt/splunk/lib/python2.7/os.py", line 157, in makedirs
mkdir(name, mode)
OSError: [Errno 13] Permission denied: '/opt/splunk/etc/apps/framework/server/static/JS_CACHE'
Btw, I've checked permission for directories and as far as i can see all are fine.
I'm not sure if any of you guys have seen it. IF yes, any solution?
Found the issue.
It is a bug.
Not sure if the splunkdj needs to change or something else.
(Permissions from /opt/splunk/etc/apps/framework/ does not have write access to splunk user)
Resolved by doing chmod -R 775 on /opt/splunk/etc/apps/framework/server/static and checking that the folder is owned by splunk:splunk
Found the issue.
It is a bug.
Not sure if the splunkdj needs to change or something else.
(Permissions from /opt/splunk/etc/apps/framework/ does not have write access to splunk user)
Do you have the bug ID? How did you resolve the issue?
This is a permission error. OSError is returned when Python can't get permissions to access, change or create a filesystem object.
Double check the permissions to make they are as you expect. Bear in mind that this is invoked by the python interpreter that comes with Splunk and can sometimes throw some wobblers with permissions errors like this.