Page 2 of 2
Re: Installation Error
Posted: Wed Mar 10, 2021 7:22 pm
by BanditBBS
I did that and it got past the backend but then failed on the DB step
Code: Select all
Running 'backend'...
backend step completed OK
Running 'db'...
Redirecting to /bin/systemctl restart mariadb.service
ERROR 1007 (HY000) at line 1: Can't create database 'nagiosna'; database exists
ERROR: could not create database. Invalid root MySQL password?
Re: Installation Error
Posted: Wed Mar 10, 2021 7:50 pm
by ssax
Comment (or remove) this entire section from the fullinstall script and run it again:
Code: Select all
prompt_mysqlpass
{
echo "CREATE DATABASE nagiosna; "
echo -n "CREATE USER 'nagiosna'@'localhost' IDENTIFIED BY 'nagiosna'; "
echo -n "GRANT ALL ON nagiosna.* TO 'nagiosna'@'localhost';"
} | mysql -u root ${mysqlpass:+"-p$mysqlpass"} ||
error "could not create database. Invalid root MySQL password?"
# Create tables and add some fixtures
mysql -unagiosna -pnagiosna nagiosna < nagiosna.sql
Re: Installation Error
Posted: Wed Mar 10, 2021 8:59 pm
by BanditBBS
Further...now got this:
Code: Select all
wkhtmltopdf step completed OK
Running 'webroot'...
Created symlink /etc/systemd/system/multi-user.target.wants/httpd.service → /usr/lib/systemd/system/httpd.service.
webroot step completed OK
Running 'daemons'...
Created symlink /etc/systemd/system/mysql.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/mysqld.service → /usr/lib/systemd/system/mariadb.service.
Created symlink /etc/systemd/system/multi-user.target.wants/mariadb.service → /usr/lib/systemd/system/mariadb.service.
Synchronizing state of nagiosna.service with SysV service script with /usr/lib/systemd/systemd-sysv-install.
Executing: /usr/lib/systemd/systemd-sysv-install enable nagiosna
Created symlink /etc/systemd/system/multi-user.target.wants/nagiosna.service → /usr/lib/systemd/system/nagiosna.service.
Job for nagiosna.service failed because the control process exited with error code.
See "systemctl status nagiosna.service" and "journalctl -xe" for details.
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios Enterprises technical support.
The step that failed was: 'daemons'
Checked the status, looks like some of the DB stuff is missing!
Code: Select all
[root@cms-365-nna01 nagiosna]# systemctl status nagiosna.service
● nagiosna.service - NagiosNA Daemon
Loaded: loaded (/usr/lib/systemd/system/nagiosna.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2021-03-10 17:57:32 PST; 2min 13s ago
Process: 89326 ExecStart=/etc/rc.d/init.d/nagiosna start (code=exited, status=1/FAILURE)
Mar 10 17:57:31 cms-365-nna01.itciss.com systemd[1]: Starting NagiosNA Daemon...
Mar 10 17:57:32 cms-365-nna01.itciss.com nagiosna[89326]: Error connecting to the database. (1146, "Table 'nagiosna.nagiosna_Sources' doesn't exist")
Mar 10 17:57:32 cms-365-nna01.itciss.com systemd[1]: nagiosna.service: Control process exited, code=exited status=1
Mar 10 17:57:32 cms-365-nna01.itciss.com systemd[1]: nagiosna.service: Failed with result 'exit-code'.
Mar 10 17:57:32 cms-365-nna01.itciss.com systemd[1]: Failed to start NagiosNA Daemon.
Re: Installation Error
Posted: Thu Mar 11, 2021 5:53 pm
by dchurch
Please execute the following to re-create your database:
Code: Select all
mysqldump -nt -unagiosna -pnagiosna nagiosna > /tmp/nagiosna-data.sql
mysql -unagiosna -pnagiosna nagiosna < nagiosna.sql
mysql -unagiosna -pnagiosna nagiosna < /tmp/nagiosna-data.sql
Then try restarting nagiosna.
Re: Installation Error
Posted: Thu Mar 11, 2021 6:13 pm
by BanditBBS
Woot! That fixed it, guess I'll follow the exact same steps for the one I am building in the other datacenter and then make sure everything works and place the order

Re: Installation Error
Posted: Fri Mar 12, 2021 8:44 am
by scottwilkerson
BanditBBS wrote:Woot! That fixed it, guess I'll follow the exact same steps for the one I am building in the other datacenter and then make sure everything works and place the order

Great!
Locking thread