Fusion - DB Connect Error

This support forum board is for questions relating to Nagios Fusion.
Locked
dezire0
Posts: 4
Joined: Tue Jul 02, 2013 3:27 am

Fusion - DB Connect Error

Post 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
You do not have the required permissions to view the files attached to this post.
abrist
Red Shirt
Posts: 8334
Joined: Thu Nov 15, 2012 1:20 pm

Re: Fusion - DB Connect Error

Post 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
Former Nagios employee
"It is turtles. All. The. Way. Down. . . .and maybe an elephant or two."
VI VI VI - The editor of the Beast!
Come to the Dark Side.
User avatar
Box293
Too Basu
Posts: 5126
Joined: Sun Feb 07, 2010 10:55 pm
Location: Deniliquin, Australia
Contact:

Re: Fusion - DB Connect Error

Post 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.
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
Locked