Splunk Enterprise

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

mninansplunk
Path Finder

When trying to create a Search Head Cluster on Ubuntu 20.04 with Splunk Enterprise 8.2.2.2 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

tgendron_splunk
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

tgendron_splunk
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." 

 

HTH. 

 

 

Tags (1)
0 Karma
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: Character substitutions with Regular Expressions

This challenge was first posted on Slack #puzzles channelFor BORE at .conf23, we had a puzzle question which ...

Splunk Community Badges!

  Hey everyone! Ready to earn some serious bragging rights in the community? Along with our existing badges ...

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

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