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
Get Updates on the Splunk Community!

Splunk Answers Content Calendar, June Edition

Get ready for this week’s post dedicated to Splunk Dashboards! We're celebrating the power of community by ...

What You Read The Most: Splunk Lantern’s Most Popular Articles!

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

See your relevant APM services, dashboards, and alerts in one place with the updated ...

As a Splunk Observability user, you have a lot of data you have to manage, prioritize, and troubleshoot on a ...