Not able to Activate changes

HI,

We are not able to Activate the changes on a slave we are getting that there is an error with bi.mk file in the slave directory.
I tried moving the same file from an other server and then did a cmk -O ,restarted the server and services but still the same error exists.
I have seen in distributed Monitoring and the WATO is disabled for the Slave.
For some reason even the new bi.mk file is getting update we are on 1.4.0P37.

Can you please give the complete error message?
It is important what’s wrong with your BI file.

Failed: Garbled automation response:
file /omd/sites/NMSLAVE/etc/check_mk/multisite.d/wato/bi.mk: invalid syntax (bi.mk, line 91):
So when I checked the file I found the file seems to be truncated so I have copied the same file from a working server which is having 119 lines but this error is not changing even after restarting the service

This file is copied from your master server at the time of activating your changes.
Can you inspect if your master has a working version of the bi.mk file?

To test if this is the only problem you can also remove this file on the slave and do a cmk --debug -vvR on the command line to look if the instance for itself is working.
This will not solve the problem if there is something going wrong at the push config from the master.

if there is issue with the master then it should not work for all the slaves right,but I am getting this error only on this slave.
Master has a working version of it. I ran the command and I got this output
mk --debug -vvR
Waiting for exclusive lock on /omd/sites/NMSLAVE/etc/check_mk/main.mk.
Generating configuration for core (type cmc)…
Time needed [cmc_global]: 0.02 sec
Time needed [cmc_timeperiods]: 4.40 sec
Time needed [cmc_contacts]: 0.00 sec
Syntax error in file /omd/sites/NMSLAVE/var/check_mk/autochecks/NMDNSWACC121.mk: invalid syntax (, line 71)
Error creating configuration: invalid syntax (, line 71)
Traceback (most recent call last):
File “/omd/sites/NMSLAVE/share/check_mk/modules/check_mk.py”, line 4721, in
do_restart()
File “/omd/sites/NMSLAVE/share/check_mk/modules/check_mk.py”, line 3860, in do_restart
do_create_config(with_agents=True)
File “/omd/sites/NMSLAVE/share/check_mk/modules/check_mk.py”, line 3744, in do_create_config
create_core_config()
File “/omd/sites/NMSLAVE/share/check_mk/modules/check_mk.py”, line 2869, in create_core_config
do_create_cmc_config(opt_cmc_relfilename)
File “/omd/sites/NMSLAVE/share/check_mk/modules/cmc.py”, line 140, in do_create_cmc_config
hosts_config = _measure_time(cmc_all_hosts)
File “/omd/sites/NMSLAVE/share/check_mk/modules/cmc.py”, line 172, in _measure_time
result = func(*args, **kwargs)
File “/omd/sites/NMSLAVE/share/check_mk/modules/cmc.py”, line 418, in cmc_all_hosts
hosts_config = cmc_hosts() + cmc_shadow_hosts()
File “/omd/sites/NMSLAVE/share/check_mk/modules/cmc.py”, line 434, in cmc_hosts
con += cmc_host(hostname)
File “/omd/sites/NMSLAVE/share/check_mk/modules/cmc.py”, line 593, in cmc_host
con += cmc_services(hostname, tags, attrs, macros, contactlist_id)
File “/omd/sites/NMSLAVE/share/check_mk/modules/cmc.py”, line 626, in cmc_services
host_checks = get_check_table(hostname, remove_duplicates=True).items()
File “/omd/sites/NMSLAVE/share/check_mk/modules/check_mk.py”, line 1997, in get_check_table
for entry in read_autochecks_of(hostname, world):
File “/omd/sites/NMSLAVE/share/check_mk/modules/discovery.py”, line 1267, in read_autochecks_of
autochecks_raw = eval(file(filepath).read())
File “”, line 71
(‘if64’, u’436244480’
^

This error message is something else. :slight_smile:
A defect “*.mk” autocheck file is only on this slave no where else.
Move this file to some other location and try the activation again.
But you can also do a cmk --debug -vvII NMDNSWACC121 before, to do a re inventory of your host.

I have moved it to a different location and tried activating but still getting the same error.

You cannot get this error message if the file was moved?

Now it is pointing to a different Name

$ cmk --debug -vvR
Waiting for exclusive lock on /omd/sites/NMSLAVE/etc/check_mk/main.mk.
Generating configuration for core (type cmc)…
Time needed [cmc_global]: 0.02 sec
Time needed [cmc_timeperiods]: 4.52 sec
Time needed [cmc_contacts]: 0.00 sec
Syntax error in file /omd/sites/NMSLAVE/var/check_mk/autochecks/CAVNROGTW02.mk: unexpected EOF while parsing (, line 0)
Error creating configuration: unexpected EOF while parsing (, line 0)
Traceback (most recent call last):
File “/omd/sites/NMSLAVE/share/check_mk/modules/check_mk.py”, line 4721, in
do_restart()
File “/omd/sites/NMSLAVE/share/check_mk/modules/check_mk.py”, line 3860, in do_restart
do_create_config(with_agents=True)
File “/omd/sites/NMSLAVE/share/check_mk/modules/check_mk.py”, line 3744, in do_create_config
create_core_config()
File “/omd/sites/NMSLAVE/share/check_mk/modules/check_mk.py”, line 2869, in create_core_config
do_create_cmc_config(opt_cmc_relfilename)
File “/omd/sites/NMSLAVE/share/check_mk/modules/cmc.py”, line 140, in do_create_cmc_config
hosts_config = _measure_time(cmc_all_hosts)
File “/omd/sites/NMSLAVE/share/check_mk/modules/cmc.py”, line 172, in _measure_time
result = func(*args, **kwargs)
File “/omd/sites/NMSLAVE/share/check_mk/modules/cmc.py”, line 418, in cmc_all_hosts
hosts_config = cmc_hosts() + cmc_shadow_hosts()
File “/omd/sites/NMSLAVE/share/check_mk/modules/cmc.py”, line 434, in cmc_hosts
con += cmc_host(hostname)
File “/omd/sites/NMSLAVE/share/check_mk/modules/cmc.py”, line 593, in cmc_host
con += cmc_services(hostname, tags, attrs, macros, contactlist_id)
File “/omd/sites/NMSLAVE/share/check_mk/modules/cmc.py”, line 626, in cmc_services
host_checks = get_check_table(hostname, remove_duplicates=True).items()
File “/omd/sites/NMSLAVE/share/check_mk/modules/check_mk.py”, line 1997, in get_check_table
for entry in read_autochecks_of(hostname, world):
File “/omd/sites/NMSLAVE/share/check_mk/modules/discovery.py”, line 1267, in read_autochecks_of
autochecks_raw = eval(file(filepath).read())
File “”, line 0
I guess some thing wrong on this slave

I don’t know what happens to your instance but defect autocheck files are a local problem on this slave.
The easiest solution is to do a cmk -II on this slave and then inspect the folder
/omd/sites/NMSLAVE/var/check_mk/autochecks/ and remove all files not with a timestamp from your inventory. Or better said delete the autochecks older then today.

Now I am seeing this error

cmk --debug -vVR
This is Check_MK version 1.4.0p37
Copyright © 2009 Mathias Kettner

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.  If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.

Waiting for exclusive lock on /omd/sites/NMSLAVE/etc/check_mk/main.mk.
Generating configuration for core (type nagios)…OK
Running ‘/omd/sites/NMSLAVE/bin/nagios -vp /omd/sites/NMSLAVE/tmp/nagios/nagios.cfg 2>&1’
Validating Nagios configuration…ERROR:

Nagios Core 3.5.0
Copyright © 2009-2011 Nagios Core Development Team and Community Contributors
Copyright © 1999-2009 Ethan Galstad
Last Modified: 03-15-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data…
Error: Cannot open main configuration file ‘/omd/sites/NMSLAVE/tmp/nagios/nagios.cfg’ for reading!
Error processing main config file!

***> One or more problems was encountered while processing the config files…

 Check your configuration file(s) to ensure that they contain valid
 directives and data defintions.  If you are upgrading from a previous
 version of Nagios, you should be aware that some variables/definitions
 may have been removed or modified in this version.  Make sure to read
 the HTML documentation regarding the config files, as well as the
 'Whats New' section to find out what has changed.

Configuration for monitoring core is invalid. Rolling back.
The broken file has been copied to “/omd/sites/NMSLAVE/tmp/check_mk/check_mk_objects.cfg.broken” for analysis.
OMD[NMSLAVE]:~$

when I have checked the contents of the file nothing is present.

/tmp/check_mk$ more check_mk_objects.cfg.broken

Created by Check_MK. Do not edit.

------------------------------------------------------------

Dummy check commands and active check commands

------------------------------------------------------------

You are sure that there is no broken hard disk or any other real problem with this machine?

After the cleanup of you autocheck directory, what was inside there? How many files and also files with real checks defined?

CMK -II command is taking so long to discover it I have observed one morething even thos they are monitored on a different slave but still they are pointing to NMSLAVE Id I go to WATO->hosts-.NMSLAVE_>is is showing there but when I open the server and wato then Monitored on site it is showing to old Slave even after it is moved.

Any other way to fix the issue

the autocheck folder is containing 2515 devices but when I got to WATO->hosts->NMSLAVE I can see only 149 devices ,if I clean everything from autochecks what will be the impact

What do you have done before this problem occurred?
It looks like your slave don’t know that it is only a slave in a bigger system or that it don’t know what hosts it should handle.

it is the first time the issue is occurring and it one of the slave in the environment we have morethan 15 slaves

Now I see the same issue with onemore slave not sure what has changed in the environment

cmk --debug -vVR
This is Check_MK version 1.4.0p37
Copyright © 2009 Mathias Kettner

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; see the file COPYING.  If not, write to
the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.

Waiting for exclusive lock on /omd/sites/NMSLAVE16/etc/check_mk/main.mk.
Generating configuration for core (type nagios)…OK
Running ‘/omd/sites/NMSLAVE16/bin/nagios -vp /omd/sites/NMSLAVE16/tmp/nagios/nagios.cfg 2>&1’
Validating Nagios configuration…ERROR:

Nagios Core 3.5.0
Copyright © 2009-2011 Nagios Core Development Team and Community Contributors
Copyright © 1999-2009 Ethan Galstad
Last Modified: 03-15-2013
License: GPL

Website: http://www.nagios.org
Reading configuration data…
Error: Cannot open main configuration file ‘/omd/sites/NMSLAVE16/tmp/nagios/nagios.cfg’ for reading!
Error processing main config file!

***> One or more problems was encountered while processing the config files…

 Check your configuration file(s) to ensure that they contain valid
 directives and data defintions.  If you are upgrading from a previous
 version of Nagios, you should be aware that some variables/definitions
 may have been removed or modified in this version.  Make sure to read
 the HTML documentation regarding the config files, as well as the
 'Whats New' section to find out what has changed.

Configuration for monitoring core is invalid. Rolling back.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.