can not connect to database
-
afernandez
- Posts: 17
- Joined: Mon Sep 23, 2013 4:02 pm
can not connect to database
i cant see anything in my nagisoxi URL the logs say this:
[Wed Oct 30 09:50:22 2013] [error] [client ::1] PHP Warning: mysql_pconnect(): Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
if you need more logs let me know thanks
my url only shows 3 green checks
[Wed Oct 30 09:50:22 2013] [error] [client ::1] PHP Warning: mysql_pconnect(): Lost connection to MySQL server at 'reading initial communication packet', system error: 111 in /usr/local/nagiosxi/html/db/adodb/drivers/adodb-mysql.inc.php on line 383
if you need more logs let me know thanks
my url only shows 3 green checks
Re: can not connect to database
Run the following commands and show the output:
Have you tried restarting mysql?
Code: Select all
tail /var/log/mysqld.log
service mysqld status
cat /etc/my.cnf
df -hCode: Select all
service mysqld restartBe sure to check out our Knowledgebase for helpful articles and solutions!
-
afernandez
- Posts: 17
- Joined: Mon Sep 23, 2013 4:02 pm
Re: can not connect to database
yes but let me tell you mysql have been migrated to another server
Re: can not connect to database
Did you follow this doc? http://assets.nagios.com/downloads/nagi ... Server.pdfafernandez wrote:yes but let me tell you mysql have been migrated to another server
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
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
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: can not connect to database
afernandez,
Let us know when you can, if you followed the document bandit linked above.
Let us know when you can, if you followed the document bandit linked above.
-
afernandez
- Posts: 17
- Joined: Mon Sep 23, 2013 4:02 pm
Re: can not connect to database
yes that is the one i followed so when nagios does its back up it backs up that remote db also?
-
afernandez
- Posts: 17
- Joined: Mon Sep 23, 2013 4:02 pm
HA on Nagios
Can you recommend a good strategy for nagios using HA?
im under fire, they are saying mysql is a single point of failure
im under fire, they are saying mysql is a single point of failure
Re: can not connect to database
The mysql backup script is "/root/scripts/automysqlbackup". You will have to modify it in order to backup the database on a remote server. What is the output of the following command?...so when nagios does its back up it backs up that remote db also?
Code: Select all
grep DBHOST= /root/scripts/automysqlbackupBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: can not connect to database
Umm, thank god I was watching this thread. I think that note about modifying the backup script needs added to the offloading database documents. I'm making that change to my script right now!lmiltchev wrote:The mysql backup script is "/root/scripts/automysqlbackup". You will have to modify it in order to backup the database on a remote server. What is the output of the following command?...so when nagios does its back up it backs up that remote db also?Code: Select all
grep DBHOST= /root/scripts/automysqlbackup
EDIT: is that script part of the backup that is created daily, or is that another one? I want to make sure my DB is being backed up properly, like the opening poster
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
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
Re: can not connect to database
It's a cron job.
We will need to modify our doc on offloading mysql.
Code: Select all
cat /etc/cron.d/nagiosxi | head -n 5Be sure to check out our Knowledgebase for helpful articles and solutions!