SOLVED Database issue on latest trunk
-
Updated to latest GIT trunk last night with the normal git pull ./installfog.sh . It came up with the normal “go to the management url and update Schema” request. When I went there, I receive the following:
Database Schema Installer / Updater
Database Schema Installer / Updater
Your database connection appears to be invalid. FOG is unable to communicate with the database. There are many reasons why this could be the case. Please check your credentials in /var/www/fog/lib/fog/config.class.php. Also confirm that the database is indeed running. If credentials are correct, and the Database service is running, check to ensure your filesystem has enough space.I verified that mysql is running, and that I can connect as the root user. In my the config.class.php, I have:
private static function db_settings() {
define(‘DATABASE_TYPE’,‘mysql’); // mysql or oracle
define(‘DATABASE_HOST’,’’);
define(‘DATABASE_NAME’,‘fog’);
define(‘DATABASE_USERNAME’,’’);
define(‘DATABASE_PASSWORD’,"");When I look at the disk that Mysql is installed on, it has 70gb left, so I don’t believe it’s a space issue. However, when logged in as a non-priviledged user and I attempt to restart mysql, I recieve
df: ‘/var/lib/mysql/.’: Permission Denied
- /etc/init.d/mysql: ERROR: The partition with /var/lib/mysql is too full!
Any ideas?
-
@cnewman402 The OP had an issue because the fog installer at the time was clearing his db settings in .fogsettings. I appreciate you contributing, but this thread isn’t related to SELinux. Maybe make a blurb in the tutorials area?
-
@Wayne-Workman I did have a similar problem in CentOS7. I used a standard security deployment which lead me to the exact issue in this thread. I resolved this by running the command I posted. Sorry for replying to an old thread. I landed here via google, and thought I should contribute.
-
@cnewman402 This thread is two months old and has been solved. Do you have a similar problem?
-
CentOS 7?
sudo su -
setsebool -P httpd_can_network_connect 1 -
-
@Bob-Henderson and now after another update?
-
no dice. Just updated the testing node to 8138, same issue. Putting the info back in config.class.php gets connection back, but it didn’t have them originally.
-
Should be fixed in latest…hopefully.
-
@Bob-Henderson I don’t think it’s wiping them out. It simply has no idea how to handle it from the prior config. I’ll see if I can make some better guesses though.
-
I just went and updated another node via git as well, and it did the same thing. It appears it wipes out the SQl settings in the fogsettings file. Adding them back in fixes it, but obviously isn’t what we’d want.
-
I’ve put those in now, and had verified that if I put them into config.class.php manually, I got database connection back as well.
So we’ve figured out what broke, but I’m sorta confused as to why it happened in the first place? I appreciate the help, just wouldn’t want someone else to update and get the same issue.
-
@Bob-Henderson I dont know if tom agree with that but i find out these fields :
snmysqluser=‘root’
snmysqlhost=‘127.0.0.1’ -
@Bob-Henderson I’m asking to help you.
Please enter your information. ON Main server, the snmysqlhost should be
'127.0.0.1'
snmysqluser should be'root'
snmysqlpass (unless you set a password) should be''
-
Well, that’s odd, those are all blank. No user, pass, host.
It has all my other settings still, like IP and password and such.
-
Yep, nothing is over 35% used.
-
@Bob-Henderson and what displays in the /opt/fog/.fogsettings file for the snmysqlhost and snmysqluser information?
-
Main server, stand alone. Was working fine until I did the update.
Adding in the host and username resolved the issue instantly.
-
@Bob-Henderson Is this a storage node, or main server?
-
@Bob-Henderson yes i noticed that also but if you find out these fields it will be work again
Are you sure that you have space enough in all your partitions ?
df -h