Installation Error

This support forum board is for support questions relating to Nagios Network Analyzer, our network traffic and bandwidth analysis solution.
User avatar
BanditBBS
Posts: 2457
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Installation Error

Post 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?
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

Re: Installation Error

Post 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
User avatar
BanditBBS
Posts: 2457
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Installation Error

Post 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.
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
dchurch
Posts: 858
Joined: Wed Oct 07, 2020 12:46 pm
Location: Yo mama

Re: Installation Error

Post 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.
If you didn't get an 8% raise over the course of the pandemic, you took a pay cut.

Discussion of wages is protected speech under the National Labor Relations Act, and no employer can tell you you can't disclose your pay with your fellow employees.
User avatar
BanditBBS
Posts: 2457
Joined: Tue May 31, 2011 12:57 pm
Location: Scio, OH
Contact:

Re: Installation Error

Post 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 :)
2 of XI5.6.14 Prod/DR/DEV - Nagios LogServer 2 Nodes
See my projects on the Exchange at BanditBBS - Also check out my Nagios stuff on my personal page at Bandit's Home and at github
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Installation Error

Post 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
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked