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 #10653] Config sync not working under Windows agent #3676

Closed
icinga-migration opened this issue Nov 16, 2015 · 12 comments
Closed
Labels
area/distributed Distributed monitoring (master, satellites, clients) blocker Blocks a release or needs immediate attention bug Something isn't working

Comments

@icinga-migration
Copy link

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

Created by DreiIT on 2015-11-16 18:52:21 +00:00

Assignee: (none)
Status: Closed (closed on 2016-02-24 20:01:48 +00:00)
Target Version: (none)
Last Update: 2016-02-24 21:08:55 +00:00 (in Redmine)

Icinga Version: v2.4.0
Backport?: Not yet backported
Include in Changelog: 1

After upgrading the config master and the Windows agent from 2.3.11 to 2.4, the config sync isn't working any more. The following error is logged on the agent:

[2015-11-16 19:35:25 W. Europe Standard Time] information/ApiListener: Updating configuration file: C:\Program Files (x86)\ICINGA2\var/lib/icinga2/api/zones/global-templates//_etc/commands/agent-local-cmd.conf
[2015-11-16 19:35:25 W. Europe Standard Time] warning/JsonRpcConnection: Error while processing message for identity 'mon3.3it.loc'
Error: Function call 'mkdir' failed with error code 2, 'No such file or
 directory'

On the config master the file is located at the following path:

zones.d/global-templates/commands/agent-local-cmd.conf

I think the error has it's source in the new directoy "_etc" in the api-path.

Despite this bug I want to congratulate all of you for the new release - the idea of the api is great, thank you for your ongoing fantastic work!


Relations:

@icinga-migration
Copy link
Author

Updated by DreiIT on 2015-11-16 18:58:38 +00:00

Addendum: After creating the directory "C:\Program Files (x86)\ICINGA2\var\lib\icinga2\api\zones\global-templates\_etc" manually the sync work's fine.

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-11-16 19:28:58 +00:00

  • Subject changed from Config sync not working under Windows agent (since v2.4) to Config sync not working under Windows agent

@icinga-migration
Copy link
Author

Updated by gbeutner on 2015-11-16 19:40:20 +00:00

  • Category changed from Configuration to Cluster
  • Priority changed from Normal to High

@icinga-migration
Copy link
Author

Updated by TechIsCool on 2015-11-19 04:17:25 +00:00

This is occuring for me as well. Windows only.

Note: thought it was linux as well but it just moved folders to zones/_etc/zone name

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2015-11-25 14:08:03 +00:00

Does the same occur with a path including multiple directory levels? E.g. global-templates/test/1/2/3/templates.conf

(if so, I'd guess that MkDirP on Windows is a possible candidate)

@icinga-migration
Copy link
Author

Updated by TechIsCool on 2015-11-27 00:43:16 +00:00

If I create sub folders and sync them to the master they get created on all children. Only folder that has to be made is the _etc folder inside the zone folder

for example /var/lib/icinga2/api/zones/global-templates/_etc/example/my_config.conf
Only _etc has to be made manually

@icinga-migration
Copy link
Author

Updated by DreiIT on 2015-11-30 08:10:13 +00:00

Yes, the problem is the same. I added your example with the following result:

[2015-11-30 09:03:38 W. Europe Standard Time] information/ApiListener: Updating configuration file: C:\Program Files (x86)\ICINGA2\var/lib/icinga2/api/zones/global-templates//_etc/test/1/2/3/templates.conf
..
[2015-11-30 09:03:38 W. Europe Standard Time] warning/JsonRpcConnection: Error while processing message for identity 'mon3.3it.loc'
Error: Function call 'mkdir' failed with error code 2, 'No such file or directory'

@icinga-migration
Copy link
Author

Updated by rafael.voss on 2016-02-12 16:15:26 +00:00

Same problem here (v2.4.1).

it only happens when I have multiple subdirectories.

not working:

global-templates\_etc\network.d\someconfig.conf

working:

global-templates\_etc\someconfig.conf

if i create the folder _etc and reload again its working. So the bug is here: the script can create only one subfolder at a time. If you create "_etc" before reloading the icinga daemon you can have another subfolder and so on.

@icinga-migration
Copy link
Author

Updated by rafael.voss on 2016-02-15 10:03:20 +00:00

Just to mention: if you reload the configuration after you have deleted some folders on the master, old folders aren't deleted on the remote client and you will have some empty folders in _etc/*

Edit: another problem is, that these files can't be created too: C:\Program Files (x86)\ICINGA2\var\lib\icinga2\api\packages\_api\somehostname-1455205941-1\conf.d\downtimes.

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-02-22 15:39:13 +00:00

  • Relates set to 10932

@icinga-migration
Copy link
Author

Updated by mfriedrich on 2016-02-24 20:01:48 +00:00

  • Status changed from New to Closed

We believe this has been fixed with #10932. Please report back.

@icinga-migration
Copy link
Author

Updated by rafael.voss on 2016-02-24 21:08:55 +00:00

Updated Master and Remote Client to 2.4.3. I wiped c:\....\var\lib\icinga2\api\zones\* to test it.

The error is the same, it start syncing and it stops with the error on the first folder at the 2. level after _etc.

ERROR:

Error: Function call 'mkdir' for file 'C:\Program Files (x86)\ICINGA2\var\lib\ic
inga2\api\zones\global-templates\\_etc\vmware.d\apply_rules.d' failed with error
 code 2, 'No such file or directory'

VERSION OUTPUT:

icinga2.exe - The Icinga 2 network monitoring daemon (version: v2.4.3)

Copyright (c) 2012-2016 Icinga Development Team (https://www.icinga.org/)
License GPLv2+: GNU GPL version 2 or later 
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Application information:
  Installation root: C:\Program Files (x86)\ICINGA2
  Sysconf directory: C:\Program Files (x86)\ICINGA2\etc
  Run directory: C:\Program Files (x86)\ICINGA2\var\run
  Local state directory: C:\Program Files (x86)\ICINGA2\var
  Package data directory: C:\Program Files (x86)\ICINGA2\share\icinga2
  State path: C:\Program Files (x86)\ICINGA2\var/lib/icinga2/icinga2.state
  Modified attributes path: C:\Program Files (x86)\ICINGA2\var/lib/icinga2/modif
ied-attributes.conf
  Objects path: C:\Program Files (x86)\ICINGA2\var/cache/icinga2/icinga2.debug
  Vars path: C:\Program Files (x86)\ICINGA2\var/cache/icinga2/icinga2.vars
  PID path: C:\Program Files (x86)\ICINGA2\var\run/icinga2/icinga2.pid

System information:
  Platform: Windows
  Platform version: 7 SP1 (Server)
  Kernel: Windows
  Kernel version: 6.1
  Architecture: x86_64

C:\Program Files (x86)\ICINGA2\sbin>

@icinga-migration icinga-migration added blocker Blocks a release or needs immediate attention bug Something isn't working area/distributed Distributed monitoring (master, satellites, clients) labels 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) blocker Blocks a release or needs immediate attention bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant