Splunk Enterprise

Command error: 'init' is not a valid command when trying to create Search Head Cluster

Path Finder

When trying to create a Search Head Cluster on Ubuntu 20.04 with Splunk Enterprise I receive a init error.  It seems splunk is not able to use init on my system.

If I run the following command on my first search head server:

splunk_admin@server1:/opt/splunk/bin$ sudo ./splunk init

Command error: 'init' is not a valid command. Please run 'splunk help' to see the valid commands.

The full comand to intialize the search does  not work either.  I just posted the command with init since Splunk can not see it or have proper rights to it?

Other commands seem to work:

splunk_admin@server:/opt/splunk/bin$ sudo ./splunk list

Command error: Additional arguments are needed for the 'list' command. Please type "splunk help list" for usage and examples.

Running command under root:

root@server1:/opt/splunk/bin# ./splunk init

Command error: 'init' is not a valid command. Please run 'splunk help' to see the valid commands.

Splunk Enterprise is running under splunk account.

splunk_admin@server1:/opt/splunk/bin$ sudo ps -elf|grep splunkd
1 S splunk 39839 1 2 80 0 - 158573 ep_pol 08:20 ? 00:10:33 splunkd -p 8089 start
1 S splunk 39840 39839 0 80 0 - 25243 ep_pol 08:20 ? 00:00:14 [splunkd pid=39839] splunkd -p 8089 start [process-runner]
0 S splunk 40102 39840 0 80 0 - 47271 poll_s 08:20 ? 00:00:42 /opt/splunk/bin/splunkd instrument-resource-usage -p 8089 --with-kvstore
0 S splunk_+ 115584 108329 0 80 0 - 1608 pipe_w 15:22 pts/0 00:00:00 grep --color=auto splunkd

Any advice on solving this issue will be greatly appreciated. 






Labels (1)
0 Karma

Splunk Employee
Splunk Employee

sorry there was a typo in the above reply 

splunk@so2:/opt/splunk$ splunk  shcluster_config 

should read

splunk@so2:/opt/splunk$ splunk  init shcluster_config ...

0 Karma

Splunk Employee
Splunk Employee

I ran into this also and found that I had a syntax error in the command, once I fixed that it ran. I would say that the error message is misleading at best. 

This produced the "Command error: 'init' is not a valid command...."

splunk@so2:/opt/splunk$ splunk  shcluster_config 

The correct syntax in my case was  this: 

splunk@so2:/opt/splunk$ splunk init  shcluster-config....

What changed above was the _ to a - in shcluster-config 

My guess is that if any part of the command is not right,  it says "init is not invalid command." 





Tags (1)
0 Karma
Get Updates on the Splunk Community!

Devesh Logendran, Splunk, and the Singapore Cyber Conquest

At this year’s Splunk University, I had the privilege of chatting with Devesh Logendran, one of the winners in ...

There's No Place Like Chrome and the Splunk Platform

WATCH NOW!Malware. Risky Extensions. Data Exfiltration. End-users are increasingly reliant on browsers to ...

Customer Experience | Join the Customer Advisory Board!

Are you ready to take your Splunk journey to the next level? 🚀 We invite you to join our elite squad ...