Failed to connect to database server, will try again in next iteration.
-
[quote=“chad-bisd, post: 5302, member: 18”]I don’t see any errors that would indicate a php failure during the authentication check.
Don’t get confused between a system user and a FOG user and a MySQL user.
Is your MySQL root password blank?
Try to login to mysql as root without a password:
[CODE]mysql -u root[/CODE]
Do you get in or do you get an error?[/quote]
It is not blank.
[CODE]mysql -u root
ERROR 1045 (28000): Access denied for user ‘root’@‘localhost’ (using password: NO)[/CODE] -
ok. now make sure the mysql password is set properly in the /var/www/fog/commons/config.php file.
-
[quote=“chad-bisd, post: 5303, member: 18”]I get the “undefined index” errors in my apache log also. They do not keep FOG from working.
Also, why did you quite your own post with the entire log file over again?[/quote]
I added a link to that post in reference to my log file errors. I thought the two were relevant.
-
[quote=“chad-bisd, post: 5305, member: 18”]ok. now make sure the mysql password is set properly in the /var/www/fog/commons/config.php file.[/quote]
It is in there.
[CODE]define( “MYSQL_DATABASE”, “fog” );
define( “MYSQL_USERNAME”, “fogadmin” );
define( “MYSQL_PASSWORD”, “password” );[/CODE] -
That doesn’t look right. The MYSQL_USERNAME shout be root on the master fog server. the MYSQL_PASSWORD should be whatever you use when connecting using “mysql -u root -p” from the command line.
-
[quote=“chad-bisd, post: 5308, member: 18”]That doesn’t look right. The MYSQL_USERNAME shout be root on the master fog server. the MYSQL_PASSWORD should be whatever you use when connecting using “mysql -u root -p” from the command line.[/quote]
I changed the user back to root, the password is correct, and no change.
-
ok. query the users table in the fog database in mysql and post the contents.
[CODE]
mysql -u root -ppassword fog
mysql>select uName from users;
[/CODE]That should list all logins available to the web interfaces.
-
[quote=“chad-bisd, post: 5310, member: 18”]ok. query the users table in the fog database in mysql and post the contents.
[CODE]
mysql -u root -ppassword fog
mysql>select uName from users;
[/CODE]That should list all logins available to the web interfaces.[/quote]
[CODE]mysql> mysql>select uName from users;
ERROR 1064 (42000): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ‘mysql>select uName from users’ at line 1[/CODE] -
when you see it, you’ll be like WHOA!
-
See it??
-
[CODE]mysql> mysql>[/CODE]
I posted the command with the prompt in it so you’d know you need to run the script at the mysql> prompt.
Remove “mysql>” from the query. Technically, I should have said. At the mysql> prompt, type “select uName from users;”
-
[quote=“chad-bisd, post: 5330, member: 18”][CODE]mysql> mysql>[/CODE]
I posted the command with the prompt in it so you’d know you need to run the script at the mysql> prompt.
Remove “mysql>” from the query. Technically, I should have said. At the mysql> prompt, type “select uName from users;”[/quote]
Jesus. :oops:
[CODE]mysql> select uName from users;
±------+
| uName |
±------+
| root |
±------+
1 row in set (0.00 sec)[/CODE] -
ok. you show to only have user that can login to the fog web interface. The username is root.
run this, as it will only update the root user that you use to login to the web interface and nothing else. You can change this after you get back into fog web ui if you want.
run these commands from the “mysql>” prompt after connecting as root.
[CODE]
use fog;
UPDATE users SET uPass = MD5(‘password’) where uName = ‘root’ limit 1;
[/CODE]
If you don’t get any errors then this should reset the password to “password” and let you login to the FOG web user interface with username “root” and password “password”.This DOES NOT change the root password for any other part of FOG or the operating system. This doesn’t even change the mysql root password, ONLY the username and password you put into the login box on the FOG server webpage.
-
[quote=“chad-bisd, post: 5333, member: 18”]ok. you show to only have user that can login to the fog web interface. The username is root.
run this, as it will only update the root user that you use to login to the web interface and nothing else. You can change this after you get back into fog web ui if you want.
run these commands from the “mysql>” prompt after connecting as root.
[CODE]
use fog;
UPDATE users SET uPass = MD5(‘password’) where uName = ‘root’ limit 1;
[/CODE]
If you don’t get any errors then this should reset the password to “password” and let you login to the FOG web user interface with username “root” and password “password”.This DOES NOT change the root password for any other part of FOG or the operating system. This doesn’t even change the mysql root password, ONLY the username and password you put into the login box on the FOG server webpage.[/quote]
I’m IN! That fixed it! Thank you so much Chad. I really appreciate you having patience with me.
Now I will start another thread about why I can’t upload a Windows 7 image without getting that darn multi partition error from the pxe boot screen.
-
In my excitement to get back into the UI, I forgot that the original problem is still present. Still getting the error in the replicator log.
-
edit /opt/fog/service/etc/config.php
update lines:
[CODE]
define( “MYSQL_USERNAME”, “root” );
define( “MYSQL_PASSWORD”, “” );
[/CODE]to be:
[CODE]
define( “MYSQL_USERNAME”, “root” );
define( “MYSQL_PASSWORD”, “[whatever password you use at mysql -u root -p]” );
[/CODE]then:
[CODE]
/etc/init.d/FOGImageReplicator restart
[/CODE] -
[CODE] tail -10 /opt/fog/log/fogreplicator.log
[08-02-12 4:35:11 pm] [08-02-12 4:35:11 pm] Failed to connect to database server, will try again in next iteration.
[08-02-12 4:35:26 pm] * Starting FOG Image Replicator Service
[08-02-12 4:35:31 pm] * [08-02-12 4:35:31 pm] Checking for new tasks every 600 seconds.
[08-02-12 4:35:31 pm] * [08-02-12 4:35:31 pm] Starting service loop.
[08-02-12 4:35:31 pm] [08-02-12 4:35:31 pm] Failed to connect to database server, will try again in next iteration.
[08-02-12 4:37:57 pm] * Starting FOG Image Replicator Service
[08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] Checking for new tasks every 600 seconds.
[08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] Starting service loop.
[08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] Checking if I am the group manager.
[08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] I don’t appear to be the group manager, I will check back later.[/CODE]It worked!
Just the contents of these files which contain usernames and passwords are starting to all look alike.
-
Yes. I have been updating the wiki a lot trying to clarify the user guide and troubleshooting articles. One of those changes in moving the non-empty mysql root password instructions into a template file and transcluding that into all the installation and troubleshooting articles.
And on top of all that, storage nodes use a different setting in the /opt/fog/service/etc/config.php file…
-
[quote=“darthanubis, post: 5407, member: 1659”][CODE] tail -10 /opt/fog/log/fogreplicator.log
[08-02-12 4:35:11 pm] [08-02-12 4:35:11 pm] Failed to connect to database server, will try again in next iteration.
[08-02-12 4:35:26 pm] * Starting FOG Image Replicator Service
[08-02-12 4:35:31 pm] * [08-02-12 4:35:31 pm] Checking for new tasks every 600 seconds.
[08-02-12 4:35:31 pm] * [08-02-12 4:35:31 pm] Starting service loop.
[08-02-12 4:35:31 pm] [08-02-12 4:35:31 pm] Failed to connect to database server, will try again in next iteration.
[08-02-12 4:37:57 pm] * Starting FOG Image Replicator Service
[08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] Checking for new tasks every 600 seconds.
[08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] Starting service loop.
[08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] Checking if I am the group manager.
[08-02-12 4:38:02 pm] * [08-02-12 4:38:02 pm] I don’t appear to be the group manager, I will check back later.[/CODE]It worked!
Just the contents of these files which contain usernames and passwords are starting to all look alike.[/quote]
Am I to be worried about these group manager notices/errors?
-
no. only matters when you add storage nodes.