HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=27)
-   -   Problem creating MySQL dbs in Multi-Server Configuration (http://www.howtoforge.com/forums/showthread.php?t=51112)

AmpSys 25th January 2011 16:42

Problem creating MySQL dbs in Multi-Server Configuration
 
Hey Guys,

Long time lurker, first time poster here.

We are running a multi-server ISPCONFIG3 platform which was setup per the Administrator guide for ISPCONFIG3.

The configuration is such that there are 5 dedicated ISPCONFIG servers as follows:
Code:

Server                                            |                  IP       
web1 (ISPCONFIG console loaded here)              |              10.10.10.15
mail1                                            |              10.10.10.14
ns1                                              |              10.10.10.11
ns2                                              |              10.10.10.13
db1                                              |              10.10.10.16

The installation guide was followed to the "T" - all servers are Debian Lenny 5.07 VMs.

There are no issue in creating sites, FTP users, adding/removing/editing DNS records, propagation of these between ns1 and ns2 servers, or problems with mail accounts/databases on mail1.

However, whenever we create a database & user, it is NOT being created at db1. Ironically, the first website and db we setup did work, but something since has broken and we can't seem to figure it out.

/etc/mysql/my.cnf has been checked and confirmed to be listening on all interfaces (both web1 and db1).

Does anyone have any suggestions/advice on what we can check to try and correct?

Thanks in advance for your help!

till 25th January 2011 17:09

Have you changed the password of the mysql root user on the db server? If yous, please change it in /usr/local/ispconfig/server/lib/mysql_clientdb.conf file too or ispconfig is not able to create databases anymore.

AmpSys 25th January 2011 17:14

Quote:

Originally Posted by till (Post 249566)
Have you changed the password of the mysql root user on the db server? If yous, please change it in /usr/local/ispconfig/server/lib/mysql_clientdb.conf file too or ispconfig is not able to create databases anymore.

Hi Till,

Thanks for the quick reply! There haven't been any password changes to the MySQL root user (at least, best I know), but I'll check the file suggested and advise.

Question - does it matter if the root account on all servers use the same password?

*Edit - Confirmed - there have been no password changes after checking the file.

till 25th January 2011 21:37

Please enable logelevel debug for the db server in ispconfig under system > server config. Then run:

/usr/local/ispconfig/server/server.sh

on the db server as root and post the output that you get on the screen.

AmpSys 26th January 2011 01:09

Quote:

Originally Posted by till (Post 249589)
Please enable logelevel debug for the db server in ispconfig under system > server config. Then run:

/usr/local/ispconfig/server/server.sh

on the db server as root and post the output that you get on the screen.

Here's the output:

Code:

db1:~# /usr/local/ispconfig/server/server.sh
25.01.2011-19:07 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
25.01.2011-19:07 - DEBUG - No Updated records found, starting only the core.
25.01.2011-19:07 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
finished.


till 26th January 2011 08:24

Thats ok.

1) You are sure that you selected this db server as target for the new database and not one of the other nodes?
2) Have you deleted any records in the ispconfig database manually or did you try to reset ispconfig somehow after your first working tests?

AmpSys 26th January 2011 15:23

Quote:

Originally Posted by till (Post 249609)
Thats ok.

1) You are sure that you selected this db server as target for the new database and not one of the other nodes?
2) Have you deleted any records in the ispconfig database manually or did you try to reset ispconfig somehow after your first working tests?

Yes, in fact there is no option to select any other servers.

No - ISPCONFIG db (dbispconfig) has not been touched at all.

We are getting by through manually creating the dbs on db1 at the shell level which is fine for clients/situations that we manage directly. But until this is sorted out, any designs we had of allowing resellers to create their own webs/dbs through the console is not going to be possible. :(

till 26th January 2011 15:39

Please do these steps to debug your setup:

1) On the db server, comment out the server.sh cronjob in the root crontab. Run "crontab -e" as root on the db server to edit the crontab and add a # at the beginning of the line and save the file.

2) Create a new database in ispconfig.

3) Run:

/usr/local/ispconfig/server/server.sh

again on the db server and post the output.

Additionally I need to know which ISPConfig version you use.

AmpSys 26th January 2011 16:19

Quote:

Originally Posted by till (Post 249659)
Please do these steps to debug your setup:

1) On the db server, comment out the server.sh cronjob in the root crontab. Run "crontab -e" as root on the db server to edit the crontab and add a # at the beginning of the line and save the file.

2) Create a new database in ispconfig.

3) Run:

/usr/local/ispconfig/server/server.sh

again on the db server and post the output.

Additionally I need to know which ISPConfig version you use.

Output:
Code:

db1:~# /usr/local/ispconfig/server/server.sh

Warning: mysql_connect(): Access denied for user 'root'@'localhost' (using password: YES) in /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php on line 133

Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /usr/local/ispconfig/server/plugins-available/mysql_clientdb_plugin.inc.php on line 135
26.01.2011-10:17 - ERROR - Unable to connect to the database
finished.

Running ISPCONFIG 3.0.3.1

Strange - running the same command again I get:

Code:

db1:~# /usr/local/ispconfig/server/server.sh
sh: repquota: command not found
sh: repquota: command not found
/usr/bin/fail2ban-client
finished.

And now:
Code:

db1:~# /usr/local/ispconfig/server/server.sh
finished.


till 26th January 2011 16:28

Ok. So the problem is what I suggested in post #2 of this thread. It is not possible to login to the mysql database with the mysql login details that are in the mysql_clientdb.conf file.

Please ensure that a login with the details in that file as root user to localhost is possible. You can test that with the command:

mysql -h localhost -u root -p

and then enter the password that you find in the mysql_clientdb.conf file on the db server.

Quote:

Strange - running the same command again I get:
Thats not strange, as the transacrtion has been closed and no other transactions are waiting. Also the jobs that are processed at a given time vary as not every monitoriyng process gets called every time you execute the script to ensure that the system does not get overloaded.


All times are GMT +2. The time now is 17:44.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.