Splunk Enterprise

How to resolve "splunk.service could not be found"?

henryf
Explorer

Trying to install splunk on ubuntu instance within e3, I've partitioned and formatted the drive and every step works fine but whenever I get to the last step I keep running into this issue. How can I solve it?

Labels (1)
0 Karma
1 Solution

isoutamo
SplunkTrust
SplunkTrust

Hi

I add some clarifications on @danspav 's answer.

1st you must start splunk with Splunk User (I expecting that you are using this user for splunk) like

/opt/splunk/bin/splunk start --accept-license --answer-yes

Add splunk's internal admin user + password to it.

Then stop splunk and after that you must switch back to root user to enable boot start.

You could check which name is used for that service by

[root@splunk-demo-rh8] ~>
(0) # systemctl |egrep -i splunk|egrep service
Splunkd.service                                                                     loaded active running   Systemd service file for Splunk, generated by 'splunk enable boot-start'
[root@splunk-demo-rh8] ~>
(0) #

 I expecting that your name is something like splunk. If it't totally different then just ls on @danspav example and find which service file contains command splunk start.

r. Ismo

View solution in original post

henryf
Explorer

Thanks!

0 Karma

danspav
SplunkTrust
SplunkTrust

HI @henryf ,

 

I assume you've run the boot-start command to generate the service file:

./splunk enable boot-start -user splunk -systemd-managed 1

 

You can check what the service name is by looking here:

ls -l /etc/systemd/system

 

On my host it's called splunkd.service so I start splunk by running:

systemctl start splunkd

 

Make sure you match the case and name with the service file.

 

Give that a go and see if it starts. There's more info in docs:
https://docs.splunk.com/Documentation/Splunk/latest/Admin/RunSplunkassystemdservice

 

Cheers,
Daniel

isoutamo
SplunkTrust
SplunkTrust

Hi

I add some clarifications on @danspav 's answer.

1st you must start splunk with Splunk User (I expecting that you are using this user for splunk) like

/opt/splunk/bin/splunk start --accept-license --answer-yes

Add splunk's internal admin user + password to it.

Then stop splunk and after that you must switch back to root user to enable boot start.

You could check which name is used for that service by

[root@splunk-demo-rh8] ~>
(0) # systemctl |egrep -i splunk|egrep service
Splunkd.service                                                                     loaded active running   Systemd service file for Splunk, generated by 'splunk enable boot-start'
[root@splunk-demo-rh8] ~>
(0) #

 I expecting that your name is something like splunk. If it't totally different then just ls on @danspav example and find which service file contains command splunk start.

r. Ismo

Get Updates on the Splunk Community!

Tech Talk Recap | Mastering Threat Hunting

Mastering Threat HuntingDive into the world of threat hunting, exploring the key differences between ...

Observability for AI Applications: Troubleshooting Latency

If you’re working with proprietary company data, you’re probably going to have a locally hosted LLM or many ...

Splunk AI Assistant for SPL vs. ChatGPT: Which One is Better?

In the age of AI, every tool promises to make our lives easier. From summarizing content to writing code, ...