Solved

Centengine error

  • 20 January 2023
  • 27 replies
  • 1371 views

Userlevel 2
Badge +8

I dont know why, I have a centengine error, I get the following output when I put systemctl status centengine:
 

centengine[38831]: [date] [configuration] [info] Processing object config file '/etc/centreon-engine/severities.cfg'
centengine[38831]: [1674206969] [38831] Reading resource file '/etc/centreon-engine/resource.cfg'
centengine[38831]: [date [configuration] [info] Reading resource file '/etc/centreon-engine/resource.cfg'
 centengine[38831]: [date] [core] [info] Starting the TCP thread pool of 4 threads
centengine[38831]: [date] [core] [info] protocols: registering protocol ('file' (layers 1-3)
centengine[38831]: [date] [core] [info] protocols: registering protocol ('compression' (layers 6-6)
 centengine[38831]: [date] [core] [info] protocols: registering protocol ('BBDO' (layers 7-7)
centengine[38831]: /usr/sbin/centengine: symbol lookup error: /usr/lib64/nagios/cbmod.so: undefined symbol: _ZN3com8centreon6broker3neb9log_entryC1Ev
systemd[1]: centengine.service: Main process exited, code=exited, status=127/n/a
systemd[1]: centengine.service: Failed with result 'exit-code'.

 

Why do I get this error? How can I recover that cbmod.so file?

icon

Best answer by aalz0 8 February 2023, 12:05

View original

27 replies

Userlevel 2
Badge +8

I have removed the /usr/lib64/nagios.cbmod.so from /etc/centreon-engine/centengine.cfg

and leave only /etc/centreon-broker/central-module.json

Now the centengine process starts, with no errors. 

But I still have the poller in “Not running state”…

On /var/log/centreon-broker/central-broker-master.log I have the following:

Anyone please help? 

 

 

Userlevel 2
Badge +8

@Laurent do you know something about this?

I get that undefined symbol o cbmod.so…

Removing that from engine-configuration could be a big problem? Is that file broken or damaged? Any ideas of how could I solve that?

Userlevel 6
Badge +18

Hi @aalz0 can you try to reinstall centreon-broker\* packages?

Userlevel 2
Badge +8

Hi @Laurent,

 

How? Which command? Do I need to delete firstly the packages?
Did you mean centreon-broker or centreon-engine?

Maybe I need to rienstall nagios to get another cbmod.so file?
I’m completely lost… I think I’m cheating centreon avoiding it from checking the cbmod.so file (which is the one giving erros...) 

Userlevel 6
Badge +18

Error is about cbmod.so and this binary is provided by centreon-broker packages.

So please reinstall all centreon-broker packages using:

yum reinstall centreon-broker\*

Then restart centreon-engine process:

systemctl restart centengine

 

Userlevel 2
Badge +8

Thanks @Laurent, doing that I dont have any more centengine erros on my terminal, the process starts correctly.

But on the Web UI the polle is “not running” and even the database has an issue. But on temrinal seem to be everything ok.

Do I have to do the same to reintall other centreon packages?

Userlevel 6
Badge +18

Can you try to generate and export configuration using web interface?

Userlevel 2
Badge +8

I’ve alredy try. 

But I continue on this state:
 

 

Userlevel 2
Badge +8

In central.broker-master.log I get the following errors:

[2023-02-01T15:40:15.221+01:00] [perfdata] [error] multiplexing: could not open cache file: cannot open '/var/lib/centreon-broker//central-broker-master.unprocessed' to read/write: Permission denied
[2023-02-01T15:40:15.284+01:00] [tcp] [error] Error while reading on socket: End of file
[2023-02-01T15:40:19.439+01:00] [core] [info] pool: the latency check encountered an error: Operation aborted.
[2023-02-02T08:12:11.239+01:00] [sql] [error] unified_sql: the 'metrics' table contains rows with metric_id <= 0 ; you should remove them.
[2023-02-02T08:39:53.549+01:00] [tcp] [error] Error while reading on socket: Operation aborted.
[2023-02-02T08:39:55.069+01:00] [core] [info] pool: the latency check encountered an error: Operation aborted.

That unified_sql error took my attention. So, I tried to see if there are metric_id values less than 0 in the metrics table of centreon_storage database, but there arent, it’s empty. I use this query:

use centreon_storage;
select * from metrics where metric_id <= 0;

 

Userlevel 2
Badge +8

I continue with the error

/usr/sbin/centengine: symbol lookup error: /usr/lib64/nagios/cbmod.so: undefined symbol: _ZN3com8centreon6broker3neb9log_entryC1Ev

And centengine is stopped. I’m completely desperate, any more ideas? 

@Laurent proposal seemed to work, but I’m at the same poin

Userlevel 6
Badge +18

@aalz0 did you add a stream connector output on the broker linked to this poller?

Userlevel 2
Badge +8

No, I only have this machine, which is my central server, and then 2 mariadb in a galera cluster working fine...

Userlevel 6
Badge +18

Ok so it is a standalone server with basic configuration.

Can you change rights on /var/lib/centreon-broker/ to fix “Permission denied” error:

chown centreon-broker:centreon-broker /var/lib/centreon-broker/

 

Userlevel 2
Badge +8

Hi @Laurent


Ok, nice to hear that.

But, what does this have to do which what I asked? Does it have any relation with my Centengine issue?

Userlevel 6
Badge +18

Hi @Laurent


Ok, nice to hear that.

But, what does this have to do which what I asked? Does it have any relation with my Centengine issue?

Sorry I invert conversation :D, and I edited previous message with correct answer

Userlevel 2
Badge +8

Can you change rights on /var/lib/centreon-broker/ to fix “Permission denied” error:

chown centreon-broker:centreon-broker /var/lib/centreon-broker/

 

Hi @Laurent , thanks again, I done what you said.

But I continue with errors, centengine status is (Code=Killed, signal=SEGV)

● centengine.service - Centreon Engine
Loaded: loaded (/lib/systemd/system/centengine.service; enabled; vendor preset: enabled)
Active: failed (Result: signal) since Fri 2023-02-03 11:44:07 CET; 1s ago
Process: 154070 ExecStart=/usr/sbin/centengine /etc/centreon-engine/centengine.cfg (code=killed, signal=SEGV)
Main PID: 154070 (code=killed, signal=SEGV)
CPU: 482ms

feb 03 11:44:06 SLKVCENTRDES01 centengine[154070]: [2023-02-03T11:44:06.667+01:00] [configuration] [info] Processing object config file '/etc/centreon-engine/meta_services.cfg'
feb 03 11:44:06 SLKVCENTRDES01 centengine[154070]: [1675421046] [154070] Processing object config file '/etc/centreon-engine/tags.cfg'
feb 03 11:44:06 SLKVCENTRDES01 centengine[154070]: [2023-02-03T11:44:06.667+01:00] [configuration] [info] Processing object config file '/etc/centreon-engine/tags.cfg'
feb 03 11:44:06 SLKVCENTRDES01 centengine[154070]: [1675421046] [154070] Processing object config file '/etc/centreon-engine/severities.cfg'
feb 03 11:44:06 SLKVCENTRDES01 centengine[154070]: [2023-02-03T11:44:06.667+01:00] [configuration] [info] Processing object config file '/etc/centreon-engine/severities.cfg'
feb 03 11:44:06 SLKVCENTRDES01 centengine[154070]: [1675421046] [154070] Reading resource file '/etc/centreon-engine/resource.cfg'
feb 03 11:44:06 SLKVCENTRDES01 centengine[154070]: [2023-02-03T11:44:06.667+01:00] [configuration] [info] Reading resource file '/etc/centreon-engine/resource.cfg'
feb 03 11:44:07 SLKVCENTRDES01 centengine[154070]: [2023-02-03 11:44:07.084] [core] [error] main: The log directory '/var/log/centreon-broker/' is not writable
feb 03 11:44:07 SLKVCENTRDES01 systemd[1]: centengine.service: Main process exited, code=killed, status=11/SEGV
feb 03 11:44:07 SLKVCENTRDES01 systemd[1]: centengine.service: Failed with result 'signal'.

I have also change the following permissions:

chmod 775 /var/log/centreon-broker
chown centreon-broker:centreon-broker /var/log/centreon-broker

But after restarting cbd and centengine, the status of centengine doesnt change...

Userlevel 6
Badge +18

Hi @aalz0 you still have an error:

11:44:07.084] [core] [error] main: The log directory '/var/log/centreon-broker/' is not writable

Can you change rights using:

chmod u+w /var/log/centreon-broker
chmod g+w /var/log/centreon-broker

 

Userlevel 2
Badge +8

The message 

/var/log/centreon-broker/ is not writable

continues appearing, also the killed state….

I dont know what more can I do. Centreon broker is the owner of that directory:

ls -ld /var/log/centreon-broker/
drwxrwxr-x 2 centreon-broker centreon-broker 4096 feb 3 10:48 /var/log/centreon-broker/

 

Userlevel 6
Badge +18

did you disable SELinux?

Userlevel 2
Badge +8

No, I didnt

In the last version doesnt appear this. 

Userlevel 2
Badge +8

Im completely blocked at this point, I think it is a system problem.

I have tried to reinstall from zero, but I get the 503 service unavailable error. (Centreon not working after installation | Community
I have seen that many other forum members have also this problem, maybe Centreon doesnt work well at all in Debian 11 OS. Is there going to be any update to solve this?

Userlevel 6
Badge +18

@aalz0 we are moving APY repo to a new one, may be there is issu with packages in this moment.

Userlevel 2
Badge +8

Also would be great an OVA on a mantained OS like Debian 11 and no on a deprecated OS (CentOS).
Will be soon available that repo update?

 

Userlevel 2
Badge +8

Hi @Laurent

I have done a rollback to the snapshot where I had my database locally, and I dont have this issues…

So , It seems that the cbmod.so errors are gneerated when I export my bbdd to a remote server. 

Could this be the root of the problem?

 

Is there any doc or guideof how to correctly export the database from local to a remote database? 

The only thing I did was import and export with mysql dump the centreon and centreon_storage bbdd and change the word loclhost on this files:

  1. Edit the /etc/centreon/centreon.conf.php file,
  2. Edit the /etc/centreon/conf.pm file,
  3. Edit the Centreon Broker central configuration using Centreon web interface and change the password for the Perfdata generator and Broker SQL database output, (Conf-> Pollers)
  4. Edit the /etc/centreon/config.d/10-database.yaml file.
  5. /etc/centreon-broker/central-broker.json  dbhost, dbuser y db_password change
Userlevel 6
Badge +18

Hi @aalz0 your procedure is correct but I d’ont know why you have errors with rights access to directory.

Reply