New website does not appear on slave server

Discussion in 'Installation/Configuration' started by jbmoore, Jul 20, 2011.

  1. jbmoore

    jbmoore New Member

    We are able to add websites to our primary server. When the slave server is designated to receive the site, the site is not added. In fact, the new site for the slave server never gets to the job queue. Both machines are CentOS 5.5 with the same version of ISP Config 3. How can we fix this problem?
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

  3. jbmoore

    jbmoore New Member

    Results of suggested command

    [[email protected] ~]# /usr/local/ispconfig/server/server.sh
    26.07.2011-17:41 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    26.07.2011-17:41 - DEBUG - No Updated records found, starting only the core.
    26.07.2011-17:41 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished.

    This is the results of the command on the slave server. Should we have seen the website update here? Should we rerun the website add in the ISPConfig interface and post those results?
     
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Yes, please do that and then post the output again.
     
  5. jbmoore

    jbmoore New Member

    Rerun suggested command and check log

    The output of the "server.sh" command is as follows:
    "[[email protected] ~]# /usr/local/ispconfig/server/server.sh
    02.08.2011-15:50 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    02.08.2011-15:50 - DEBUG - No Updated records found, starting only the core.
    /usr/bin/fail2ban-client
    02.08.2011-15:50 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished.
    You have new mail in /var/spool/mail/root"

    Here is an excerp of the slave server log for the same time period:
    "02.08.2011-15:40 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    02.08.2011-15:40 - DEBUG - Found 1 changes, starting update process.
    02.08.2011-15:40 - DEBUG - Replicated from master: DELETE FROM web_domain WHERE domain_id = 3
    02.08.2011-15:40 - DEBUG - Processed datalog_id 42
    02.08.2011-15:40 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    02.08.2011-15:41 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    02.08.2011-15:41 - DEBUG - Found 1 changes, starting update process.
    02.08.2011-15:41 - DEBUG - Replicated from master: REPLACE INTO web_domain (`domain_id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`server_id`,`ip_address`,`domain`,`type`,`parent_domain_id`,`vhost_type`,`document_root`,`system_user`,`system_group`,`hd_quota`,`traffic_quota`,`cgi`,`ssi`,`suexec`,`errordocs`,`is_subdomainwww`,`subdomain`,`php`,`ruby`,`redirect_type`,`redirect_path`,`ssl`,`ssl_state`,`ssl_locality`,`ssl_organisation`,`ssl_organisation_unit`,`ssl_country`,`ssl_domain`,`ssl_request`,`ssl_cert`,`ssl_bundle`,`ssl_action`,`stats_password`,`stats_type`,`allow_override`,`apache_directives`,`php_open_basedir`,`custom_php_ini`,`backup_interval`,`backup_copies`,`active`,`traffic_quota_lock`) VALUES ('5','2','2','riud','ru','','3','*','iluvmywebdev.com','vhost','0','name','/var/www/clients/client1/web5','web5','client1','-1','-1','n','n','n','1','1','www','mod','n','','','n','','','','','','','','','','','','webalizer','All','','/var/www/clients/client1/web5/web:/var/www/clients/client1/web5/tmp:/var/www/iluvmywebdev.com/web:/srv/www/iluvmywebdev.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin','','none','1','y','n')
    02.08.2011-15:41 - DEBUG - Processed datalog_id 43
    02.08.2011-15:41 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    02.08.2011-15:42 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    02.08.2011-15:42 - DEBUG - No Updated records found, starting only the core.
    02.08.2011-15:42 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock"

    These last 3 lines are constantly replicated.at the end of the file. The web site directories are never installed on the slave server.
     
  6. jbmoore

    jbmoore New Member

    Follow up on slave server not installing websites.

    Any ideas on why this is happening would be greatly appreciated. We are stuck here. Do we need to do more testing?

    Thanks.
     
  7. till

    till Super Moderator Staff Member ISPConfig Developer

    Thats ok and means the the slave can connect to the master successfully. There are just no more changes waiting in the queue of the master.

    Which tutorial did you use to install the master / slave setup?
     
  8. jbmoore

    jbmoore New Member

    Tutorials used to install the master/slave server config

    We used HowToForge Tutorials:
    To install the master server we used, " The Perfect Server - CentOS 5.4 i386 ISPConfig 3'. That particular box is a 32 bit machine, so we made sure we used the correct libraries. To install the Multiserver setup for the slave we used, "Installing a Multiserver Setup With Dedicated Web, Email, DNS And MySQL Database Servers on Debian 5.0 with ISPConfig 3". We substituted configuration information for CentOS 5.4 x86 64 ISPConfig 3 for the differences in Debian and CentOS. This is a 64 bit box.
     
  9. jbmoore

    jbmoore New Member

    The tutorials we used for master/slave

    Where should we look next? We made appropiate adjustments as we installed the master server on CentOS 5 while following the second Tutorial for installing master/slave servers in Debian 5.0. Is there something in the difference between Debian and CentOS 5 that may be causing the communication problem? Or is our master server just not filling the slave server queue for some reason? The slave server is recognized by the master in the servers interface.
     
    Last edited: Aug 20, 2011
  10. jbmoore

    jbmoore New Member

    Slave server dB has site record but no directory tree created

    There is a record for the new site in the slave server dB that matches the master server dB. But there is no directory tree (/var/www/clients/client1/web5) for the new site on the slave server.

    How can we track down this problem?
     
  11. jbmoore

    jbmoore New Member

    Slave server dB

    Should the slave server dB have a directory tree entry or should the master server be writing the directory tree directly to the slave server, bypassing its dB? The slave server dB does not seem to be triggering a cron job to write the tree. Here is a snippet of the cron log:

    PHP Warning: mysql_connect(): Unknown MySQL server host 'ispconf.esonicspider.com' (2) in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 78
    PHP Warning: mysql_errno(): supplied argument is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 63
    PHP Warning: mysql_error(): supplied argument is not a valid MySQL-Link resource in /usr/local/ispconfig/server/lib/classes/db_mysql.inc.php on line 64
    chmod: cannot access `/var/log/ispconfig/httpd/*': No such file or directory
    chmod: cannot access `/var/log/ispconfig/httpd/*': No such file or directory
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so the reason for your problem is what I suggested in my first answer. The login details on the slave server for the master database are wrong. The slave server is not able to resolve the hostname of the master server.

    As described in the multiserver tutorial, you have to edit the /etc/hosts file on the amster and slave server and set there records for the master and the slave hostname to ensure that name resolving for mysql works properly. Edit the /etc/hosts file of the slave server and add a line for ispconf.esonicspider.com pointing to the master server IP.
     
  13. nayr

    nayr New Member

    Filesystem on slave servers is not touched, you must sync these manually wither with a Clustered FS or something like Rsync...

    The apache configs and sys-users are the only thing replicated on a slave server.
     
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    The directory tree /var/www/clients/client1/web5 is created by ispconfig automatically. The parts that get not synced are files and content inside the "web" directory of the website like images or html files of your website. But the error above is clear and indicates that he has a db access problem.
     
  15. jbmoore

    jbmoore New Member

    dB access problem is fixed, still no directory tree

    We did see some host file inconsistency on the slave. That was fixed following your instructions. We then renamed the old ispconfig and cron logs so we have fresh logs.
    After running another website addition to the slave server the new cron.log is empty. The new ispconfig.log shows no errors and the following update to the slave dB:

    "30.08.2011-16:04 - DEBUG - Replicated from master: REPLACE INTO web_domain..."

    The log goes on to detail the website we have added but it never gets replicated into the directory tree. We see the dB entries for the new site both in the master dB and in the slave dB. We still don't have the /var/www/clients/... directories.
     
  16. till

    till Super Moderator Staff Member ISPConfig Developer

    Enable debugging in ispconfig on the slave as decsribed in the FAQ and then run the /usr/local/ispconfig/server/server.sh script manually as root and pots the output.
     
  17. jbmoore

    jbmoore New Member

    Output of server.sh script on Slave with debugging enabled

    Here is the terminal output with no websites waiting to be installed:

    "06.09.2011-15:03 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    06.09.2011-15:03 - DEBUG - No Updated records found, starting only the core.
    06.09.2011-15:03 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished."

    Here is the log on the slave server after a website was updated on the master:

    "06.09.2011-15:33 - DEBUG - Replicated from master: REPLACE INTO domain (`domain_id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`domain`) VALUES ('1','1','2','riud','ru','','iluvmywebdev.net')
    06.09.2011-15:33 - DEBUG - Processed datalog_id 48"

    Nothing is written to the slave directory tree.
     
  18. till

    till Super Moderator Staff Member ISPConfig Developer

    Ok, so the replication works fine. But according to the log, you updated a "domain" record in the domain module and not a website. Domains in the domain module dont have any directories, so it is correct that nothing was created. Please edit a website, change e.g. the quota, press save and run the server.sh script again and post the output that you get then.
     
  19. jbmoore

    jbmoore New Member

    Results of adding website on the Slave Server

    I apologise for throwing you off with the previous log copy. I have copied the results of running server.sh after the following info from the current log.

    Here is the current ispconfig.log for adding a website to the slave server. There is no directory tree created even though listed in this log:

    "13.09.2011-15:36 - DEBUG - Found 1 changes, starting update process.
    13.09.2011-15:36 - DEBUG - Replicated from master: REPLACE INTO web_domain (`domain_id`,`sys_userid`,`sys_groupid`,`sys_perm_user`,`sys_perm_group`,`sys_perm_other`,`server_id`,`ip_address`,`domain`,`type`,`parent_domain_id`,`vhost_type`,`document_root`,`system_user`,`system_group`,`hd_quota`,`traffic_quota`,`cgi`,`ssi`,`suexec`,`errordocs`,`is_subdomainwww`,`subdomain`,`php`,`ruby`,`redirect_type`,`redirect_path`,`ssl`,`ssl_state`,`ssl_locality`,`ssl_organisation`,`ssl_organisation_unit`,`ssl_country`,`ssl_domain`,`ssl_request`,`ssl_cert`,`ssl_bundle`,`ssl_action`,`stats_password`,`stats_type`,`allow_override`,`apache_directives`,`php_open_basedir`,`custom_php_ini`,`backup_interval`,`backup_copies`,`active`,`traffic_quota_lock`) VALUES ('11','2','2','riud','ru','','3','*','iluvmywebdev.com','vhost','0','name','/var/www/clients/client1/web11','web11','client1','-1','-1','n','n','n','1','1','www','mod','n','','','n','','','','','','','','','','','','webalizer','All','','/var/www/clients/client1/web11/web:/var/www/clients/client1/web11/tmp:/var/www/iluvmywebdev.com/web:/srv/www/iluvmywebdev.com/web:/usr/share/php5:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin','','none','1','y','n')
    13.09.2011-15:36 - DEBUG - Processed datalog_id 58"

    The results of running server.sh:

    "[[email protected] ~]# /usr/local/ispconfig/server/server.sh
    13.09.2011-15:43 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    13.09.2011-15:43 - DEBUG - No Updated records found, starting only the core.
    13.09.2011-15:43 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished."
     
  20. jbmoore

    jbmoore New Member

    Directories not created on the slave server

    I apologise for throwing you off with the previous log copy. I have copied the results of running server.sh after creating a new website on the master.

    The results of running server.sh:

    "[[email protected] ~]# /usr/local/ispconfig/server/server.sh
    13.09.2011-15:43 - DEBUG - Set Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    13.09.2011-15:43 - DEBUG - No Updated records found, starting only the core.
    13.09.2011-15:43 - DEBUG - Remove Lock: /usr/local/ispconfig/server/temp/.ispconfig_lock
    finished."

    There are still no directories created on the slave server.
     

Share This Page