2

If anyone has experience of installation of centreon on Redhat your help is much needed.

I'm following Guide

https://documentation.centreon.com/docs/centreon/en/latest/installation/from_packages.html

to setup centreon on Redhat 7.3.

Step Install a central server

$ yum install centreon-base-config-centreon-engine centreon

completes without any error. Next i have to access the webpage to complete installation but when i access http://serverip/centreon the page keep on loading at the end i get connection reset error in browser.

In centreon core log i can see error message.

    2017-06-28 01:09:32 - MySQL error : cannot connect to database centreon: Access denied for user 'centreon'@'localhost' (using password: YES) (caller: centreon::common::db:/usr/share/perl5/vendor_perl/centreon/common/db.pm:266)
    2017-06-28 01:09:32 - Error when getting server properties
    nagiosPerfTrace.log show error. 
    2017-06-28 01:10:12 - MySQL error : cannot connect to database centreon: Access denied for user 'centreon'@'localhost' (using password: YES) (caller: centreon::common::db:/usr/share/perl5/vendor_perl/centreon/common/db.pm:23
4)
2017-06-28 01:10:12 - Can't connect to the database

Please if some one know issue can provide help?

Thank You

Arun Singh
  • 55
  • 1
  • 1
  • 8

1 Answers1

0

If you already had MySQL server installed for other purposes, the Centreon installation may not be able to add database user without root password. I'm not sure whether the installation has asked for it at some point or not, but you can probably add the user manually and set the same password in Centreon configuration files.

If the database structure is only created during installation, you'd probably need to reinstall, but now that you have knowledge of the database account you are more likely to succeed.

Esa Jokinen
  • 43,252
  • 2
  • 75
  • 122
  • I tried to reinstall centreon 3 times without any success. The installer didn't ask me any MySQL details. It is fresh Redhat system without any Mysql installation but steal centreon installation don't installed MySQL server. I created database and added login details in file. /etc/centreon/conf.pm but no lock loading issue is same. – Arun Singh Jun 28 '17 at 11:04
  • If the user is there and you can log in with that user and password, further investigation would involve checking where `centreon::common::db` in `/usr/share/perl5/vendor_perl/centreon/common/db.pm` reads the SQL configuration from. – Esa Jokinen Jun 28 '17 at 11:10
  • /usr/share/centreon/config/centreon.config.php corrected and restarted centreon service. define('hostCentreon', $conf_centreon['hostCentreon']); define('hostCentstorage', $conf_centreon['hostCentstorage']); define('user', $conf_centreon['centreon']); define('password', $conf_centreon['aud9vSSAWjEg']); define('db', $conf_centreon['centreon']); define('dbcstg', $conf_centreon['dbcstg']); define('port', $conf_centreon['3306']); – Arun Singh Jun 28 '17 at 11:20