Splunk Dev

Simple django binding app failed to show template

ryu_kahou
Explorer

I'm working on a app by django binding. It works fine on my windows server.
But on CentOS server when I click a nav menu the following error happens.

"The path '/ja-JP/dj/redirector//home' was not found"

Very basic error. Links to XML views works.

I installed Splunk on CentOS with rpm and I can import and search data on it.
Maybe something is wrong with Django, Python or Web Framework, but I don't know how to check it.
Please give me some hint to make djanto binding work. Thanks.

Tags (4)

ryu_kahou
Explorer

I found out why. For anyone with the same problem here is my answer.
In ${SPLUNK_HOME}/var/log/splunk/web_service.log there is a error says:

IOError: [Errno 13] Permission denied: '/opt/splunk/etc/apps/framework/.splunkdjrc_splunkweb'

If you read the source code of root.py in /opt/splunk/lib/python2.7/site-packages/splunk/appserver/mrsparkle/
you will find it tries to create config file .splunkdjrc_splunkweb if not exists.
But my framework directory is dr-xr-xr-x so appdo.py (called by root.py) failed to create a new config file.
It is simple to fix it. Give splunk write permission and restart splunkweb.

chmod u+x framework
splunk restart splunkweb

I don't know why splunk user don't have the write permission to framework directory. I installed splunk by rpm according to the following page. Maybe something is wrong with the rpm on CentOS 6.5 64bit.

http://docs.splunk.com/Documentation/Splunk/6.0.1/Installation/InstallonLinux

StephenMarwick
Explorer

Additionally, the whole framework directory tree needs permissions to allow Splunk to create the .pyo files for each .py file.

This happened to me because of how I was copying the whole tree for testing purposes.

0 Karma

mattparlette
Engager

This fixed the same problem for me, but I think you meant:
chmod u+w framework
Rather than u+x

0 Karma

MaverickT
Communicator

I know it is a long shot, that can be far away from solving your problem, but... Did you generated python project files? Before building django application you have to run:

./splunkdj createapp your_app_name

More info on this: http://dev.splunk.com/view/webframework-djangobindings/SP-CAAAEMS

0 Karma

ryu_kahou
Explorer

Yes, I created it that way.

Got questions? Get answers!

Join the Splunk Community Slack to learn, troubleshoot, and make connections with fellow Splunk practitioners in real time!

Meet up IRL or virtually!

Join Splunk User Groups to connect and learn in-person by region or remotely by topic or industry.

Get Updates on the Splunk Community!

[Puzzles] Solve, Learn, Repeat: Matching cron expressions

This puzzle (first published here) is based on matching timestamps to cron expressions.All the timestamps ...

Design, Compete, Win: Submit Your Best Splunk Dashboards for a .conf26 Pass

Hello Splunkers,  We’re excited to kick off a Splunk Dashboard contest! We know that dashboards are a primary ...

May 2026 Splunk Expert Sessions: Security & Observability

Level Up Your Operations: May 2026 Splunk Expert Sessions Whether you are refining your security posture or ...