Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Install on CentOS 8 error after first reboot
#1
hello everyone,

I have a server Pandora FMS v7.0NG.715 OpenSuse 42 Leap.
I try to install Pandora 750 on Centos 8 with this doc:
https://pandorafms.com/docs/index.php?ti...ntOS_7.2F8
At the end everythings is ok but if I restart the server, I have this error :
Problem with Pandora FMS database

Cannot connect to the database, please check your database setup in the include/config.php file.

For test, I didn't change password and config.
My includr/config.php file:
<?php
\$config["dbtype"] = "mysql";
\$config["dbname"]="$DBNAME";
\$config["dbuser"]="$DBUSER";
\$config["dbpass"]="$DBPASS";
\$config["dbhost"]="$DBHOST";
\$config["homedir"]="/var/www/html/pandora_console";
\$config["homeurl"]="/pandora_console";
error_reporting(0);
\$ownDir = dirname(__FILE__) . '/';
include (\$ownDir . "config_process.php");

do you have an idea how to solve this problem?

Thank you.
 Reply
#2
Hello,

There are several checks to know what is failing you in the PandoraFMS DB connection. Next I detail them, check them by order if possible.

1) Check that mysql is up and running.

2) Try to access manually to mysql to the PandoraFMS DB and with its user.

3) Check the permissions, user and group of the file config.php, it must be 600 apache:apache.

4) If you have configured the config.php with environment variables, check that the variables have the correct information, for that you can execute "echo $DBNAME" and check each one of the variables.

5) Finally and what I think less likely is that the path of the config.php is wrong, so I see you have put that the path is includr/config.php, but is include/config.php, but I understand that this will be a simple error when writing.

Greetings
Diego
 Reply
#3
(12-02-2020, 09:09 AM)Diego.M Wrote: Hello,

There are several checks to know what is failing you in the PandoraFMS DB connection. Next I detail them, check them by order if possible.

1) Check that mysql is up and running.

2) Try to access manually to mysql to the PandoraFMS DB and with its user.

3) Check the permissions, user and group of the file config.php, it must be 600 apache:apache.

4) If you have configured the config.php with environment variables, check that the variables have the correct information, for that you can execute "echo $DBNAME" and check each one of the variables.

5) Finally and what I think less likely is that the path of the config.php is wrong, so I see you have put that the path is includr/config.php, but is include/config.php, but I understand that this will be a simple error when writing.

Greetings
Diego
Hello,

Thanks for your reply,

1) mysqld Active and running

2) Accès to pandora database with command line ok

3) Permissions for /include/config.php ok

4) Environment variables: they are all empty.
Apparently this is normal after a reboot on linux
I retryed the mysql and php configuration parts without environment variable but the problem persists.

5) it's a writing error, sorry.
 Reply
#4
Hello,

I recommend that you don't use the environment variables if they can give you this kind of problems. Instead write the data directly in the config.php. I understand that this is what you have done and that it is also giving you errors, my advice is to double check the data entered in the config.php and after editing it look again at the permissions of the file, especially the user and group, as it may have been modified when editing the file.

Check also that the data introduced in the config.php match with the ones in the pandora_server.conf

In case after this the problem persists, please send us the content of the config.php file so we can check that there is no error in its format and also send us the content of the pandora_server.log file so we can see if this clarifies the origin of the problem.

Greetings
Diego
 Reply
#5
Thank you for help!
 Reply


Users browsing this thread: 1 Guest(s)


(c) 2006-2018 Artica Soluciones Tecnológicas. Contents of this wiki are under Create Common Attribution v3 licence. | pandorafms.com | pandorafms.org

Theme © MyBB Themes