Page 1 of 1

dastabase issues

Posted: Mon Mar 10, 2014 3:48 pm
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

Re: dastabase issues

Posted: Mon Mar 10, 2014 4:37 pm
by sreinhardt
Just to be sure we are not running out of space, could you run:

Code: Select all

df -h
df -i

Re: dastabase issues

Posted: Tue Mar 11, 2014 7:45 am
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 ~]#

Re: dastabase issues

Posted: Tue Mar 11, 2014 9:10 am
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

Re: dastabase issues

Posted: Tue Mar 11, 2014 11:24 am
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.

Re: dastabase issues

Posted: Wed Mar 12, 2014 2:34 pm
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

Re: dastabase issues

Posted: Wed Mar 12, 2014 4:40 pm
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

Re: dastabase issues

Posted: Thu Mar 13, 2014 8:00 am
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.

Re: dastabase issues

Posted: Thu Mar 13, 2014 9:58 am
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.