Splunk Search

Experiencing error :splunk: command not found

tgirgis
Engager

Hi,

Kinda new to *nix o/s; its been about 10 years. Anyway I have READ the doc's and checked the answers pages, but nothing has helped me solve this problem.

This was working last week, and now it isnt.

Came in on monday morning, turned on my splunk test server (ubuntu 10.04 LTS) and splunk wont start. the error is, u guessed it from the title:

splunk: command not found.

This is the same for all the executables for the splunk service.

Yes the files are executable, I have the proper installation for my O/S, PLEASE HELP!

Labels (1)
Tags (3)
1 Solution

tgirgis
Engager

Hello,

TY, i had tried that as well and gotten an error.

for some reason I must, from /. type in sudo /opt/splunk/bin/splunk start i cannot simply cd to /opt/splunk/bin/ and then type splunk start, it doesnt work. At least I got it started.

🙂

View solution in original post

akansh
New Member

Check if you have downloaded the correct file for your OS.,I have found the real reason why this problem is coming up. If you are using the wget command from splunk website, this problem is raised because the link of file present in the box while copying is wrong.
Check after downloading that the file name should be same as as the file name started in code after 'wget -O' line.

0 Karma

araitz
Splunk Employee
Splunk Employee

On a linux OS, type:

source /opt/splunk/bin/setSplunkEnv

You can now start Splunk via the command:

splunk start

You can have your shell run the former command automagically at login so that you don't have to worry about it.

tarunchawla28
Engager

Yes, it worked. After this, "splunk " is available.

0 Karma

tgirgis
Engager

Hello,

TY, i had tried that as well and gotten an error.

for some reason I must, from /. type in sudo /opt/splunk/bin/splunk start i cannot simply cd to /opt/splunk/bin/ and then type splunk start, it doesnt work. At least I got it started.

🙂

evermmoreg
Engager

evermmoreg_0-1648639851014.png

 

0 Karma

Drainy
Champion

D'oh.
I forgot about permissions. You should just be able to run sudo from inside the bin directory aswell

Drainy
Champion

assuming a default install you need to run

[root@localhost bin]# ./splunk start

Inside the bin directory /opt/splunk/bin
The error you are seeing suggests that you may not have used the './' before the command, this is required to execute a command on a nix shell. (Not always but it would be a bit OT for me to go off about it here 🙂 )

Alek_Splunk
Engager

This worked 🙂 , we can also use the above to stop the splunk.
thanks.

0 Karma
Get Updates on the Splunk Community!

Accelerate Service Onboarding, Decomposition, Troubleshooting - and more with ITSI’s ...

Accelerate Service Onboarding, Decomposition, Troubleshooting - and more! Faster Time to ValueManaging and ...

New Release | Splunk Enterprise 9.3

Admins and Analyst can benefit from:  Seamlessly route data to your local file system to save on storage ...

2024 Splunk Career Impact Survey | Earn a $20 gift card for participating!

Hear ye, hear ye! The time has come again for Splunk's annual Career Impact Survey!  We need your help by ...