I'm having a problem with non-admin users visualization. We have Centreon 2.6.1 with Nagios core 3.4.1
We have three admin users to manage Centreon and several non-admin users to check alerts.
If we generate new hosts/services, those non-admin users can't see them, I know that there is a delay between the engine starts and when de users can see the new host/services. The problema appers here, because the non-admin users can't see those new items, in some cases, if we wait some hours (from 7 min to 48 hours) the new services appears, but therre are some new services that never appears...
If we add admin privileges to those users, the can see the new hosts/services, so it's seems to be an ACL problem. We've analised the logs, cron jobs, etc... we've cleaned ACLs, I've created new ones, but nothing...
We've tried to recover from an old snapshot, but the problem persists.
We've realized that non-admin users can't see admin comments.
We detected some corrupted tables and tried to repair them with myisamchk -r -v -f
centACL.log:
No log handling enabled - turning on stderr loggingBad operator (INTEGER): At line 73 in /usr/share/mibs/ietf/SNMPv2-PDUUndefined OBJECT-GROUP (diffServMIBMultiFieldClfrGroup): At line 2195 in /usr/share/mibs/ietf/IPSEC-SPD-MIBUndefined OBJECT-GROUP (diffServMultiFieldClfrNextFree): At line 2157 in /usr/share/mibs/ietf/IPSEC-SPD-MIBUndefined OBJECT-GROUP (diffServMIBMultiFieldClfrGroup): At line 2062 in /usr/share/mibs/ietf/IPSEC-SPD-MIBUnlinked OID in IPATM-IPMC-MIB: marsMIB ::= { mib-2 57 }Undefined identifier: mib-2 near line 18 of /usr/share/mibs/ietf/IPATM-IPMC-MIBExpected "::=" (RFC5644): At line 493 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIBExpected "{" (EOF): At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIBBad object identifier: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIBBad parse of OBJECT-IDENTITY: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIBPHP Fatal error: Call to undefined method DB_Error::fetchRow() in /usr/share/centreon/cron/centAcl.php on line 429No log handling enabled - turning on stderr loggingBad operator (INTEGER): At line 73 in /usr/share/mibs/ietf/SNMPv2-PDUUndefined OBJECT-GROUP (diffServMIBMultiFieldClfrGroup): At line 2195 in /usr/share/mibs/ietf/IPSEC-SPD-MIBUndefined OBJECT-GROUP (diffServMultiFieldClfrNextFree): At line 2157 in /usr/share/mibs/ietf/IPSEC-SPD-MIBUndefined OBJECT-GROUP (diffServMIBMultiFieldClfrGroup): At line 2062 in /usr/share/mibs/ietf/IPSEC-SPD-MIBUnlinked OID in IPATM-IPMC-MIB: marsMIB ::= { mib-2 57 }Undefined identifier: mib-2 near line 18 of /usr/share/mibs/ietf/IPATM-IPMC-MIBExpected "::=" (RFC5644): At line 493 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIBExpected "{" (EOF): At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIBBad object identifier: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIBBad parse of OBJECT-IDENTITY: At line 651 in /usr/share/mibs/iana/IANA-IPPM-METRICS-REGISTRY-MIB[2016-04-06 13:12:02] According to DB another instance of centAcl.php is already running and I found 0 process...Executing query: UPDATE cron_operation SET running = 0 WHERE id = '2'
I can't understand if centACL.php is running why it doesn't have a PID associated.
centstorage.log:
2016-04-06 12:53:17 - Unknown timestamp format or in future: [SERVICEPERFDATA]2016-04-06 12:53:17 - Unknown timestamp format or in future: [SERVICEPERFDATA]2016-04-06 12:53:17 - Unknown timestamp format or in future: [SERVICEPERFDATA]2016-04-06 12:54:17 - Unknown timestamp format or in future: [SERVICEPERFDATA]2016-04-06 12:55:17 - Unknown timestamp format or in future: [SERVICEPERFDATA]2016-04-06 12:55:17 - Unknown timestamp format or in future: [SERVICEPERFDATA]2016-04-06 12:56:07 - Cannot open /usr/local/nagios/var/service-perfdata_read file : Permission denied2016-04-06 12:58:17 - Unknown timestamp format or in future: [SERVICEPERFDATA]2016-04-06 12:58:17 - Unknown timestamp format or in future: [SERVICEPERFDATA]2016-04-06 12:59:17 - MySQL error: Duplicate entry '32-100' for key 'host_service_unique_id' (caller: centreon::centstorage::CentstoragePool:/usr/share/perl5/centreon/centstorage/CentstoragePool.pm:503)Query: INSERT INTO `index_data` (`host_name`, `service_description`, `host_id`, `service_id`, `special`, `storage_type`) VALUES ('_Module_Meta', 'meta_1', 32, 100, '1', '2')
2016-04-06 13:14:44 - MySQL error: MySQL server has gone away (caller: centreon:cript::centcore:/usr/share/perl5/centreon/script/centcore.pm:313)Query: SELECT * FROM `nagios_server` WHERE `id` = '1' AND `ns_activate` = '1' LIMIT 12016-04-06 13:14:44 - Error when getting server properties2016-04-06 13:14:44 - Ip address not defined for poller 12016-04-06 13:15:56 - MySQL error: MySQL server has gone away (caller: centreon:cript::centcore:/usr/share/perl5/centreon/script/centcore.pm:1022)Query: SELECT * FROM options WHERE `key` IN ('enable_perfdata_sync', 'enable_logs_sync', 'centcore_cmd_timeout', 'enable_broker_stats')2016-04-06 13:16:56 - MySQL error: MySQL server has gone away (caller: centreon:cript::centcore:/usr/share/perl5/centreon/script/centcore.pm:1022)Query: SELECT * FROM options WHERE `key` IN ('enable_perfdata_sync', 'enable_logs_sync', 'centcore_cmd_timeout', 'enable_broker_stats')2016-04-06 13:17:56 - MySQL error: MySQL server has gone away (caller: centreon:: script::centcore:/usr/share/perl5/centreon/script/centcore.pm:1022)Query: SELECT * FROM options WHERE `key` IN ('enable_perfdata_sync', 'enable_logs_sync', 'centcore_cmd_timeout', 'enable_broker_stats')2016-04-06 13:18:56 - MySQL error: MySQL server has gone away (caller: centreon:: script::centcore:/usr/share/perl5/centreon/script/centcore.pm:1022)Query: SELECT * FROM options WHERE `key` IN ('enable_perfdata_sync', 'enable_logs_sync', 'centcore_cmd_timeout', 'enable_broker_stats')2016-04-06 13:19:56 - MySQL error: MySQL server has gone away (caller: centreon:: script::centcore:/usr/share/perl5/centreon/script/centcore.pm:1022)Query: SELECT * FROM options WHERE `key` IN ('enable_perfdata_sync', 'enable_logs_sync', 'centcore_cmd_timeout', 'enable_broker_stats')2016-04-06 13:20:56 - MySQL error: MySQL server has gone away (caller: centreon:: script::centcore:/usr/share/perl5/centreon/script/centcore.pm:1022)Query: SELECT * FROM options WHERE `key` IN ('enable_perfdata_sync', 'enable_logs_sync', 'centcore_cmd_timeout', 'enable_broker_stats')
The bad new is that system performance is not the reason of that problem, because the consumption of resources is low and the problem has appeared again.
The good new is that the problem is about database insertion, because those new services aren't added to centreon_acl table, so no user has permissions to read them. centACL.php
The real problem is that i don't know how to solve it, because the code seems to be OK, isn't it?
PHP Fatal error: Call to undefined method DB_Error::fetchRow() in /usr/share/centreon/cron/centAcl.php on line 430
$query = "SELECT acl_res_id, hg_id FROM hostgroup, acl_resources_hg_relations WHERE acl_resources_hg_relations.hg_hg_id = hostgroup.hg_id"; $res = $pearDB->query($query); $hgResCache = array(); while ($row = $res->fetchRow()) { if (!isset($hgResCache[$row['acl_res_id']])) { $hgResCache[$row['acl_res_id']] = array(); } $hgResCache[$row['acl_res_id']][] = $row['hg_id']; }
As a little workaround, we've disconnected the server from internet for about 5 minuts, by this way the centACL could update the database, the problem is that is not a solution for the problem.
If anybody has some clue, or a definitely solution, it could be great!!
The problem still remains, the workaround don't work anymore.
I've been searching more clues and the problem seems to be obvious, a connection database problem, but I don't know how to solve it, can anybody help me :
/var/log/centreon/centAcl.log:
nbProc 1 [2016-07-20 09:12:02] More than one centAcl.php process currently running. Going to exit... PHP Fatal error: Call to undefined method DB_Error::fetchRow() in /usr/share/centreon/cron/centAcl.php on line 429 nbProc 0 [2016-07-20 09:14:01] According to DB another instance of centAcl.php is already running and I found 0 pr$ Executing query: UPDATE cron_operation SET running = 0 WHERE id = '2' nbProc 0 nbProc 1 [2016-07-20 09:16:01] More than one centAcl.php process currently running. Going to exit... PHP Fatal error: Call to undefined method DB_Error::fetchRow() in /usr/share/centreon/cron/centAcl.php on line 429 nbProc 0 [2016-07-20 09:17:24] According to DB another instance of centAcl.php is already running and I found 0 process... Executing query: UPDATE cron_operation SET running = 0 WHERE id = '2' nbProc 0 PHP Fatal error: Call to undefined method DB_Error::fetchRow() in /usr/share/centreon/cron/centAcl.php on line 429 nbProc 0 PHP Fatal error: Call to undefined method DB_Error::fetchRow() in /usr/share/centreon/cron/centAcl.php on line 429 nbProc 0 [2016-07-20 09:20:01] According to DB another instance of centAcl.php is already running and I found 0 process... Executing query: UPDATE cron_operation SET running = 0 WHERE id = '2' nbProc 0 PHP Fatal error: Call to undefined method DB_Error::fetchRow() in /usr/share/centreon/cron/centAcl.php on line 429 nbProc 0 [2016-07-20 09:24:01] According to DB another instance of centAcl.php is already running and I found 0 process... Executing query: UPDATE cron_operation SET running = 0 WHERE id = '2' nbProc 0 PHP Fatal error: Call to undefined method DB_Error::fetchRow() in /usr/share/centreon/cron/centAcl.php on line 429 nbProc 0 [2016-07-20 09:28:01] According to DB another instance of centAcl.php is already running and I found 0 process... Executing query: UPDATE cron_operation SET running = 0 WHERE id = '2'
2016-07-20 09:34:22 - MySQL error: MySQL server has gone away (caller: centreon::script::centcore:/usr/share/perl5/centreon/script/centcore.pm:1022) Query: SELECT * FROM options WHERE `key` IN ('enable_perfdata_sync', 'enable_logs_sync', 'centcore_cmd_timeout', 'enable_broker_stats') 2016-07-20 09:35:22 - MySQL error: MySQL server has gone away (caller: centreon::script::centcore:/usr/share/perl5/centreon/script/centcore.pm:1022) Query: SELECT * FROM options WHERE `key` IN ('enable_perfdata_sync', 'enable_logs_sync', 'centcore_cmd_timeout', 'enable_broker_stats')
I have problem with the ACL in Centreon.
I Use 2.6.3 version.
I have a user group, despite the fact I define the "Hosts Ressources", the users in the group can see all the hosts
While I put only 3 hosts (I have more than 20 hosts) in the selected object. It's like the "Hosts Ressources" has not been taken into account
Administration -->ACL--> Resources Access, then Hosts Resources.