clarknova Posted April 28, 2010 Posted April 28, 2010 I'm having problems setting up my storage node and getting the replication working so that the master node copies all of its stored images across. I'm running ubuntu 9.10 server on the node and 9.04 desktop on the main system. I've got a feeling it's something to do with the MySQL on the main server having a root password but I'm no good with MySQL (this is the first time I've had to deal with it in fact). The fogreplicator.log on the main machine keeps reporting: Failed to connect to database server, will try again in next iteration. This is my config.php from the node: define( "UPDSENDERPATH", "/usr/local/sbin/udp-sender" ); define( "MULTICASTLOGPATH", "/opt/fog/log/multicast.log" ); define( "MULTICASTDEVICEOUTPUT", "/dev/tty2" ); define( "MULTICASTSLEEPTIME", 10 ); define( "MULTICASTINTERFACE", "eth0" ); define( "UDPSENDER_MAXWAIT", null ); define( "MYSQL_HOST", "172.30.249.200" ); define( "MYSQL_DATABASE", "fog" ); define( "MYSQL_USERNAME", "fogstorage" ); define( "MYSQL_PASSWORD", "31c09b" ); define( "LOGMAXSIZE", "1000000" ); define( "REPLICATORLOGPATH", "/opt/fog/log/fogreplicator.log" ); define( "REPLICATORDEVICEOUTPUT", "/dev/tty3" ); define( "REPLICATORSLEEPTIME", 600 ); define( "REPLICATORIFCONFIG", "/sbin/ifconfig" ); define( "SCHEDULERLOGPATH", "/opt/fog/log/fogscheduler.log" ); define( "SCHEDULERDEVICEOUTPUT", "/dev/tty4" ); define( "SCHEDULERWEBROOT", "/var/www/fog" ); define( "SCHEDULERSLEEPTIME", 60 ); ?> If anybody can give me a pointer with this I'd be really grateful. Anything else needed to progress, let me know and I'll post any log files or config files I have. Thanks:o
dwhyte85 Posted April 29, 2010 Posted April 29, 2010 Hello, On MySQL have you allowed connections for any rather than just localhost for the user root? Cheers,
clarknova Posted April 29, 2010 Author Posted April 29, 2010 I don't think I have. How would I check? Many thanks.
dwhyte85 Posted April 29, 2010 Posted April 29, 2010 If you don't have PHPMyadmin e.g., http://fogserver/phpmyadmin as a control panel... MySql: Give Root User Logon Permission From Any Host - How-To Geek You need to connect to MySQL for the above. If you have PHPmyadmin let me know and i'll make some screen grabs. 1
clarknova Posted April 29, 2010 Author Posted April 29, 2010 I don't have phpmyadmin installed. Can I install it and access through a web interface? I'm running everything through ssh currently to interact with the server and node becuase I haven't installed a GUI. Ok, here's the output I'm getting from the link you provided: mysql> use mysql; Reading table information for completion of table and column names You can turn off this feature to get a quicker startup with -A Database changed mysql> select host, user from user; +-----------+------------------+ | host | user | +-----------+------------------+ | % | fogstorage | | 127.0.0.1 | root | | fog | root | | localhost | debian-sys-maint | | localhost | root | +-----------+------------------+ 5 rows in set (0.00 sec) I need to do this on the main server, is that correct? I'll then add this: update user set host=’%’ where user=’root’ and host=’fog’; flush privileges; As described in the link. Do I then need to make any changes to the config.php files on the server or node? Thanks again, I really appreciate your help.
clarknova Posted April 29, 2010 Author Posted April 29, 2010 Will PHPmyadmin be useful to me? I'm way out of my depth here with PHP and MySQL. I only ever do a bit of BASH scripting usually! It's in the Ubuntu server repos so I can install it if you think it's going to make troubleshooting this problem easier.
dwhyte85 Posted April 29, 2010 Posted April 29, 2010 Hi clarknova, The first post - no you dont change the config files and just follow the guide, it makes a change on MySQL saying any IP/Host can connect with root user. PHPMyadmin is a cool web gui, i like it - if you know what you're doing, install it :-)
clarknova Posted April 29, 2010 Author Posted April 29, 2010 Hmm, I'm doing something wrong here: mysql> update user set host=’%’ where user=’root’ and host=’fog’; flush priveleges; 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 '��%’ where user=’root’ and host=’fog’' at line 1 Can you see what's wrong?
clarknova Posted April 29, 2010 Author Posted April 29, 2010 Never mind, I think I've managed to issue those commands now (typed them instead of copy/paste - I wonder why that should make a difference!") So the node should now connect successfully regardless of username and password? I don't need to provide it with the root user password or something similar in the config file?
clarknova Posted April 29, 2010 Author Posted April 29, 2010 Ok, well I've done that and still no joy. This is my /usr/fog/service/etc/config.php from my main server: define( "UPDSENDERPATH", "/usr/local/sbin/udp-sender" ); define( "MULTICASTLOGPATH", "/opt/fog/log/multicast.log" ); define( "MULTICASTDEVICEOUTPUT", "/dev/tty2" ); define( "MULTICASTSLEEPTIME", 10 ); define( "MULTICASTINTERFACE", "eth1" ); define( "UDPSENDER_MAXWAIT", null ); define( "MYSQL_HOST", "172.30.249.200" ); define( "MYSQL_DATABASE", "fog" ); define( "MYSQL_USERNAME", "root" ); define( "MYSQL_PASSWORD", "mypassword" ); define( "LOGMAXSIZE", "1000000" ); define( "REPLICATORLOGPATH", "/opt/fog/log/fogreplicator.log" ); define( "REPLICATORDEVICEOUTPUT", "/dev/tty3" ); define( "REPLICATORSLEEPTIME", 600 ); define( "REPLICATORIFCONFIG", "/sbin/ifconfig" ); define( "SCHEDULERLOGPATH", "/opt/fog/log/fogscheduler.log" ); define( "SCHEDULERDEVICEOUTPUT", "/dev/tty4" ); define( "SCHEDULERWEBROOT", "/var/www/fog" ); define( "SCHEDULERSLEEPTIME", 60 ); ?> And this is the one from my node: define( "UPDSENDERPATH", "/usr/local/sbin/udp-sender" ); define( "MULTICASTLOGPATH", "/opt/fog/log/multicast.log" ); define( "MULTICASTDEVICEOUTPUT", "/dev/tty2" ); define( "MULTICASTSLEEPTIME", 10 ); define( "MULTICASTINTERFACE", "eth1" ); define( "UDPSENDER_MAXWAIT", null ); define( "MYSQL_HOST", "172.30.249.200" ); define( "MYSQL_DATABASE", "fog" ); define( "MYSQL_USERNAME", "root" ); define( "MYSQL_PASSWORD", "mypassword" ); define( "LOGMAXSIZE", "1000000" ); define( "REPLICATORLOGPATH", "/opt/fog/log/fogreplicator.log" ); define( "REPLICATORDEVICEOUTPUT", "/dev/tty3" ); define( "REPLICATORSLEEPTIME", 600 ); define( "REPLICATORIFCONFIG", "/sbin/ifconfig" ); define( "SCHEDULERLOGPATH", "/opt/fog/log/fogscheduler.log" ); define( "SCHEDULERDEVICEOUTPUT", "/dev/tty4" ); define( "SCHEDULERWEBROOT", "/var/www/fog" ); define( "SCHEDULERSLEEPTIME", 60 ); ?> Should I be able to log in successfully with these config files? Do I need to change the password fields within the FOG management console for it to work? Apologies for what are probably silly questions and thanks again.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now