Update ISPConfig: Debian 10 > 11 + Dovecot

Discussion in 'Installation/Configuration' started by 30uke, Mar 28, 2022.

  1. 30uke

    30uke Active Member HowtoForge Supporter

    Hello,
    I did successfully upgrade my semi-test-production server running ISPConfig 3.2.8p1 from Debian 10 to 11. I run a server in production and one at home for redundancy of my e-mail. I did upgrade the latter one.
    I just wanted to share my succes and thank @Th0m for the tutorial about updating Debian 10 to Debian 11. I am hoping my struggles are somewhat helpful for someone.
    First I did upgrade all packages under Debian 10 and next I did update ISPConfig (https://www.faqforge.com/linux/controlpanels/ispconfig3/how-to-update-ispconfig-3/).
    Next I did edit /etc/apt/sources.list and simply changed "buster" into "bullseye".
    After that I did run the apt dist-upgrade command. I should have followed https://www.howtoforge.com/how-to-upgrade-from-debian-10-to-debian-11/ but didn't. Luckily it all turned out well.
    During the upgrade I was asked if I would keep my config files. I kept all.
    I did also notice a question to remove the database for Roundcube as the package was being removed. I declined it as I would like to run Roundcube after the dist-upgrade... So, that's the nasty one in the process. I recommend to keep the database.
    When the dist-upgrade finished, I did a reboot and encountered a internal server error when I did open the ISPConfig panel.
    I did install the packages php7.4-curl and php7.4-mbstring as these were missing. Next I did run a ispconfig_update.sh --force but that was unsuccessful either. I did a quick search and did find https://www.howtoforge.com/update-the-ispconfig-perfect-server-from-debian-10-to-debian-11/ which was very helpful (I mean "very very very very extremely [...] helpful"). I did follow the steps and completed the upgrade successfully. Please take note of the PHP 7.3 > 7.4 upgrade!
    Next I did notice that Roundcube was missing. Which wasn't a real surprise as it was uninstalled. I did issue the apt install roundcube command and did notice the question about keeping the config file. I did keep it as it did work fine before.
    I did also notice the question about the dbconfig database upgrade. I did upgrade the database as I assumed it is necessary.
    After that everything worked fine.
    I did also notice an error when I did run the apt command. It was about the security updates. I did comment out the security.debian.org sources from /etc/apt/sources.list file (and did correct it later).
    After that I remembered a discussion on the Dovecot mailinglist about the packages provided by the Dovecot developer for Debian. I did always wanted to run those packages. The links to the discussion are:
    https://www.mail-archive.com/[email protected]/msg83720.html
    https://www.mail-archive.com/[email protected]/msg83721.html
    I did follow the instructions at https://repo.dovecot.org/ and was able to successfully upgrade Dovecot from 2.3.13+dfsg1-2 to 2.3.18-4+debian11.
    I did run into an issue with unmet dependencies. I did issue the command apt --fix-broken install and that fixed the dependencies problem.
    Next I did copy the /etc/apt/sources.list to /etc/apt/sources.list.bak and replaces the conents of /etc/apt/sources.list with the lines from the file from my laptop (I am running Debian Bullseye on my laptop) as I didn't like commenting out the security related lines. Next I did issue the apt update and the apt upgrade commands to discover that there as an update for the package libtiff5. I did install it and that was all I had to do.
    Next I'll upgrade my production server. The challenge on the production server is that I am running self compiled version of PHP - but I think I can sort that out. I will create a back-up of the full server before attempting the upgrade of course.

    Edit-1: almost forgot to mention that I did issue the ispconfig_update.sh --force command again somewhere during the process. I believe it was necessary. It was after installing the packages as indicated at https://www.howtoforge.com/update-the-ispconfig-perfect-server-from-debian-10-to-debian-11/ at step 3.

    Edit-2: I did also update phpMyAdmin by downloading new latest version and copying the files into /usr/share/phpmyadmin (didn't have to change anything - just works fine).
    Edit-3: I did decide to upgrade Dovecot on my production server too. It runs Debian 10 and I can confirm the packages from https://repo.dovecot.org/ also work fine for Debian 10. I was able to issue apt update and then apt upgrade after adding the repository. Again the dependencies where unmet but it was easily fixed with the apt --fix-broken install command. Unfortunately Dovecot wouldn't start because a problem with a missing dh.pem file... please see copy/paste below. I was able to fix this easily by running the ispconfig_update.sh --force command. During the configuration of Dovecot by ISPConfig the DHParms file was created.
    Code:
    Configuring Dovecot
    Creating new DHParams file, this takes several minutes. Do not interrupt the script.
    142+0 records in
    142+0 records out
    142 bytes copied, 0.00118717 s, 120 kB/s
    unable to load DH parameters
    140688158393536:error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag:../crypto/asn1/tasn_dec.c:1149:
    140688158393536:error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error:../crypto/asn1/tasn_dec.c:309:Type=DHparams
    Code:
    Job for dovecot.service failed because the control process exited with error code.
    See "systemctl status dovecot.service" and "journalctl -xe" for details.
    invoke-rc.d: initscript dovecot, action "restart" failed.
    ● dovecot.service - Dovecot IMAP/POP3 email server
       Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor preset: enabled)
       Active: failed (Result: exit-code) since Mon 2022-03-28 23:32:21 CEST; 9ms ago
         Docs: man:dovecot(1)
               https://doc.dovecot.org/
      Process: 4690 ExecStart=/usr/sbin/dovecot -F (code=exited, status=89)
     Main PID: 4690 (code=exited, status=89)
    
    Mar 28 23:32:21 s1 systemd[1]: Starting Dovecot IMAP/POP3 email server...
    Mar 28 23:32:21 s1 dovecot[4690]: doveconf: Fatal: Error in configuration file /etc/dovecot/dovecot.conf line 12: ssl_dh: Can't open file /etc/dovecot/dh.pem: No such file or directory
    Mar 28 23:32:21 s1 systemd[1]: dovecot.service: Main process exited, code=exited, status=89/n/a
    Mar 28 23:32:21 s1 systemd[1]: dovecot.service: Failed with result 'exit-code'.
    Mar 28 23:32:21 s1 systemd[1]: Failed to start Dovecot IMAP/POP3 email server.
    dpkg: error processing package dovecot-core (--configure):
     installed dovecot-core package post-installation script subprocess returned error exit status 1
    Errors were encountered while processing:
     dovecot-core
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    Both servers are running fine. My production server runs Debian 10.12 with ISPConfig 3.2.8p1 + Dovecot from the Dovecot repo and my semi-test-production server runs Debian 11.3 with ISPConfig 3.2.8p1 + Dovcecot from the Dovecot repo too! Yeehaa!
     
    Last edited: Mar 28, 2022
    Th0m and ahrasis like this.
  2. Th0m

    Th0m ISPConfig Developer Staff Member ISPConfig Developer

    In that guide I put some easy commands to set the repo correctly. Not only the name was changed, but the security repo got a different name.

    A note to this. The last step of https://www.howtoforge.com/update-the-ispconfig-perfect-server-from-debian-10-to-debian-11/ would have taken care of this as well - I wrote a simple script to update phpMyAdmin without any problems, copying the config and eventual .htaccess file.

    If you follow the guide I wrote closely for your other server, I think there won't be any problems ;)
     
    jz_ and 30uke like this.

Share This Page