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 #7880] Reload does not work on Windows #2352

Closed
icinga-migration opened this issue Nov 27, 2014 · 26 comments
Closed

[dev.icinga.com #7880] Reload does not work on Windows #2352

icinga-migration opened this issue Nov 27, 2014 · 26 comments
Labels
area/distributed Distributed monitoring (master, satellites, clients) bug Something isn't working
Milestone

Comments

@icinga-migration
Copy link

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

Created by DreiIT on 2014-11-27 20:15:36 +00:00

Assignee: gbeutner
Status: Resolved (closed on 2015-08-31 14:40:33 +00:00)
Target Version: 2.3.9
Last Update: 2015-08-31 14:40:33 +00:00 (in Redmine)

Icinga Version: 2.2.3
Backport?: Already backported

Following procedure:

  1. Change the config file of a specific zone. In this example the zone's name is ws1.3it.loc
  2. service icinga reload
  3. In the Agent log the new configuration change was detected an successfully downloaded, but reload was denied
  4. When restarting the Agent manually everything works fine
[2014-11-27 21:04:18 Mitteleuropäische Zeit] information/ApiListener: New client connection for identity 'mon3.3it.loc'
[2014-11-27 21:04:18 Mitteleuropäische Zeit] information/ApiListener: Updating configuration file: C:\Program Files\ICINGA2\var/lib/icinga2/api/zones/ws1.3it.loc//ws1.3it.loc.conf
[2014-11-27 21:04:18 Mitteleuropäische Zeit] information/ApiListener: Restarting after configuration change.
[2014-11-27 21:04:20 Mitteleuropäische Zeit] information/Application: Got reload command: Starting new instance.
[2014-11-27 21:04:21 Mitteleuropäische Zeit] critical/Application: Found error in config: reloading aborted

[2014-11-27 21:07:10 Mitteleuropäische Zeit] information/Application: Shutting down Icinga...
[2014-11-27 21:07:10 Mitteleuropäische Zeit] information/CheckerComponent: Checker stopped.
[2014-11-27 21:07:12 Mitteleuropäische Zeit] information/ConfigItem: Activated all objects.
[2014-11-27 21:07:12 Mitteleuropäische Zeit] information/ApiClient: Reconnecting to API endpoint 'mon3.3it.loc' via host 'mon3.3it.loc' and port '5665'
[2014-11-27 21:07:12 Mitteleuropäische Zeit] information/ApiListener: New client connection for identity 'mon3.3it.loc'

Changesets

2015-08-10 13:28:31 +00:00 by (unknown) 7890e20

Implement reload functionality for Windows

fixes #7880

2015-08-31 14:07:35 +00:00 by (unknown) 35f33b5

Implement reload functionality for Windows

fixes #7880

2015-09-04 13:37:53 +00:00 by (unknown) 35bc567

Implement reload functionality for Windows

refs #7880
fixes #10051

Relations:

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-01-12 10:32:32 +00:00

  • Status changed from New to Feedback
  • Assigned to set to DreiIT

Can you please re-test that against the latest snapshot package?

@icinga-migration
Copy link
Author

Updated by DreiIT on 2015-01-13 09:20:25 +00:00

In short, it's still not working (version: v2.2.0-283-gfd6cdbb).

But the output changed a little:

[2015-01-13 10:09:51 W. Europe Standard Time] notice/Process: Running command '"C:\Program Files (x86)\ICINGA2\sbin\icinga2.exe" "--scm" "daemon" "--reload-internal" "8132"': PID 9632
[2015-01-13 10:09:51 W. Europe Standard Time] notice/Process: PID 9632 ('"C:\Program Files (x86)\ICINGA2\sbin\icinga2.exe" "--scm" "daemon" "--reload-internal" "8132"') terminated with exit code 1
[2015-01-13 10:09:51 W. Europe Standard Time] critical/Application: Found error in config: reloading aborted

When the Icinga2 service is restarted manually, it works.

Just a thought: Is is possible that the reload process fails, because there where warnings by the configuration validator?
Output of sbin\icinga2.exe daemon -C:

information/cli: Icinga application loader (version: v2.2.0-283-gfd6cdbb)
information/cli: Loading application type: icinga/IcingaApplication
information/Utility: Loading library 'icinga.dll'
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc/icinga2/icinga2.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2/constants.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2/zones.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\share\icinga2\include/itl
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\share\icinga2\include/plugins
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2\features-enabled/api.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\share\icinga2\include/command.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2\features-enabled/checker.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\share\icinga2\include/command-plugins.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\share\icinga2\include/command-icinga.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2\features-enabled/mainlog.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2\features-enabled\..\features-available/api.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2\features-enabled/notification.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\share\icinga2\include/timeperiod.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2\features-enabled\..\features-available/checker.conf
information/Utility: Loading library 'methods.dll'
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2\features-enabled\..\features-available/mainlog.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2/conf.d/commands.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2/conf.d/downtimes.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2\features-enabled\..\features-available/notification.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2/conf.d/groups.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2/conf.d/hosts.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2/conf.d/notifications.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2/conf.d/satellite.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2/conf.d/services.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2/conf.d/templates.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2/conf.d/timeperiods.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\etc\icinga2/conf.d/users.conf
information/Utility: Loading library 'checker.dll'
information/Utility: Loading library 'notification.dll'
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\var\lib\icinga2\api\zones/ws1.3it.loc/Test.conf
information/ConfigCompiler: Compiling config file: C:\Program Files (x86)\ICINGA2\var\lib\icinga2\api\zones/global-templates/commands/agent-local-cmd.conf
information/ConfigItem: Committing config items
information/ApiListener: My API identity: ws1.3it.loc
warning/ApplyRule: Apply rule 'satellite-host' for type 'Dependency' does not match anywhere!
warning/ApplyRule: Apply rule 'backup-downtime' for type 'ScheduledDowntime' does not match anywhere!
information/ConfigItem: Checked 1 ApiListener(s).
information/ConfigItem: Checked 2 Endpoint(s).
information/ConfigItem: Checked 3 Zone(s).
information/ConfigItem: Checked 44 CheckCommand(s).
information/ConfigItem: Checked 2 NotificationCommand(s).
information/ConfigItem: Checked 3 TimePeriod(s).
information/ConfigItem: Checked 1 CheckerComponent(s).
information/ConfigItem: Checked 1 FileLogger(s).
information/ConfigItem: Checked 1 NotificationComponent(s).
information/ConfigItem: Checked 2 HostGroup(s).
information/ConfigItem: Checked 3 ServiceGroup(s).
information/ConfigItem: Checked 1 Host(s).
information/ConfigItem: Checked 1 Service(s).
information/ConfigItem: Checked 1 User(s).
information/ConfigItem: Checked 2 Notification(s).
information/ConfigItem: Checked 1 UserGroup(s).
information/ConfigItem: Checked 1 IcingaApplication(s).
information/ScriptGlobal: Dumping variables to file 'C:\Program Files (x86)\ICINGA2\var/cache/icinga2/icinga2.vars'
information/cli: Finished validating the configuration file(s).

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-01-23 09:53:06 +00:00

  • Status changed from Feedback to New
  • Assigned to deleted DreiIT
  • Icinga Version changed from 2 to 2

@icinga-migration
Copy link
Author

Updated by DreiIT on 2015-02-20 13:31:18 +00:00

DreiIT wrote:

Just a thought: Is is possible that the reload process fails, because there where warnings by the configuration validator?
Update: After re-running the test without any warning the Agent still (false) detects a configuration error and refuses reloading. So my theory is rebutted.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-03-02 15:37:42 +00:00

  • Duplicated set to 8556

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-04-17 11:42:49 +00:00

  • Category changed from 214 to Cluster

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-04-29 16:34:32 +00:00

  • Status changed from New to Feedback
  • Assigned to set to DreiIT

Does it still occur with 2.3.4?

@icinga-migration
Copy link
Author

Updated by DreiIT on 2015-04-30 05:09:23 +00:00

Yes, it's still there:

[2015-04-30 07:05:08 W. Europe Daylight Time] notice/ApiListener: Creating config update for file 'C:\Program Files (x86)\ICINGA2\var/lib/icinga2/api/zones/global-templates/commands/agent-local-cmd.conf'
[2015-04-30 07:05:08 W. Europe Daylight Time] information/ApiListener: Updating configuration file: C:\Program Files (x86)\ICINGA2\var/lib/icinga2/api/zones/global-templates//commands/agent-local-cmd.conf
[2015-04-30 07:05:08 W. Europe Daylight Time] information/ApiListener: Restarting after configuration change.
[..]
[2015-04-30 07:05:09 W. Europe Daylight Time] notice/Process: PID 6476 ('"C:\Program Files (x86)\ICINGA2\sbin\icinga2.exe" "--scm" "daemon" "--reload-internal" "3904"') terminated with exit code 1
[2015-04-30 07:05:09 W. Europe Daylight Time] critical/Application: Found error in config: reloading aborted

And as in the past, when restarted manually everything works fine.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-06-18 08:50:36 +00:00

  • Subject changed from Error in updating Agent configuration using zone config sync to Reload does not work on Windows
  • Status changed from Feedback to New
  • Assigned to deleted DreiIT

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-06-23 13:36:41 +00:00

  • Target Version set to Backlog

@icinga-migration
Copy link
Author

Updated by rafael.voss on 2015-06-26 08:02:56 +00:00

It looks like the is a pronlem with the reloadcommand itself:

Log from icinga as it tries to reload the config:

notice/Process: Running command '"C:\Program Files (x86)\ICINGA2\sbin\icinga2.exe" "daemon" "-x" "debug" "--reload-internal" "23828"': PID 28728
notice/Process: PID 28728 ('"C:\Program Files (x86)\ICINGA2\sbin\icinga2.exe" "daemon" "-x" "debug" "--reload-internal" "23828"') terminated with exit code 1
critical/Application: Found error in config: reloading aborted

If you try C:\Program Files (x86)\ICINGA2\sbin\icinga2.exe" "daemon" "-x" "debug" "--reload-internal" "23828"' from command-line you will get critical/icinga-app: Error while parsing command-line options: unrecognised option '--reload-internal'

The linuxverion of icinga2 knows "--reload-internal".

Version: v2.3.5-23-g5c11eb8

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-08-10 13:29:32 +00:00

  • Status changed from New to Assigned
  • Assigned to set to gbeutner
  • Target Version changed from Backlog to 2.4.0

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-08-10 13:30:01 +00:00

This is going to be backported into 2.3.9 once lazyfrosch has had a chance to test this.

@icinga-migration
Copy link
Author

Updated by Anonymous on 2015-08-10 13:30:04 +00:00

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

Applied in changeset 7890e20.

@icinga-migration
Copy link
Author

Updated by twidhalm on 2015-08-11 08:32:44 +00:00

I just tested your change with the Agent snapshot from packages.icinga.org . Configuration sync and automatic reload of the service now works on Windows 2008 R2 and Windows 2012.

Thanks a lot for this fix!

@icinga-migration
Copy link
Author

Updated by mfrosch on 2015-08-24 14:58:45 +00:00

  • Status changed from Resolved to Assigned
  • Backport? changed from __ to TBD

LGTM

Please backport for 2.3.9

@icinga-migration
Copy link
Author

Updated by mfrosch on 2015-08-24 14:59:25 +00:00

  • Target Version changed from 2.4.0 to 2.3.9

@icinga-migration
Copy link
Author

Updated by mfrosch on 2015-08-24 14:59:31 +00:00

  • Backport? changed from TBD to Yes

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-08-26 13:31:10 +00:00

  • Status changed from Assigned to Resolved

Fixed in 2.3.9.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-08-31 13:48:11 +00:00

  • Relates set to 10051

@icinga-migration
Copy link
Author

Updated by mfrosch on 2015-08-31 14:07:11 +00:00

  • Target Version changed from 2.3.9 to 2.3.10

This bugfix has not been backported to 2.3.9

@icinga-migration
Copy link
Author

Updated by mfrosch on 2015-08-31 14:07:20 +00:00

  • Status changed from Resolved to Feedback

@icinga-migration
Copy link
Author

Updated by mfrosch on 2015-08-31 14:07:31 +00:00

  • Status changed from Feedback to New

@icinga-migration
Copy link
Author

Updated by Anonymous on 2015-08-31 14:10:03 +00:00

  • Status changed from New to Resolved

Applied in changeset 35f33b5.

@icinga-migration
Copy link
Author

Updated by mfrosch on 2015-08-31 14:15:55 +00:00

  • Status changed from Resolved to Feedback

GIT 930dc60 seems to be related as well.

Do we need do backport it as well?

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-08-31 14:40:33 +00:00

  • Status changed from Feedback to Resolved
  • Target Version changed from 2.3.10 to 2.3.9

Although this was not properly backported as seen missing in the "pending backports" filter, we should keep our failure history the same as the released changelog. Therefore re-assigning to the old target. Please continue in #10051.

@icinga-migration icinga-migration added bug Something isn't working area/distributed Distributed monitoring (master, satellites, clients) labels Jan 17, 2017
@icinga-migration icinga-migration added this to the 2.3.9 milestone Jan 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/distributed Distributed monitoring (master, satellites, clients) bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant