INSTALLATION ERROR!Please add the 'Optional' channel to your
Re: INSTALLATION ERROR!Please add the 'Optional' channel to
Thank you,
I did run the same script and found the below.
===========================================================
- recovering (with sort) MyISAM-table 'xi_users.MYI'
Data records: 1
- Fixing index 1
- Fixing index 2
Starting mysqld: [ OK ]
/tmp/nagiosxi
===============
REPAIR COMPLETE
===============
Stopping ndo2db: done.
Starting ndo2db: done.
Running configuration check...
Stopping nagios: done.
Starting nagios: done.
=======================
nagios database repair succeeded
nagiosql database repair succeeded
nagiosxi database repair succeeded
========================================================
Also i am able to see the below Databases.
$mysqlshow -u root -p
Enter password:
+--------------------+
| Databases |
+--------------------+
| information_schema |
| mysql |
| nagios |
| nagiosql |
| nagiosxi |
| test |
+-------------------------+
Do I again need to run from the ./fullinstall or which step i need to start ?
Please guide me.
Thank you,
Nag.
I did run the same script and found the below.
===========================================================
- recovering (with sort) MyISAM-table 'xi_users.MYI'
Data records: 1
- Fixing index 1
- Fixing index 2
Starting mysqld: [ OK ]
/tmp/nagiosxi
===============
REPAIR COMPLETE
===============
Stopping ndo2db: done.
Starting ndo2db: done.
Running configuration check...
Stopping nagios: done.
Starting nagios: done.
=======================
nagios database repair succeeded
nagiosql database repair succeeded
nagiosxi database repair succeeded
========================================================
Also i am able to see the below Databases.
$mysqlshow -u root -p
Enter password:
+--------------------+
| Databases |
+--------------------+
| information_schema |
| mysql |
| nagios |
| nagiosql |
| nagiosxi |
| test |
+-------------------------+
Do I again need to run from the ./fullinstall or which step i need to start ?
Please guide me.
Thank you,
Nag.
Re: INSTALLATION ERROR!Please add the 'Optional' channel to
Correct, you will need to run the ./fullinstall script again.
Former Nagios employee
Re: INSTALLATION ERROR!Please add the 'Optional' channel to
Yes I did run but the same
/usr/local/nagiosxi/scripts/repairmysql.sh nagiosql
/usr/local/nagiosxi/scripts/repairmysql.sh nagios
service mysqld start
=========================
Starting mysqld: [ OK ]
Running './14-timezone'...
PHP timezone already configured - skipping.
RESULT=0
Running './A-subcomponents'...
Subcomponents already configured - skipping.
RESULT=0
Running './B-installxi'...
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
xidb already initialized - skipping.
Patching NDOUtils...
<h3>Databse Error</h3>A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.<p>Run the following from the CLI as root to attempt to repair the DB:<br><pre>/usr/local/nagiosxi/scripts/repair_databases.sh</pre></p>Installing/updating XI wizards...
Backing up existing wizards to /tmp/xiwizards_backup...
Installing 'wizards/autodiscovery.zip'
===================================================
I tried to connect to MYSQL with nagiosxi user , it is connecting and working fine
mysql -u nagiosxi -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| nagiosxi |
| test |
+--------------------+
3 rows in set (0.00 sec)
mysql>
======================
mysql> SHOW TABLES;
+--------------------+
| Tables_in_nagiosxi |
+--------------------+
| xi_auditlog |
| xi_commands |
| xi_eventqueue |
| xi_events |
| xi_meta |
| xi_options |
| xi_sysstat |
| xi_usermeta |
| xi_users |
+--------------------+
9 rows in set (0.00 sec)
==============================================
mysql> select * from xi_users;
+---------+-------------+----------------------------------+--------------+----------------+----------------+---------+----------------------------------+-------------+----------------+--------------+----------------------+------------+-------------+----------------+------------+--------------+
| user_id | username | password | name | email | backend_ticket | enabled | api_key | api_enabled | login_attempts | last_attempt | last_password_change | last_login | last_edited | last_edited_by | created_by | created_time |
+---------+-------------+----------------------------------+--------------+----------------+----------------+---------+----------------------------------+-------------+----------------+--------------+----------------------+------------+-------------+----------------+------------+--------------+
| 1 | nagiosadmin | 40be4e59b9a2a2b5dffb918c0e86b3d7 | Nagios Admin | root@localhost | 1234 | 1 | 5d1d2da9433d9b75eb6df0300fdb9689 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+---------+-------------+----------------------------------+--------------+----------------+----------------+---------+----------------------------------+-------------+----------------+--------------+----------------------+------------+-------------+----------------+------------+--------------+
1 row in set (0.00 sec)
================================================
from the server, i can see
$mysqlshow -u root -p
Enter password:
+--------------------+
| Databases |
+--------------------+
| information_schema |
| mysql |
| nagios |
| nagiosql |
| nagiosxi |
| test |
+--------------------+
Why again the DB connection error ?
Thank you,
Code: Select all
./fullinstall
========================
Nagios XI Full Installer
========================
This script will do a complete install of Nagios XI by executing all necessary sub-scripts.
IMPORTANT: This script should only be used on a 'clean' install of CentOS or RedHat. Do NOT use this on a system that has
been tasked with other purposes or has an existing install of Nagios Core. To create such a clean install you should have
selected ONLY the 'Base' package in the OS installer.
Do you want to continue? [Y/n] Y
Proceeding with installation...
Checking MySQL credentials...
Stored MySQL password validated.
Running './0-repos'...
Repos already configured - exiting.
RESULT=0
Running './1-prereqs'...
Prereqs already installed - skipping...
Note: If you want to update the RPMs installed on this system, run your package manager's update command
RESULT=0
Running './2-usersgroups'...
Users/groups already configured - skipping.
RESULT=0
Running './3-dbservers'...
Database servers already initialized - skipping.
RESULT=0
Running './4-services'...
/etc/services already updated - skipping.
RESULT=0
Running './5-sudoers'...
sudoers already configured - skipping.
RESULT=0
Running './6-firewall'...
Firewall rules already configured - skipping.
RESULT=0
Running './7-sendmail'...
Step completed OK
RESULT=0
Running './8-selinux'...
SELinux already configured - skipping.
RESULT=0
Running './9-dbbackups'...
Database backups already configured - skipping.
RESULT=0
Running './10-phplimits'...
PHP limits already configured - skipping.
RESULT=0
Running './11-sourceguardian'...
Sourceguardian already configured - skipping.
RESULT=0
Running './12-mrtg'...
MRTG already configured - skipping.
RESULT=0
Running './13-cacti'...
Step completed OK
RESULT=0
Running './14-timezone'...
PHP timezone already configured - skipping.
RESULT=0
Running './A-subcomponents'...
Subcomponents already configured - skipping.
RESULT=0
Running './B-installxi'...
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
xidb already initialized - skipping.
Patching NDOUtils...
<h3>Databse Error</h3>A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.<p>Run the following from the CLI as root to attempt to repair the DB:<br><pre>/usr/local/nagiosxi/scripts/repair_databases.sh</pre></p>Installing/updating XI wizards...
Backing up existing wizards to /tmp/xiwizards_backup...
Installing 'wizards/autodiscovery.zip'/usr/local/nagiosxi/scripts/repairmysql.sh nagios
service mysqld start
=========================
Starting mysqld: [ OK ]
Running './14-timezone'...
PHP timezone already configured - skipping.
RESULT=0
Running './A-subcomponents'...
Subcomponents already configured - skipping.
RESULT=0
Running './B-installxi'...
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
xidb already initialized - skipping.
Patching NDOUtils...
<h3>Databse Error</h3>A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.<p>Run the following from the CLI as root to attempt to repair the DB:<br><pre>/usr/local/nagiosxi/scripts/repair_databases.sh</pre></p>Installing/updating XI wizards...
Backing up existing wizards to /tmp/xiwizards_backup...
Installing 'wizards/autodiscovery.zip'
===================================================
I tried to connect to MYSQL with nagiosxi user , it is connecting and working fine
mysql -u nagiosxi -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 2
Server version: 5.1.73 Source distribution
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> SHOW DATABASES;
+--------------------+
| Database |
+--------------------+
| information_schema |
| nagiosxi |
| test |
+--------------------+
3 rows in set (0.00 sec)
mysql>
======================
mysql> SHOW TABLES;
+--------------------+
| Tables_in_nagiosxi |
+--------------------+
| xi_auditlog |
| xi_commands |
| xi_eventqueue |
| xi_events |
| xi_meta |
| xi_options |
| xi_sysstat |
| xi_usermeta |
| xi_users |
+--------------------+
9 rows in set (0.00 sec)
==============================================
mysql> select * from xi_users;
+---------+-------------+----------------------------------+--------------+----------------+----------------+---------+----------------------------------+-------------+----------------+--------------+----------------------+------------+-------------+----------------+------------+--------------+
| user_id | username | password | name | email | backend_ticket | enabled | api_key | api_enabled | login_attempts | last_attempt | last_password_change | last_login | last_edited | last_edited_by | created_by | created_time |
+---------+-------------+----------------------------------+--------------+----------------+----------------+---------+----------------------------------+-------------+----------------+--------------+----------------------+------------+-------------+----------------+------------+--------------+
| 1 | nagiosadmin | 40be4e59b9a2a2b5dffb918c0e86b3d7 | Nagios Admin | root@localhost | 1234 | 1 | 5d1d2da9433d9b75eb6df0300fdb9689 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 0 |
+---------+-------------+----------------------------------+--------------+----------------+----------------+---------+----------------------------------+-------------+----------------+--------------+----------------------+------------+-------------+----------------+------------+--------------+
1 row in set (0.00 sec)
================================================
from the server, i can see
$mysqlshow -u root -p
Enter password:
+--------------------+
| Databases |
+--------------------+
| information_schema |
| mysql |
| nagios |
| nagiosql |
| nagiosxi |
| test |
+--------------------+
Why again the DB connection error ?
Thank you,
Last edited by tmcdonald on Mon Mar 13, 2017 2:39 pm, edited 1 time in total.
Reason: Please use [code][/code] tags around long output
Reason: Please use [code][/code] tags around long output
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: INSTALLATION ERROR!Please add the 'Optional' channel to
What is the output of the following?
Please include the DB log file, typically located a /var/log/mysqld.log or /var/log/mariadb/mariadb.log.
Code: Select all
service mysqld status
service mariadb status
service ndo2db statusPrevious Nagios employee
Re: INSTALLATION ERROR!Please add the 'Optional' channel to
Please find details:
[root@server ~]# service mysqld status
mysqld (pid 24400) is running...
[root@server ~]# service mariadb status
mariadb: unrecognized service
[root@server ~]# service ndo2db status
ndo2db (pid 18681) is running...
[root@server ~]# service mysqld status
mysqld (pid 24400) is running...
[root@server ~]# service mariadb status
mariadb: unrecognized service
[root@server ~]# service ndo2db status
ndo2db (pid 18681) is running...
You do not have the required permissions to view the files attached to this post.
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: INSTALLATION ERROR!Please add the 'Optional' channel to
At this point the cleanest thing you could do would be to start from a new clean RHEL system with the appropriate repo in place prior to the install attempt.
If you want to debug this, you can run you're scripts like this:
Then we can narrow down where the error is coming from.
If you want to debug this, you can run you're scripts like this:
Code: Select all
# cd /tmp/nagiosxi
# bash -x fullinstallPrevious Nagios employee
Re: INSTALLATION ERROR!Please add the 'Optional' channel to
[root@nagiosxi]# cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.8 (Santiago)
I ran the /tmp/nagiosxi/ bash -x fullinstall
================================================
RESULT=0
+ '[' -f .fail-28466 ']'
+ rm -f .fail-28466
+ run_sub ./B-installxi
+ echo 'Running '\''./B-installxi'\''...'
Running './B-installxi'...
+ FAILFILE=.fail-28466
+ rm -f .fail-28466
+ eval ./B-installxi
+ tee -a install.log
++ ./B-installxi
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
xidb already initialized - skipping.
Patching NDOUtils...
<h3>Databse Error</h3>A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.<p>Run the following from the CLI as root to attempt to repair the DB:<br><pre>/usr/local/nagiosxi/scripts/repair_databases.sh</pre></p>Installing/updating XI wizards...
Backing up existing wizards to /tmp/xiwizards_backup...
Installing 'wizards/autodiscovery.zip'
I understand that scripts are trying to run B-installxi. but not able to find the key word
'<h3>Databse Error</h3>A database connection error has been detected, please follow the repair prompt below'
I also tried the below steps:-
==========================================
cat /usr/local/nagiosxi/html/includes/db.inc.php
================================================
error_reporting($error_level);
require_once(dirname(__FILE__) . '/../db/adodb/adodb.inc.php');
require_once(dirname(__FILE__) . '/dbl.inc.php');
require_once(dirname(__FILE__) . '/dbauth.inc.php');
function db_connect_all()
{
$start_time = time();
$time = 0;
$timeout = 20;
$all_connected = false;
$error = '';
$xi_conn = false;
$ndo_conn = false;
$ql_conn = false;
// Try to connect to the databases
do {
try {
if (!$xi_conn) {
$xi_conn = db_connect(DB_NAGIOSXI);
}
if (!$ndo_conn) {
$ndo_conn = db_connect(DB_NDOUTILS);
}
if (!$ql_conn) {
$ql_conn = db_connect(DB_NAGIOSQL);
}
$all_connected = true;
}
catch (Exception $e) {
$error = $e->getMessage();
sleep(2);
}
$time = time() - $start_time;
} while ($timeout > $time && !$all_connected);
// If, after timeout, we aren't connected - display error and return
if (!$all_connected) {
echo '<h3>'. _('Databse Error').'</h3>';
if (!empty($error)) {
echo $error;
}
echo '<p>' . _('Run the following from the CLI as root to attempt to repair the DB') . ':<br><pre>' . get_root_dir() . '/scripts/repair_databases.sh</pre></p>';
die();
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
why he DB connection error ?.. please help..
Thank you,
Red Hat Enterprise Linux Server release 6.8 (Santiago)
I ran the /tmp/nagiosxi/ bash -x fullinstall
================================================
RESULT=0
+ '[' -f .fail-28466 ']'
+ rm -f .fail-28466
+ run_sub ./B-installxi
+ echo 'Running '\''./B-installxi'\''...'
Running './B-installxi'...
+ FAILFILE=.fail-28466
+ rm -f .fail-28466
+ eval ./B-installxi
+ tee -a install.log
++ ./B-installxi
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
xidb already initialized - skipping.
Patching NDOUtils...
<h3>Databse Error</h3>A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.<p>Run the following from the CLI as root to attempt to repair the DB:<br><pre>/usr/local/nagiosxi/scripts/repair_databases.sh</pre></p>Installing/updating XI wizards...
Backing up existing wizards to /tmp/xiwizards_backup...
Installing 'wizards/autodiscovery.zip'
I understand that scripts are trying to run B-installxi. but not able to find the key word
'<h3>Databse Error</h3>A database connection error has been detected, please follow the repair prompt below'
I also tried the below steps:-
==========================================
cat /usr/local/nagiosxi/html/includes/db.inc.php
================================================
error_reporting($error_level);
require_once(dirname(__FILE__) . '/../db/adodb/adodb.inc.php');
require_once(dirname(__FILE__) . '/dbl.inc.php');
require_once(dirname(__FILE__) . '/dbauth.inc.php');
function db_connect_all()
{
$start_time = time();
$time = 0;
$timeout = 20;
$all_connected = false;
$error = '';
$xi_conn = false;
$ndo_conn = false;
$ql_conn = false;
// Try to connect to the databases
do {
try {
if (!$xi_conn) {
$xi_conn = db_connect(DB_NAGIOSXI);
}
if (!$ndo_conn) {
$ndo_conn = db_connect(DB_NDOUTILS);
}
if (!$ql_conn) {
$ql_conn = db_connect(DB_NAGIOSQL);
}
$all_connected = true;
}
catch (Exception $e) {
$error = $e->getMessage();
sleep(2);
}
$time = time() - $start_time;
} while ($timeout > $time && !$all_connected);
// If, after timeout, we aren't connected - display error and return
if (!$all_connected) {
echo '<h3>'. _('Databse Error').'</h3>';
if (!empty($error)) {
echo $error;
}
echo '<p>' . _('Run the following from the CLI as root to attempt to repair the DB') . ':<br><pre>' . get_root_dir() . '/scripts/repair_databases.sh</pre></p>';
die();
}
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
why he DB connection error ?.. please help..
Thank you,
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: INSTALLATION ERROR!Please add the 'Optional' channel to
In the file B-installxi can you change the shebang from
toThen rerun the install.
Code: Select all
#!/bin/bash -eCode: Select all
#!/bin/bash -exPrevious Nagios employee
Re: INSTALLATION ERROR!Please add the 'Optional' channel to
I have added x with e in the B-installxi
==========================================
#!/bin/bash -ex
. ./xi-sys.cfg
# Was previous step completed?
if [ ! -f installed.subcomponents ]; then
echo "Subcomponents were not installed - run previous script" >&2
exit 1
fi
==================================================
Still we are facing the same issue :
+ service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
+ cp xi-sys.cfg /usr/local/nagiosxi/var/
+ cp xi-sys.cfg ./nagiosxi/basedir/var/
+ ./init-xidb
xidb already initialized - skipping.
+ cd /usr/local/nagiosxi/scripts
+ /usr/bin/php patch_ndoutils.php
Patching NDOUtils...
<h3>Databse Error</h3>A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.<p>Run the following from the CLI as root to attempt to repair the DB:<br><pre>/usr/local/nagiosxi/scripts/repair_databases.sh</pre></p>+ cd ./subcomponents/xiwizards
+ ./install
Installing/updating XI wizards...
Backing up existing wizards to /tmp/xiwizards_backup...
Installing 'wizards/autodiscovery.zip'
================================================
Also i have run the : /usr/local/nagiosxi/scripts/repair_databases.sh
nagios database repair succeeded
nagiosql database repair succeeded
nagiosxi database repair succeeded
again I rerun the ./fullinstall but the same Database connection error - message.
xidb already initialized - skipping.
+ cd /usr/local/nagiosxi/scripts
+ /usr/bin/php patch_ndoutils.php
Patching NDOUtils...
<h3>Databse Error</h3>A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.<p>Run the following from the CLI as root to attempt to repair the DB:<br><pre>/usr/local/nagiosxi/scripts/repair_databases.sh</pre></p>+ cd ./subcomponents/xiwizards
+ ./install
Thank You,
Nag.
==========================================
#!/bin/bash -ex
. ./xi-sys.cfg
# Was previous step completed?
if [ ! -f installed.subcomponents ]; then
echo "Subcomponents were not installed - run previous script" >&2
exit 1
fi
==================================================
Still we are facing the same issue :
+ service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [ OK ]
+ cp xi-sys.cfg /usr/local/nagiosxi/var/
+ cp xi-sys.cfg ./nagiosxi/basedir/var/
+ ./init-xidb
xidb already initialized - skipping.
+ cd /usr/local/nagiosxi/scripts
+ /usr/bin/php patch_ndoutils.php
Patching NDOUtils...
<h3>Databse Error</h3>A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.<p>Run the following from the CLI as root to attempt to repair the DB:<br><pre>/usr/local/nagiosxi/scripts/repair_databases.sh</pre></p>+ cd ./subcomponents/xiwizards
+ ./install
Installing/updating XI wizards...
Backing up existing wizards to /tmp/xiwizards_backup...
Installing 'wizards/autodiscovery.zip'
================================================
Also i have run the : /usr/local/nagiosxi/scripts/repair_databases.sh
nagios database repair succeeded
nagiosql database repair succeeded
nagiosxi database repair succeeded
again I rerun the ./fullinstall but the same Database connection error - message.
xidb already initialized - skipping.
+ cd /usr/local/nagiosxi/scripts
+ /usr/bin/php patch_ndoutils.php
Patching NDOUtils...
<h3>Databse Error</h3>A database connection error has been detected, please follow the repair prompt below. If the issue persists, please contact Nagios support.<p>Run the following from the CLI as root to attempt to repair the DB:<br><pre>/usr/local/nagiosxi/scripts/repair_databases.sh</pre></p>+ cd ./subcomponents/xiwizards
+ ./install
Thank You,
Nag.
-
avandemore
- Posts: 1597
- Joined: Tue Sep 27, 2016 4:57 pm
Re: INSTALLATION ERROR!Please add the 'Optional' channel to
However if you wish to keep debugging this please attach the following files:At this point the cleanest thing you could do would be to start from a new clean RHEL system with the appropriate repo in place prior to the install attempt.
/tmp/nagiosxi/nagiosxi/basedir/html/config.inc.php
/tmp/nagiosxi/nagiosxi/basedir/html/includes/utils.inc.php
Previous Nagios employee