Page 1 of 1

Fusion - DB Connect Error

Posted: Thu Jul 04, 2013 12:12 am
by dezire0
Hi,
Day 1:
I have installed Nagios Fusion (2012R1.5) on Linux 2.6.32-358.el6.x86_64 x86_64, clean install. I was able to launch the Fusion website post installation at URL http://xx.xx.xx.xx/nagiosfusion.

Day 2:
I tried to log into the site at same address http://xx.xx.xx.xx/nagiosfusion, but I got an error as:
DB Connect Error [nagiosfusion]: Database connection failed
I have checked few posts on Nagios Fusion forums, the recommendations were to restart the services - postgresql, httpd, mysqld, this didn't help at all!!
There was one more post regarding restarting the
setenforce 0
service httpd restart

Luckily this time it worked! I was able to log into the website.

Day 3:
Again we landed into same problem DB Connect Error [nagiosfusion]: Database connection failed
I restarted the services again setenforce 0, service httpd restart. It is working fine again!


Now the issue here is the same setup is going to be replicated in production, we are in a phase of testing the features of Fusion and I am afraid if the same things repeat everyday. Do we have permanent fix for this problem?
For you reference I am attaching the error_log file.

Awaiting your reply!
Thank you

Re: Fusion - DB Connect Error

Posted: Mon Jul 08, 2013 11:14 am
by abrist
Next time this happens, check to see if selinux is re-enabled (I assume it is as you have to setenforce 0). If so, then you should disable selinux completely:

Code: Select all

Edit /etc/selinux/config
Find the line:

SELINUX=enforcing

    a) If you simply want to set selinux to permissive mode - which will still warn you when something would have been denied

    change to

    SELINUX=permissive

    b) If you are sure you want to completely disable selinux

    change to

    SELINUX=disabled

Re: Fusion - DB Connect Error

Posted: Thu Jun 05, 2014 11:48 pm
by Box293
Hey I know this is replying to an old post but I just wanted to throw my 2c in.

I was playing with Fusion today.

I deployed the OVA VM from the website and all went well.

I also installed it manually on a fresh build of CentOS, all went well and I accessed the interface no problems. I had the same issue as the poster. Once I rebooted the VM I received the DB Connect error.

When I found this post, doing the setenforce 0 allowed it to work again ... until I rebooted the server. Following abrist's instructions I edited the /etc/selinux/config and made the changes. Server works fine now after reboots.

I looked at the VM which was deployed from the OVA and this setting was already defined so this VM never had a problem.

Suggestion:
Update the Fusion installer to make the changes to /etc/selinux/config.