All Apps and Add-ons

Splunk App for VMware: Why am I unable to autostart Splunk on my VMware data collection node?

HCadmins
Communicator

I am trying to autostart Splunk on my VMware data collection node. I am in $SPLUNK_HOME/bin/

splunk enable boot-start returns Can't create RC file "/etc/init.d/splunk": Permission denied

sudo splunk enable boot-start returns sudo: splunk: command not found

I am logged in as splunkadmin

Could someone explain what's going on here?

0 Karma

twinspop
Influencer

you'll need to specify the full path to the splunk binary:

sudo /app/splunk/bin/splunk enable boot-start

For example. Replace with your path as required.

Also, do NOT forget to update the $SPLUNK_HOME/etc/splunk-launch.conf file with the appropriate username:

SPLUNK_OS_USER=splunkadmin

beatus
Communicator

HCadmins,
I'd recommend using full file paths when trying to enable boot start, such as:

sudo /opt/splunk/bin/splunk enable boot-start

Where "/opt/splunk" is "$SPLUNK_HOME", so adjust accordingly. The problem is once you run sudo you no longer have "$SPLUNK_HOME" in your environment variables.

Alternatively if you're in the correct directory you can tell sudo that the binary is in the current directory by doing:

sudo ./splunk enable boot-start

0 Karma
Get Updates on the Splunk Community!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...