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

[dev.icinga.com #11211] Permission problem after running icinga2 node wizard #3962

Closed
icinga-migration opened this issue Feb 23, 2016 · 6 comments
Labels
area/configuration DSL, parser, compiler, error handling bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

This issue has been migrated from Redmine: https://dev.icinga.com/issues/11211

Created by hostedpower on 2016-02-23 18:36:37 +00:00

Assignee: mfriedrich
Status: Resolved (closed on 2016-02-24 10:25:07 +00:00)
Target Version: 2.4.3
Last Update: 2016-02-24 10:28:50 +00:00 (in Redmine)

Icinga Version: r2.4.2-1
Backport?: Not yet backported
Include in Changelog: 1

Hi,

Just installed a new Debian Jessie with icinga2.

root@backup02:/# service icinga2 status
● icinga2.service - Icinga host/service/network monitoring system
   Loaded: loaded (/lib/systemd/system/icinga2.service; enabled)
   Active: failed (Result: exit-code) since Tue 2016-02-23 19:16:50 CET; 10min ago
  Process: 10252 ExecStart=/usr/sbin/icinga2 daemon -e ${ICINGA2_ERROR_LOG} (code=exited, status=1/FAILURE)
  Process: 10194 ExecStartPre=/usr/lib/icinga2/prepare-dirs /usr/lib/icinga2/icinga2 (code=exited, status=0/SUCCESS)
 Main PID: 10252 (code=exited, status=1/FAILURE)

Feb 23 19:16:50 backup02 icinga2[10252]: [2016-02-23 19:16:50 +0100] critical/config: Error: Error while evaluating expression: Function call 'std::ifstream::open' for file '/etc/icinga2/constants.conf' failed with erro...ermission denied'
Feb 23 19:16:50 backup02 icinga2[10252]: Location: in /etc/icinga2/icinga2.conf: 13:1-13:24
Feb 23 19:16:50 backup02 icinga2[10252]: /etc/icinga2/icinga2.conf(11):  * The constants.conf defines global constants.
Feb 23 19:16:50 backup02 icinga2[10252]: /etc/icinga2/icinga2.conf(12):  */
Feb 23 19:16:50 backup02 icinga2[10252]: /etc/icinga2/icinga2.conf(13): include "constants.conf"
Feb 23 19:16:50 backup02 icinga2[10252]: ^^^^^^^^^^^^^^^^^^^^^^^^
Feb 23 19:16:50 backup02 icinga2[10252]: /etc/icinga2/icinga2.conf(14):
Feb 23 19:16:50 backup02 icinga2[10252]: /etc/icinga2/icinga2.conf(15): /**
Feb 23 19:16:50 backup02 systemd[1]: icinga2.service: main process exited, code=exited, status=1/FAILURE
Feb 23 19:16:50 backup02 systemd[1]: Unit icinga2.service entered failed state.

root@backup02:/etc/icinga2# service icinga2 status
● icinga2.service - Icinga host/service/network monitoring system
   Loaded: loaded (/lib/systemd/system/icinga2.service; enabled)
   Active: failed (Result: exit-code) since Tue 2016-02-23 19:29:50 CET; 3s ago
  Process: 11015 ExecStart=/usr/sbin/icinga2 daemon -e ${ICINGA2_ERROR_LOG} (code=exited, status=1/FAILURE)
  Process: 10957 ExecStartPre=/usr/lib/icinga2/prepare-dirs /usr/lib/icinga2/icinga2 (code=exited, status=0/SUCCESS)
 Main PID: 11015 (code=exited, status=1/FAILURE)

Feb 23 19:29:50 backup02 icinga2[11015]: [2016-02-23 19:29:50 +0100] information/ConfigCompiler: Compiling config file: /usr/share/icinga2/include/plugins-contrib.d/vmware.conf
Feb 23 19:29:50 backup02 icinga2[11015]: [2016-02-23 19:29:50 +0100] information/ConfigCompiler: Compiling config file: /usr/share/icinga2/include/plugins-contrib.d/web.conf
Feb 23 19:29:50 backup02 icinga2[11015]: [2016-02-23 19:29:50 +0100] critical/config: Error: Error while evaluating expression: Function call 'std::ifstream::open' for file '/etc/icinga2/features-enabled/api.conf' faile...ermission denied'
Feb 23 19:29:50 backup02 icinga2[11015]: Location: in /etc/icinga2/icinga2.conf: 37:1-37:33
Feb 23 19:29:50 backup02 icinga2[11015]: /etc/icinga2/icinga2.conf(35):  * the features-enabled directory.
Feb 23 19:29:50 backup02 icinga2[11015]: /etc/icinga2/icinga2.conf(36):  */
Feb 23 19:29:50 backup02 icinga2[11015]: /etc/icinga2/icinga2.conf(37): include "features-enabled/*.conf"
Feb 23 19:29:50 backup02 icinga2[11015]: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Feb 23 19:29:50 backup02 icinga2[11015]: /etc/icinga2/icinga2.conf(38):
Feb 23 19:29:50 backup02 icinga2[11015]: /etc/icinga2/icinga2.conf(39): /**

etc etc

When looking to the files, they were modified by the wizard. Permissons are as following for all:

-rw-------  1 root   root    420 Feb 23 19:11 zones.conf
-rw-------  1 root   root    420 Feb 23 19:11 constants.conf

-rw------- 1 root   root    349 Feb 23 19:11 api.conf

After chmod 0644 for all related files icinga2 does start!

Changesets

2016-02-24 10:00:44 +00:00 by mfriedrich 47c5425

Fix permissions for temporary files

fixes #11212
fixes #11211

2016-02-24 10:27:22 +00:00 by mfriedrich a79ea88

Fix permissions for temporary files

fixes #11212
fixes #11211

2016-02-24 12:55:25 +00:00 by mfriedrich 9ba26ad

Ensure that config files are readable by the daemon

refs #11212
refs #11211

2016-02-24 13:24:08 +00:00 by mfriedrich 894aaae

Ensure that config files are readable by the daemon

refs #11212
refs #11211

2016-02-24 13:25:09 +00:00 by mfriedrich e4b99ca

Ensure that config files are readable by the daemon

refs #11212
refs #11211

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-02-24 09:58:55 +00:00

  • Relates set to 10948

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-02-24 10:01:39 +00:00

  • Status changed from New to Assigned
  • Assigned to set to mfriedrich
  • Target Version set to 2.4.3

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-02-24 10:25:07 +00:00

  • Status changed from Assigned to Resolved
  • Done % changed from 0 to 100

Applied in changeset 47c5425.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-02-24 10:28:50 +00:00

  • Subject changed from icinga2 does not start: permission problem after running icinga2 node wizard to Permission problem after running icinga2 node wizard

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-02-24 11:46:35 +00:00

  • Relates set to 11217

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-02-24 11:50:32 +00:00

  • Relates set to 11212

@icinga-migration icinga-migration added bug Something isn't working area/configuration DSL, parser, compiler, error handling labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.4.3 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/configuration DSL, parser, compiler, error handling bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant