Splunk Dev

Running the Django "Create an app and add a page template" tutorial, why am I getting "Please check your SPLUNK_HOME path and try again"?

rkappler
Explorer

Running Splunk 6.2.4 on Mint 17, I'm trying to run the "Create an app and add a page template" tutorial (sorry, not enough karma to post links yet) and I get:

/opt/splunk/etc/apps/framework $ sudo ./splunkdj createapp mydjangoapp

/opt/splunk/bin/bin/splunk was not found.  Please check your SPLUNK_HOME path and try again.

I have checked my envvars:

PATH=/opt/splunk/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games ; export PATH ; HOSTNAME=inga ; export HOSTNAME ; SPLUNK_HOME=/opt/splunk ; export SPLUNK_HOME ; SPLUNK_DB=/opt/splunk/var/lib/splunk ; export SPLUNK_DB ; SPLUNK_SERVER_NAME=Splunkd ; export SPLUNK_SERVER_NAME ; SPLUNK_WEB_NAME=splunkweb ; export SPLUNK_WEB_NAME ; MONGOC_DISABLE_SHM=1 ; export MONGOC_DISABLE_SHM ; PYTHONPATH=/opt/splunk/lib/python2.7/site-packages ; export PYTHONPATH ; PYTHONHASHSEED=random ; export PYTHONHASHSEED ; NODE_PATH=/opt/splunk/lib/node_modules ; export NODE_PATH ; LD_LIBRARY_PATH=/opt/splunk/lib ; export LD_LIBRARY_PATH ; OPENSSL_CONF=/opt/splunk/openssl/openssl.cnf ; export OPENSSL_CONF ; LDAPCONF=/opt/splunk/etc/openldap/ldap.conf ; export LDAPCONF

so my path is correct. I'm pretty sure that this occurred when I tried to do this the first time and it asked me for the path, so I entered it, am thinking now I should have just hit enter? How do I undo or fix this? I've looked around and found nothing specific to this issue.

0 Karma

woodcock
Esteemed Legend

You need to check the variable under user root like this:

sudo echo $SPLUNK_HOME

Or better yet, just do this:

sudo SPLUNK_HOME=/opt/splunk; export SPLUNK_HOME; cd $SPLUNK_HOME; ./splunkdj createapp mydjangoapp
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...