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
SplunkTrust
SplunkTrust

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
SplunkTrust
SplunkTrust

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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...