BUG? ispconfig_update.sh destroys GUI port setting

Discussion in 'Installation/Configuration' started by awl, Jun 11, 2015.

  1. awl

    awl New Member

    My ISPconfig under Ubuntu 14.04.x LTS was set to port 10000 for web access and was working well.

    While trying to update it from 3.0.5.4p6 to 3.0.5.4p8 with ispconfig_update.sh, I noticed that the usual question regarding the web port was missing. Why? (As far as I remember, it's normally part of the dialog, showing the current setting as default.)

    After completion of the update, I found all port specifications in /etc/apache2/sites-available/ispconfig.vhost set to 8080 without any prompt for confirmation. o_O A bug? I can't imagine that such behavior is intended.
    Re-editing all occurences in 000-ispconfig.conf back to 10000 and restarting Apache seems to correct the problem, but is this really enough, or are there more locations elsewhere which need to be changed?

    Thanks in advance,

    Manfred
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    The update script does not alter the port setting, it shows it during update and you can confirm or alter it during update. I updated already quite a few client systems with custom ports to p8 and on all systems the custom port was not altered.
     
  3. awl

    awl New Member

    Thanks for your reply!

    That's exactly what I knew from other installations and what I was expecting, but in this case, I swear that it didn't show this prompt, and the port has been reset to 8080 arbitrarily.
    As it is a virtualbox machine, it took me only a click to return to an earlier snapshot, so I could run the update again just now. Here is the complete dialog (I was confirming the defaults at all prompts):

    Code:
    root@mc:~# ispconfig_update.sh
    
    --------------------------------------------------------------------------------
    _____ ___________  _____  __ _
    |_  _/  ___| ___ \ /  __ \  / _(_)
      | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _
      | |  `--. \  __/  | |  / _ \| '_ \|  _| |/ _` |
    _| |_/\__/ / |  | \__/\ (_) | | | | | | | (_| |
    \___/\____/\_|  \____/\___/|_| |_|_| |_|\__, |
      __/ |
      |___/
    --------------------------------------------------------------------------------
    
    >> Update
    Please choose the update method. For production systems select 'stable'.
    WARNING: The update from GIT is only for development systems and may break your current setup. Do not use the GIT version on servers that host any live websites!
    Note: Update all slave server, before you update master server.
    
    Select update method (stable,git) [stable]:
    
    --2015-06-13 11:30:10--  http://www.ispconfig.org/downloads/ISPConfig-3-stable.tar.gz
    
    Resolving www.ispconfig.org (www.ispconfig.org)... 141.101.126.34, 141.101.125.34
    Connecting to www.ispconfig.org (www.ispconfig.org)|141.101.126.34|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2469179 (2.4M) [application/octet-stream]
    Saving to: ‘ISPConfig-3-stable.tar.gz’
    
    100%[==============================================================================================================================>]
    2,469,179  3.59MB/s  in 0.7s
    
    2015-06-13 11:30:11 (3.59 MB/s) - ‘ISPConfig-3-stable.tar.gz’ saved [2469179/2469179]
    
    [ 6549 lines of unpacking file list removed ]
    
    --------------------------------------------------------------------------------
    _____ ___________  _____  __ _  ____
    |_  _/  ___| ___ \ /  __ \  / _(_)  /__  \
      | | \ `--.| |_/ / | /  \/ ___  _ __ | |_ _  __ _  _/ /
      | |  `--. \  __/  | |  / _ \| '_ \|  _| |/ _` |  |_ |
    _| |_/\__/ / |  | \__/\ (_) | | | | | | | (_| | ___\ \
    \___/\____/\_|  \____/\___/|_| |_|_| |_|\__, | \____/
      __/ |
      |___/
    --------------------------------------------------------------------------------
    
    >> Update
    
    Operating System: 14.04.2 LTS (Trusty Tahr)
    
    This application will update ISPConfig 3 on your server.
    
    Shall the script create a ISPConfig backup in /var/backup/ now? (yes,no) [yes]:
    
    Creating backup of "/usr/local/ispconfig" directory...
    Creating backup of "/etc" directory...
    Checking ISPConfig database .. OK
    Starting incremental database update.
    Reconfigure Permissions in master database? (yes,no) [no]:
    
    Reconfigure Services? (yes,no) [yes]:
    
    Configuring Postfix
    Configuring Jailkit
    Configuring Dovecot
    Configuring Spamassassin
    Configuring Amavisd
    Configuring Getmail
    Configuring BIND
    Configuring Database
    Configuring Bastille Firewall
    Updating ISPConfig
    Reconfigure Crontab? (yes,no) [yes]:
    
    Updating Crontab
    Restarting services ...
    
    * Stopping Postfix Mail Transport Agent postfix
      ...done.
    * Starting Postfix Mail Transport Agent postfix
      ...done.
    Stopping amavisd: amavisd-new.
    Starting amavisd: amavisd-new.
    * Stopping ClamAV daemon clamd
      ...done.
    * Starting ClamAV daemon clamd
      ...done.
    dovecot stop/waiting
    dovecot start/running, process 5034
    Update finished.
    root@mc:~#
    
    

    /etc/apache2/sites-available/ispconfig.vhost before update:
    Code:
    ######################################################
    # This virtual host contains the configuration
    # for the ISPConfig controlpanel
    ######################################################
    
    Listen 10000
    NameVirtualHost *:10000
    
    <VirtualHost _default_:10000>
    ...
    
    

    /etc/apache2/sites-available/ispconfig.vhost after update:
    Code:
    ######################################################
    # This virtual host contains the configuration
    # for the ISPConfig controlpanel
    ######################################################
    
    Listen 8080
    NameVirtualHost *:8080
    
    <VirtualHost _default_:8080>
    ...
    
    

    So I'm still wondering how this can happen. Reproducible.
     
    Last edited: Jun 13, 2015
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    Really strange. I'll add it to the bugtracker.
     
  5. awl

    awl New Member

    Thanks.

    I did some further reseach. I tried to track what ispconfig_update.sh does, and found an interesting passage in /tmp/ispconfig3_install/install/update.php:
    Code:
    if ($conf['services']['web'] && $inst->install_ispconfig_interface) {
       //** Customise the port ISPConfig runs on
       $ispconfig_port_number = get_ispconfig_port_number();
       if($autoupdate['ispconfig_port'] == 'default') $autoupdate['ispconfig_port'] = $ispconfig_port_number;
       if($conf['webserver']['server_type'] == 'nginx'){
         $conf['nginx']['vhost_port'] = $inst->free_query('ISPConfig Port', $ispconfig_port_number,'ispconfig_port');
       } else {
         $conf['apache']['vhost_port'] = $inst->free_query('ISPConfig Port', $ispconfig_port_number,'ispconfig_port');
       }
    
       // $ispconfig_ssl_default = (is_ispconfig_ssl_enabled() == true)?'y':'n';
       if(strtolower($inst->simple_query('Create new ISPConfig SSL certificate', array('yes', 'no'), 'no','create_new_ispconfig_ssl_cert')) == 'yes') {
         $inst->make_ispconfig_ssl_cert();
       }
    }
    
    
    The initial if-condition does not only control the port cutomization, but also the prompt regarding the SSL certificate. At this point, I noticed that the latter was also missing in my update process! So the problem seems to depend on this if-condition. Due to insufficient insight, I can't draw more conclusions for now, but maybe this concretion is helpful.

    I inspected also the log of the update process found in /var/log/ispconfig_install.log, but as far as I can see, there is nothing suspect. (I can't post the log here due to character count limitations.) I compared it also with another server's update log and didn't find noticeable differences. (This other server [Debian 6.0 LTS] behaved completely normal during update, it showed also the port and certificate prompts and respected my settings.)
     
  6. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check in ispconfig if "webserver" is enabled for this node under System > server services.
     
  7. awl

    awl New Member

    Haha! The webserver box is (intendedly!) not checked on this system. But obviously, this setting is not meant to disable the web access to ISPconfig itself. (At least, it doen't.) Consequently, it should also not impact the GUI port setting in such a "destructive" way during update. I tend to consider this as a bug.
    Im my opinion, both prompts (port / certificate generation) should always be shown during update, regardless of the "webserver" setting inside, as both are also regarding the ISPconfig web access itself.

    By the way, I found another small (but harmless) "flaw" in /usr/local/ispconfig/server/scripts/update_from_tgz.sh: it contains the lines
    Code:
    ...
    cd ispconfig3_install/install/
    php -q update.php
    rm -rf /tmp/ispconfig3_install/install
    rm -f ISPConfig-3-stable.tar.gz
    ...
    
    ...but the second rm command can't work as intended, as it seems to be executed from a just-erased directory and won't reach the ISPConfig-3-stable.tar.gz which is in /tmp. A cd /tmp should be inserted before the rm commands.
     
    Last edited: Jun 13, 2015

Share This Page