How-to Updating ISPConfig in a Multiserver System

Discussion in 'General' started by vaio1, Nov 26, 2011.

  1. vaio1

    vaio1 Member

    Hi guys,

    how have I to update ISPConfig to the newer version using the shell command in a multiserver configuration?

    Thanks
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    I would update the master server first by running the ispconfig_update.sh command as root user on the shell. Select "stable" as update source and when the installer asks you to reconfigure permissions in the master database, choose yes.

    For the slaves, use also the ispconfig_update.sh command as root on the shell, choose stable as update source. For the slaves you dont have to reconfigure the permissions in the master database as all permissions for all slaves ahd already been updated while you updated the master.

    Before you do the update, you should make a backup of ispconfig and the /etc/ directory as described here:

    http://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-update-ispconfig-3/
     
    Sotmlac, SupuS and ChuckSC like this.
  3. vaio1

    vaio1 Member

    The Main Server has been updated correctly.
    Then this is the result after db server update:

    Code:
    --------------------------------------------------------------------------------
     _____ ___________   _____              __ _         ____
    |_   _/  ___| ___ \ /  __ \            / _(_)       /__  \
      | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _    _/ /
      | |  `--. \  __/  | |    / _ \| '_ \|  _| |/ _` |  |_ |
     _| |_/\__/ / |     | \__/\ (_) | | | | | | | (_| | ___\ \
     \___/\____/\_|      \____/\___/|_| |_|_| |_|\__, | \____/
                                                  __/ |
                                                 |___/ 
    --------------------------------------------------------------------------------
    
    
    >> Update  
    
    Operating System: Debian 6.0 (Squeeze/Sid) or compatible
    
    This application will update ISPConfig 3 on your server.
    MySQL master server hostname [webserver.mydomain.com]: 
    
    MySQL master server root username [root]: 
    
    MySQL master server root password []: xxxxxxxxxx
    
    MySQL master server database name [dbispconfig]: 
    
    Checking ISPConfig database .. OK
    Starting incremental database update.
    ERROR 1060 (42S21) at line 1: Duplicate column name 'company_id'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0005.sql
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0006.sql
    ERROR 1060 (42S21) at line 1: Duplicate column name 'limit_mailmailinglist'
    ERROR 1060 (42S21) at line 2: Duplicate column name 'limit_mailmailinglist'
    ERROR 1051 (42S02) at line 19: Unknown table 'mail_mailman_domain'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0007.sql
    ERROR 1060 (42S21) at line 2: Duplicate column name 'id_rsa'
    ERROR 1060 (42S21) at line 3: Duplicate column name 'ssh_rsa'
    ERROR 1060 (42S21) at line 4: Duplicate column name 'ssh_rsa'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0008.sql
    ERROR 1060 (42S21) at line 64: Duplicate column name 'proxy_server'
    ERROR 1060 (42S21) at line 65: Duplicate column name 'firewall_server'
    ERROR 1060 (42S21) at line 66: Duplicate column name 'nginx_directives'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0009.sql
    ERROR 1060 (42S21) at line 2: Duplicate column name 'login'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0010.sql
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0011.sql
    ERROR 1062 (23000) at line 49: Duplicate entry '1' for key 'PRIMARY'
    ERROR 1062 (23000) at line 109: Duplicate entry '1' for key 'PRIMARY'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0012.sql
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0013.sql
    ERROR 1060 (42S21) at line 2: Duplicate column name 'source_read_all'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0014.sql
    ERROR 1060 (42S21) at line 2: Duplicate column name 'limit_openvz_vm'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0015.sql
    ERROR 1060 (42S21) at line 1: Duplicate column name 'ip_type'
    ERROR 1060 (42S21) at line 2: Duplicate column name 'virtualhost_port'
    ERROR 1060 (42S21) at line 3: Duplicate column name 'client_id'
    ERROR 1060 (42S21) at line 4: Duplicate column name 'disablesieve'
    ERROR 1060 (42S21) at line 5: Duplicate column name 'disablelda'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0016.sql
    ERROR 1060 (42S21) at line 1: Duplicate column name 'limit_openvz_vm'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0017.sql
    ERROR 1060 (42S21) at line 1: Duplicate column name 'web_php_options'
    ERROR 1060 (42S21) at line 2: Duplicate column name 'ssh_chroot'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0018.sql
    ERROR 1051 (42S02) at line 55: Unknown table 'mail_greylist'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0019.sql
    ERROR 1060 (42S21) at line 1: Duplicate column name 'seo_redirect'
    ERROR 1060 (42S21) at line 2: Duplicate column name 'server_id'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0020.sql
    ERROR 1060 (42S21) at line 1: Duplicate column name 'php_fpm_use_socket'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0021.sql
    ERROR 1060 (42S21) at line 1: Duplicate column name 'ipv6_address'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0022.sql
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0023.sql
    ERROR 1060 (42S21) at line 1: Duplicate column name 'python'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0024.sql
    ERROR 1060 (42S21) at line 1: Duplicate column name 'pm_max_children'
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0025.sql
    Loading SQL patch file: /tmp/ispconfig3_install/install/sql/incremental/upd_0026.sql
    
     
    Last edited: Nov 26, 2011
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if the database scheme on your db server was already newer then the scheme number that was stored in the server record of the master database for this slave was. Thats not a problem as the errors mean just that the table was already up to date, so this cause no harm. Maybe you restored one of the databases of the master or db server from a backup soe time ago or the databse scheme number was changed otherwise?
     
  5. vaio1

    vaio1 Member

    I was scared!
    I have not restore nothing, I have just update the system for the first time today, after your first post here. Can I continue to update the mail server?

    thanks Till
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    If you did not receive any other errors after the ones that you posted, then the update was successfull.

    Yes.
     
  7. vaio1

    vaio1 Member

    Hi again Till,

    I get this error in the ISPConfig Mailserver Log:

    Code:
    Replication failed. Error: (mail_user) in MySQL server: (localhost) Unknown column 'autoresponder_subject' in 'field list' 
    What have I to do?
     
  8. till

    till Super Moderator Staff Member ISPConfig Developer

    Seems as if you installed a svn development version on your master server and not a stable ispconfig version. The database field autoresponder_subject does not exist in iSPConfig 3.0.4.1, it exists only in svn trunk.

    To fix that, you could either upgrade to svn trunk on the mailserver too, which I dont recommend fro production systems. As you cant downgrade the master, the best solution to fix this might be that you add a field named "autoresponder_subject" as varchar 255 in the table "mail_user" in the ispconfig database of the mail server with phpmyadmin.
     
  9. vaio1

    vaio1 Member

    Hi Till,

    I have not installed the SVN version I'm sure. I have installed the stable release not the svn.

    The Master and Mail Server DB Version is 3.0.3.2

    Code:
    
    Connection id:    1013
    Current database: dbispconfig
    
    mysql> SELECT * FROM `sys_config`;
    +-----------+-------+------------+---------+
    | config_id | group | name       | value   |
    +-----------+-------+------------+---------+
    |         1 | db    | db_version | 3.0.3.2 |
    +-----------+-------+------------+---------+
    1 row in set (0.00 sec)
    
    
     
    Last edited: Nov 26, 2011
  10. till

    till Super Moderator Staff Member ISPConfig Developer

    The field autoresponder_subject exists only in svn, it does not exist in 3.0.4.1. I just verified this by a fulltext search in the code, so ther is no doubt about that. So you have either the svn version installed or you added the field autoresponder_subject manually in your master database. The update or that you added this field can happend some time ago and not today.
     
  11. vaio1

    vaio1 Member

    Can u please send me the alter table sql in order to avoid to execute a wrong command?
     
  12. till

    till Super Moderator Staff Member ISPConfig Developer

    Here the alter table statement from svn trunk:

    Code:
    ALTER TABLE  `mail_user` ADD  `autoresponder_subject` VARCHAR(255) NOT NULL DEFAULT 'Out of office reply' AFTER  `autoresponder_end_date`;
     
  13. vaio1

    vaio1 Member

    Done. thanks
    Seems to work! All servers are green! Thanks again!

    I have seen this error in the log:

    MAIL SERVER (System Messages)
    Code:
    Nov 20 06:25:15 mailserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="964" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 21 06:25:08 mailserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="964" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 22 06:25:09 mailserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="964" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 23 06:25:10 mailserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="964" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 24 06:25:20 mailserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="964" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 25 06:25:13 mailserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="964" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 26 06:25:07 mailserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="964" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 26 06:25:08 mailserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="964" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 26 13:17:30 mailserver kernel: [3392908.965516] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
    Nov 26 13:17:30 mailserver kernel: [3392908.966320] SGI XFS Quota Management subsystem
    Nov 26 13:17:30 mailserver kernel: [3392908.971100] JFS: nTxBlock = 8192, nTxLock = 65536
    Nov 26 13:17:30 mailserver kernel: [3392908.987790] NTFS driver 2.1.29 [Flags: R/W MODULE].
    Nov 26 13:17:30 mailserver kernel: [3392908.999077] QNX4 filesystem 0.2.3 registered.
    Nov 26 13:17:30 mailserver kernel: [3392909.015676] Btrfs loaded
    Nov 26 13:17:30 mailserver os-prober: debug: running /usr/lib/os-probes/50mounted-tests on /dev/sda2
    Nov 26 13:17:30 mailserver 50mounted-tests: debug: /dev/sda2 type not recognised; skipping
    Nov 26 13:17:30 mailserver os-prober: debug: os detected by /usr/lib/os-probes/50mounted-tests
    Nov 26 13:17:30 mailserver os-prober: debug: /dev/sda5: is active swap
    
    WEB SERVER (System Messages)
    Code:
    Nov 26 13:17:35 webserver os-prober: debug: running /usr/lib/os-probes/50mounted-tests on /dev/sda3
    Nov 26 13:17:35 webserver 50mounted-tests: debug: /dev/sda3 type not recognised; skipping
    Nov 26 13:17:35 webserver os-prober: debug: os detected by /usr/lib/os-probes/50mounted-tests
    Nov 26 13:17:35 webserver os-prober: debug: /dev/sda6: is active swap
    Nov 26 13:20:01 webserver pure-ftpd: ([email protected]) [INFO] New connection from 127.0.0.1
    Nov 26 13:20:01 webserver pure-ftpd: ([email protected]) [INFO] Logout.
    
    DB SERVER (System Messages)
    Code:
    Nov 20 06:25:03 dbserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="1040" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 21 06:25:02 dbserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="1040" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 22 06:25:03 dbserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="1040" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 23 06:25:02 dbserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="1040" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 24 06:25:02 dbserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="1040" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 25 06:25:02 dbserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="1040" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 26 06:25:02 dbserver rsyslogd: [origin software="rsyslogd" swVersion="4.6.4" x-pid="1040" x-info="http://www.rsyslog.com"] rsyslogd was HUPed, type 'lightweight'.
    Nov 26 13:17:11 dbserver kernel: [3391427.881974] SGI XFS with ACLs, security attributes, realtime, large block/inode numbers, no debug enabled
    Nov 26 13:17:11 dbserver kernel: [3391427.883007] SGI XFS Quota Management subsystem
    Nov 26 13:17:11 dbserver kernel: [3391427.888254] JFS: nTxBlock = 8192, nTxLock = 65536
    Nov 26 13:17:11 dbserver kernel: [3391427.905625] NTFS driver 2.1.29 [Flags: R/W MODULE].
    Nov 26 13:17:11 dbserver kernel: [3391427.917834] QNX4 filesystem 0.2.3 registered.
    Nov 26 13:17:11 dbserver kernel: [3391427.936976] Btrfs loaded
    Nov 26 13:17:11 dbserver os-prober: debug: running /usr/lib/os-probes/50mounted-tests on /dev/sda2
    Nov 26 13:17:11 dbserver 50mounted-tests: debug: /dev/sda2 type not recognised; skipping
    Nov 26 13:17:11 dbserver os-prober: debug: os detected by /usr/lib/os-probes/50mounted-tests
    Nov 26 13:17:11 dbserver os-prober: debug: /dev/sda5: is active swap
    
     
    Last edited: Nov 26, 2011
  14. till

    till Super Moderator Staff Member ISPConfig Developer

    This are normal log messages, no errors.
     

Share This Page