Installation

unable to enable boot-start in splunk forwarder for RHEL6 "Red Hat Enterprise Linux Server release 6.10 (Santiago)"

harsha
Loves-to-Learn Lots

 

It works on RHEL7 andRHEL8.

Trying to installing 8.0.2.1 version of splunk UF on "Red Hat Enterprise Linux Server release 6.10 (Santiago)".

2.6.32-754.35.1.el6.x86_64

cammand:

"{{ splunk_home }}/bin/splunk enable boot-start-user {{ splunk_user }} -systemd-managed 0 --answer-yes
--auto-ports --no-prompt --accept-license"

"stderr": "execve: No such file or directory\n while running command /sbin/chkconfig", "stderr_lines": ["execve: No such file or directory", " while running command /sbin/chkconfig"],

Labels (2)
0 Karma

harsha
Loves-to-Learn Lots

Hello,

Thanks for replying. Actually Gave root permission to user running enable boot from script from ansible. Same  ansible user as same level of permission on RHEL7 and RHEL 8. it is working on RHEL7&8. But only in few RHEL6 to some specific servers I see. this error "execve: No such file or directory\n while running command /sbin/chkconfig", "

 

Both disable and enable are not working to some RHEL6 servers.

0 Karma

harsha
Loves-to-Learn Lots

Resolution:

name: Enable splunk boot-start via initd
shell: '/usr/bin/sudo /bin/su - root -c "/opt/splunkforwarder/bin/splunk enable boot-start -user {{ splunk_user }} -systemd-managed 0 --answer-yes --auto-ports --no-prompt --accept-license"'
become: true
register: enable_bootstart changed_
when: '"Init script is configured to run at boot." in enable_bootstart.stdout'
notify:
update init.d to accept license
Reload unit files if necessary
start splunk tags: ['install']

name: "Disable boot-start"
shell: '/usr/bin/sudo /bin/su - root -c "/opt/splunkforwarder/bin/splunk disable boot-start"'
become: true
register: disable_splunk_bootstart
changed_when: '"Disabled" in disable_splunk_bootstart.stdout'
tags: ['uninstall']

0 Karma

codebuilder
Influencer

I think this is a bug in how the startup script is created. Try adding the following lines to the top of /etc/init.d/splunkforwarder (or whatever the script is named):

# chkconfig: 2345 20 80
# description: splunk start up

Then run chkconfig --add splunkforwarder

----
An upvote would be appreciated and Accept Solution if it helps!
0 Karma

codebuilder
Influencer

That means the user you are running the command under is not root or does not have sudo privileges. chkconfig is restricted functionality.

Run it as root or a sudo user and it will be fine. However, why are you disabling systemd support? Especially on RHEL7 and 8?

----
An upvote would be appreciated and Accept Solution if it helps!
0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...