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

systemd prevents splunk user from starting on port 443 #121

Closed
haidangwa opened this issue Oct 1, 2019 · 1 comment
Closed

systemd prevents splunk user from starting on port 443 #121

haidangwa opened this issue Oct 1, 2019 · 1 comment

Comments

@haidangwa
Copy link
Contributor

Cookbook version

1.7.3

Chef-client version

12+

Platform Details

centos 7 and rhel 7

Scenario:

The systemd splunk.service config uses the splunk user to start/stop/restart the service. However, it does not have permission to use port 443 (privileged port).

Steps to Reproduce:

Run server-cluster-master-centos-7 test suite in Kitchen

kitchen test server-cluster-master-centos-7

Expected Result:

Test should pass

Actual Result:

The test fails and further debugging reveals that the splunk user does not have permission to use port 443.

           ================================================================================
           Error executing action `restart` on resource 'service[splunk]'
           ================================================================================
           
           Mixlib::ShellOut::ShellCommandFailed
           ------------------------------------
           Expected process to exit with [0], but received '1'
           ---- Begin output of /bin/systemctl --system restart splunk ----
           STDOUT: 
           STDERR: Job for splunk.service failed because the control process exited with error code. See "systemctl status splunk.service" and "journalctl -xe" for details.
           ---- End output of /bin/systemctl --system restart splunk ----
           Ran /bin/systemctl --system restart splunk returned 1
           
           Resource Declaration:
           ---------------------
           # In /tmp/kitchen/cache/cookbooks/chef-splunk/recipes/service.rb
           
            84:   service 'splunk' do
            85:     supports status: true, restart: true
            86:     provider Chef::Provider::Service::Systemd
            87:     action [:enable, :start]
            88:   end
            89: else
-- Subject: Unit splunk.service has begun start-up
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit splunk.service has begun starting up.
Oct 01 15:37:36 server-cluster-master-centos-7.vagrantup.com splunk[4123]: Splunk> Be an IT superhero. Go home early.
Oct 01 15:37:36 server-cluster-master-centos-7.vagrantup.com splunk[4123]: Checking prerequisites...
Oct 01 15:37:36 server-cluster-master-centos-7.vagrantup.com splunk[4123]: Checking http port [443]: not available
Oct 01 15:37:36 server-cluster-master-centos-7.vagrantup.com splunk[4123]: ERROR: http port [443] - no permission to use address/port combi
Oct 01 15:37:36 server-cluster-master-centos-7.vagrantup.com systemd[1]: splunk.service: control process exited, code=exited status=1
Oct 01 15:37:36 server-cluster-master-centos-7.vagrantup.com systemd[1]: Failed to start Splunk.
-- Subject: Unit splunk.service has failed
@haidangwa
Copy link
Contributor Author

This was fixed in #119

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