Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splunk restarting on every run because of mgmt port #213

Open
yocally opened this issue Aug 4, 2021 · 0 comments
Open

Splunk restarting on every run because of mgmt port #213

yocally opened this issue Aug 4, 2021 · 0 comments

Comments

@yocally
Copy link

yocally commented Aug 4, 2021

πŸ‘» Brief Description

Every time the cookbook is run, Splunk is being restarted.

πŸ₯ž Cookbook version

Version: 7.2.1

πŸ‘©β€πŸ³ Chef-Infra Version

Version: 15.4.45

🎩 Platform details

RHEL 8.4

Steps To Reproduce

It seems that any combination of options causes this, as long as Splunk is enabled.

πŸš“ Expected behavior

update-splunk-mgmt-port would see that the management port does not need to be updated, and wouldn't update and restart.

βž• Additional context

I've run the same command used here to make sure the management port matches my configuration, and it does except for a leading whitespace, which I would assume is removed with the strip function. chef-client -l debug doesn't show the values that are being compared, so I'm not sure what's actually happening. I've also verified that my Splunk user's password doesn't contain spaces.

  * execute[update-splunk-mgmt-port] action run[2021-08-04T19:25:32+00:00] INFO: Processing execute[update-splunk-mgmt-port] action run (chef-splunk::server line 26)
Splunkd port: 8089

    [execute] The server's splunkd port has been changed.
              Restart the server with the command "splunk restart". Until the server restarts, many commands will fail with the error "splunkd is not running."
              You need to restart the Splunk Server (splunkd) for your changes to take effect.
[2021-08-04T19:25:33+00:00] INFO: execute[update-splunk-mgmt-port] ran successfully
    - execute su - splunk -c '/opt/splunk/bin/splunk set splunkd-port 8089 -auth '<redacted>:<redacted>''
[2021-08-04T19:25:34+00:00] INFO: execute[update-splunk-mgmt-port] sending restart action to service[splunk] (delayed)
[2021-08-04T19:25:34+00:00] INFO: service[splunk] running why-run restart action to support before action
Recipe: chef-splunk::service
  * service[splunk] action restart[2021-08-04T19:25:34+00:00] INFO: Processing service[splunk] action restart (chef-splunk::service line 101)
splunkd is running (PID: 411256).
splunk helpers are running (PIDs: 411308 411354 411485 411487 412018).
enabled

    * Service status not available. Assuming a prior action would have installed the service.
    * Assuming status of not running.
    - Would restart service service[splunk]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant