dastabase issues

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Strud
Posts: 5
Joined: Thu Feb 20, 2014 1:55 pm

dastabase issues

Post by Strud »

DB Connect Error [nagiosxi]: Database connection failed DB Connect Error [nagiosxi]: Database connection failed DB Connect Error [nagiosxi]: Database connection failed

I am getting these error messages when attempting to connect from my browser.

I have ssh'd into the server, attempted to stop the mysqld and repair using the documentation on this site but it times out when attempting to restart the database.

I am running on vmware 5.1 installed from the nagios ova file.

When running the following script "repairmysql.sh" it times out at this point:

- recovering (with sort) MyISAM-table 'nagios_timeperiod_timeranges.MYI'
Data records: 54
- Fixing index 1
- Fixing index 2
Timeout error occurred trying to start MySQL Daemon.
Starting mysqld: [FAILED]
~

===============
REPAIR COMPLETE
===============

I can't seem to get any further. If someone could point me in some sort of direction, I would greatly appreciate it.

I am leaving the office now and will not be back in until tomorrow morning so if you need any further info, I won't be able to get it until then.

Thanks in advance.

Strud
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: dastabase issues

Post by sreinhardt »

Just to be sure we are not running out of space, could you run:

Code: Select all

df -h
df -i
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Strud
Posts: 5
Joined: Thu Feb 20, 2014 1:55 pm

Re: dastabase issues

Post by Strud »

looks like I was indeed running out of disk space. the default ova download only allocated 10gb of disk space. I have increase the memory from the default of 2gb to 3gb and the disk space from 10gb to 25gb. Since I am new to linux, can you instruct me on how to expand the volume in linux? already allocated to vmware.

here are the results if the df -h and df -i commands:

Last login: Tue Mar 11 12:38:09 2014
[root@vgnagios ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
7.5G 7.2G 0 100% /
tmpfs 1.5G 0 1.5G 0% /dev/shm
/dev/sda1 485M 50M 410M 11% /boot
[root@vgnagios ~]# df -i
Filesystem Inodes IUsed IFree IUse% Mounted on
/dev/mapper/VolGroup-lv_root
494832 283259 211573 58% /
tmpfs 369486 1 369485 1% /dev/shm
/dev/sda1 128016 44 127972 1% /boot
[root@vgnagios ~]#
Strud
Posts: 5
Joined: Thu Feb 20, 2014 1:55 pm

Re: dastabase issues

Post by Strud »

I was able to find the document resizing the VM disk size and followed it and it appeared to have worked correctly. Now I am at the step of resizing the logical volume.

using the following command: lvresize /dev/mapper/VolGroup00-LogVol00 /dev/sda2 I receive the following Volume group "VolGroup00" not found

Kind of stuck.....

Strud
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: dastabase issues

Post by sreinhardt »

Try running "lvdisplay" This should list your logical volumes created with lvm. For instance, mine is actually /dev/VolGroup00/LogVol00 instead of /dev/VolGroup00-LogVol00.
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Strud
Posts: 5
Joined: Thu Feb 20, 2014 1:55 pm

Re: dastabase issues

Post by Strud »

mine is not showing up at all. I am showing /dev/VolGroup/lv_root and /dev/VolGroup/lv_swap

when I type the fdisk/dev/sda and type p to print the volumes, I get the message that Partition 1 does not end on cylinder boundary.

Device Boot Start End Blocks Id System
/dev/sda1 * 1 64 512000 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 64 3263 25697023+ 8e Linux LVM

where do I go from here?

I followed the resizing the vm disk document and had no errors or issues until I started to try to resize the logical volume.

Scott
sreinhardt
-fno-stack-protector
Posts: 4366
Joined: Mon Nov 19, 2012 12:10 pm

Re: dastabase issues

Post by sreinhardt »

Oh, just run the lvmresize with /dev/VolGroup/lv_root instead of /dev/mapper/VolGroup00-LogVol00, so something like:

Code: Select all

lvresize /dev/VolGroup/lv_root /dev/sda
Nagios-Plugins maintainer exclusively, unless you have other C language bugs with open-source nagios projects, then I am happy to help! Please pm or use other communication to alert me to issues as I no longer track the forum.
Strud
Posts: 5
Joined: Thu Feb 20, 2014 1:55 pm

Re: dastabase issues

Post by Strud »

Thank you. That fixed it. that shows my lack of knowledge of linux.

re-ran the database fix and completed successfully.

restarted the server and I can now log back into Nagios.

Thanks again

Strud.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: dastabase issues

Post by tmcdonald »

Glad to see it's working for you. We'll be locking this thread up now, but feel free to open another if you need anything in the future.
Former Nagios employee
Locked