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 #6790] Service icinga2 reload command does not cause effect #1829

Closed
icinga-migration opened this issue Jul 24, 2014 · 8 comments
Labels
bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Created by ccesario on 2014-07-24 15:38:18 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2014-07-29 09:40:04 +00:00)
Target Version: 2.0.2
Last Update: 2014-07-30 13:28:53 +00:00 (in Redmine)

Icinga Version: v2.0.1-30-gd7b6544

The icinga2 configs are reloaded only by service icinga2 restart reload command does not cause effect.

Debug log show me

[2014-07-24 10:28:17 -0300] information/Application: Got reload command: Starting new instance.
[2014-07-24 10:28:17 -0300] notice/Process: Running command '/usr/sbin/icinga2', '-c', '/etc/icinga2/icinga2.conf', '-u', 'nagios', '-g', 'nagios', '-d', '-e', '/var/log/icinga2/icinga2.err', '--no-stack-rlimit', '--reload-internal', '9550': PID 10426
[2014-07-24 10:28:17 -0300] notice/Process: PID 10426 terminated with exit code 1
[2014-07-24 10:28:17 -0300] critical/Application: Found error in config: reloading aborted
[2014-07-24 10:28:17 -0300] notice/Process: PID 10372 terminated with exit code 0

Check config and restart command show me this

# icinga2 -c /etc/icinga2/icinga2.conf  -C
[2014-07-24 10:34:46 -0300] information/icinga-app: Icinga application loader (version: v2.0.1-30-gd7b6544)
[2014-07-24 10:34:46 -0300] information/icinga-app: Loading application type: icinga/IcingaApplication
[2014-07-24 10:34:46 -0300] information/Utility: Loading library 'libicinga.so'
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Adding include search dir: /usr/share/icinga2/include
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/icinga2.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/constants.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /usr/share/icinga2/include/itl
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /usr/share/icinga2/include/command.conf
[2014-07-24 10:34:46 -0300] information/Utility: Loading library 'libmethods.so'
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /usr/share/icinga2/include/command-icinga.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /usr/share/icinga2/include/timeperiod.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /usr/share/icinga2/include/plugins
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /usr/share/icinga2/include/command-plugins.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/features-enabled/api.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/features-enabled/checker.conf
[2014-07-24 10:34:46 -0300] information/Utility: Loading library 'libchecker.so'
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/features-enabled/command.conf
[2014-07-24 10:34:46 -0300] information/Utility: Loading library 'libcompat.so'
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/features-enabled/debuglog.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/features-enabled/icingastatus.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/features-enabled/ido-mysql.conf
[2014-07-24 10:34:46 -0300] information/Utility: Loading library 'libdb_ido_mysql.so'
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/features-enabled/livestatus.conf
[2014-07-24 10:34:46 -0300] information/Utility: Loading library 'liblivestatus.so'
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/features-enabled/mainlog.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/features-enabled/notification.conf
[2014-07-24 10:34:46 -0300] information/Utility: Loading library 'libnotification.so'
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/features-enabled/perfdata.conf
[2014-07-24 10:34:46 -0300] information/Utility: Loading library 'libperfdata.so'
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/commands.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/downtimes.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/groups.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/notifications.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/services.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/templates.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/timeperiods.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/users.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/hosts/localhost.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/hosts/localhost/apt.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/hosts/localhost/disk.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/hosts/localhost/http.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/hosts/localhost/icinga.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/hosts/localhost/load.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/hosts/localhost/procs.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/hosts/localhost/ssh.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/hosts/localhost/swap.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/conf.d/hosts/localhost/users.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.d/master/custom_commands.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.d/master/generic_notifications.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.d/master/generic_services.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.d/master/generic_templates.conf
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.d/master/clientes/**/hosts/**
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.d/master/clientes/**/hosts/**
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.d/master/clientes/**/hosts/**
[2014-07-24 10:34:46 -0300] information/ConfigCompiler: Compiling config file: /etc/icinga2/zones.d/master/clientes/**/hosts/**
[2014-07-24 10:34:46 -0300] information/ConfigItem: Validating config items (step 1)...
[2014-07-24 10:34:46 -0300] information/ConfigItem: Committing config items
[2014-07-24 10:34:46 -0300] information/ConfigItem: Triggering OnConfigLoaded signal for config items
[2014-07-24 10:34:46 -0300] information/ApiListener: My API identity: icinga-master
[2014-07-24 10:34:46 -0300] information/ApiListener: Syncing zone: global-templates
[2014-07-24 10:34:46 -0300] information/ApiListener: Syncing zone: master
[2014-07-24 10:34:46 -0300] information/ApiListener: Updating configuration file: /var/lib/icinga2/api/zones/master//generic_templates.conf
[2014-07-24 10:34:46 -0300] information/ConfigItem: Evaluating 'object' rules (step 1)...
[2014-07-24 10:34:46 -0300] information/ConfigItem: Evaluating 'apply' rules...
[2014-07-24 10:34:46 -0300] warning/Service: Apply rule 'snmp-memory' for host does not match anywhere!
[2014-07-24 10:34:46 -0300] warning/Service: Apply rule 'snmp-diskspace C:' for host does not match anywhere!
[2014-07-24 10:34:46 -0300] warning/Service: Apply rule 'snmp-process DNS' for host does not match anywhere!
[2014-07-24 10:34:46 -0300] warning/Service: Apply rule 'snmp-load' for host does not match anywhere!
[2014-07-24 10:34:46 -0300] warning/Service: Apply rule 'snmp-memory page file' for host does not match anywhere!
[2014-07-24 10:34:46 -0300] warning/Service: Apply rule 'snmp-interface Intel 82574L' for host does not match anywhere!
[2014-07-24 10:34:46 -0300] information/ConfigItem: Evaluating 'object' rules (step 2)...
[2014-07-24 10:34:46 -0300] information/ConfigItem: Validating config items (step 2)...
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 2 Endpoint(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 3 Zone(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 73 CheckCommand(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 2 NotificationCommand(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 3 TimePeriod(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 1 ApiListener(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 1 CheckerComponent(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 1 ExternalCommandListener(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 2 FileLogger(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 1 IcingaStatusWriter(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 1 IdoMysqlConnection(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 2 LivestatusListener(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 1 NotificationComponent(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 1 PerfdataWriter(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 4 HostGroup(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 3 ServiceGroup(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 8 Host(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 45 Service(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 2 User(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 51 Notification(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 1 ScheduledDowntime(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 2 UserGroup(s).
[2014-07-24 10:34:46 -0300] information/ConfigItem: Checked 1 IcingaApplication(s).
[2014-07-24 10:34:46 -0300] information/icinga-app: Finished validating the configuration file(s).

As you can see, no errors in configuration.

Env. info

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=12.04
DISTRIB_CODENAME=precise
DISTRIB_DESCRIPTION="Ubuntu 12.04.4 LTS"

Changesets

2014-07-29 09:31:55 +00:00 by gbeutner ec0ae9f

Don't call setgroups() during reload

fixes #6790

Relations:

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-07-28 07:17:30 +00:00

  • Category set to libbase
  • Target Version set to 2.0.2
  • Estimated Hours set to 2

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2014-07-28 15:54:43 +00:00

Could be related to changes from #6450

Requires tests.

@icinga-migration
Copy link
Author

Updated by gvegidy on 2014-07-28 21:13:12 +00:00

Another idea would be that the new initgroups call is failing with a permission problem on reload. This was added with this patch: https://dev.icinga.org/projects/i2/repository/revisions/4cc51f990f9c741c7e8fc244561404263e816bab

Could you try it with that patch removed?

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-07-29 09:35:07 +00:00

Looks like you're right:

15281 setgroups(0, [])                  = -1 EPERM (Operation not permitted)
15281 gettimeofday({1406626316, 270265}, NULL) = 0
15281 ioctl(1, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, 0x7fffb3ca9aa0) = -1 ENOTTY (Inappropriate ioctl for device)
15281 open("/etc/localtime", O_RDONLY|O_CLOEXEC) = 7
15281 fstat(7, {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
15281 fstat(7, {st_mode=S_IFREG|0644, st_size=2309, ...}) = 0
15281 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b122dbec000
15281 read(7, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\10\0\0\0\10\0\0\0\0"..., 4096) = 2309
15281 lseek(7, -1467, SEEK_CUR)         = 842
15281 read(7, "TZif2\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\t\0\0\0\t\0\0\0\0"..., 4096) = 1467
15281 close(7)                          = 0
15281 munmap(0x2b122dbec000, 4096)      = 0
15281 fstat(1, {st_mode=S_IFIFO|0600, st_size=0, ...}) = 0
15281 mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2b122dbec000
15281 write(1, "[2014-07-29 11:31:56 +0200] crit"..., 113) = 113
15204 <... poll resumed> )              = 1 ([{fd=73, revents=POLLIN}])
15204 gettimeofday({1406626316, 272609}, NULL) = 0
15281 exit_group(1)                     = ?

@icinga-migration
Copy link
Author

Updated by tobiasvdk on 2014-07-29 09:37:48 +00:00

Is this related to #6752?

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-07-29 09:40:04 +00:00

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

Applied in changeset ec0ae9f.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2014-07-29 09:42:04 +00:00

  • Assigned to set to gbeutner

@icinga-migration
Copy link
Author

Updated by ccesario on 2014-07-30 13:28:53 +00:00

Its is fixed. Thanks!

@icinga-migration icinga-migration added bug Something isn't working libbase labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.0.2 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant