Skip to content
This repository has been archived by the owner on Dec 13, 2022. It is now read-only.

Admin user not created with centreon-web 2.8.17 (fresh install) #6078

Closed
adr1enb opened this issue Feb 21, 2018 · 2 comments
Closed

Admin user not created with centreon-web 2.8.17 (fresh install) #6078

adr1enb opened this issue Feb 21, 2018 · 2 comments

Comments

@adr1enb
Copy link

adr1enb commented Feb 21, 2018

Hello,

We are doing a fresh install of Centreon on CentOS7, using last version of packages and the documentation. Everything is OK during the install but the login on UI doesn't work.

EDIT: SOLVED ! (look at my next post)

It looks like we don't have this issue on centreon web 2.8.16 (our PoC installed few weeks/months ago)


BUG REPORT INFORMATION

Centreon Web version:
2.8.17
Centreon Engine version:
1.8.1
Centreon Broker version:
3.0.12
OS:
CentOS 7

Steps to reproduce the issue:

  1. Fresh install of Centreon on CentOS7 using packages (and the documentation)
  2. Complete all steps on web install
  3. After installation, login on web UI failed "Your credentials are incorrect.", no user created on DB

Describe the results you received:

"Your credentials are incorrect." on UI, no admin user created on DB

Describe the results you expected:

Successful login on Centreon UI, maybe?

Additional information you think important (e.g. issue happens only occasionally):

The last step of the install is OK, centreon and centreon_storage databases are created with all the tables but no contact in it

mysql> select * from contact;
Empty set (0.00 sec)
mysql> select * from contact where contact_alias = 'admin';
Empty set (0.00 sec)

I think we can't install the previous version of centreon with YUM (dependencies issues)

@adr1enb
Copy link
Author

adr1enb commented Feb 22, 2018

Well i've solved this issue :-)

We use Percona Mysql 5.6 cluster in order to have redundancy. By default, the mysql configuration has an increment feature that protect multi INSERT (wsrep_auto_increment_control).

As a result, the timeperiod table has different id for each row
timeperiod

And the creation of the admin user failed because by default it uses the id 1:

mysql> INSERT INTO contact (contact_id, timeperiod_tp_id, timeperiod_tp_id2, contact_name, contact_alias, contact_passwd, contact_lang, contact_host_notification_options, contact_service_notification_options, contact_email, contact_pager, contact_comment, contact_oreon, contact_admin, contact_type_msg, contact_activate, contact_auth_type, contact_ldap_dn, contact_enable_notifications) VALUES(1, 1, 1, 'admin admin', 'admin', MD5('admin'), 'en_US', 'n', 'n', 'admin@xxx.com', NULL, NULL, '1', '1', 'txt', '1', 'local', NULL, '1');
ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (centreon.contact, CONSTRAINT contact_ibfk_1 FOREIGN KEY (timeperiod_tp_id) REFERENCES timeperiod (tp_id) ON DELETE SET NULL)

It we disable the wsrep_auto_increment_control feature, the installation process is now OK and the admin user is created.

Maybe it's not a bug but it can be better if the installation process get the IDs in the database, not hard-coded in the INSERT request ?

@lpinsivy
Copy link
Contributor

Thank you for your feedback.

It may help other user.

Regards,

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants