How to solve upgrade problems?

Discussion in 'ISPConfig 3 Priority Support' started by MaxT, Apr 8, 2019.

  1. Taleman

    Taleman Well-Known Member HowtoForge Supporter

    Reading
    Code:
    man ucf
    makes me believe those files in /var/lib/ucf/ are not the cause, but a symptom.
    So I would debug APT and try to figure out how to get its database in sync with what is installed and removed.
    For example, can you find these 4:4:4: names in /var/lib/dpkg/* ?
    Sorry, I do not know how APT works so I'm only guessing where to look. You may have stumbled upon a bug, it may be worth reporting it to Debian. https://www.debian.org/Bugs/ I'm not sure which package to report this against, though.
    Try what
    Code:
    apt-get check
    reports and does.
     
    MaxT likes this.
  2. MaxT

    MaxT Active Member HowtoForge Supporter

    inside /var/lib/dpkg/* there is no file 4....
    An #apt-get check show all ok.

    As you says, maybe this is a bug.
    Neither I know about APT. I will read a little more about ucf to try some things. It seems it contains options to purge configurations. If no luck then probably I will do a complete new installation.

    Anyway, lot of thanks for your help. The thread drive me closer to the cause.
     
  3. MaxT

    MaxT Active Member HowtoForge Supporter

    finally I believe the issue is solved

    I have applied inside one script the purge commands with ucfr (instead ucf) for all the strange items inside /var/lib/ucf/registry :

    Code:
    #!/bin/bash
    ucfr -p 2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:2:grub-pc      /etc/default/grub
    ucfr -p 3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:3:rkhunter       /etc/default/rkhunter
    ucfr -p 4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:4:dovecot-core     /etc/dovecot/dovecot.conf
    ucfr -p 5:5:5:5:5:5:5:5:5:5:5:5:5:5:5:5:5:5:5:5:5:5:5:5:5:5:5:dovecot-core       /etc/dovecot/dovecot-dict-auth.conf.ext
    ucfr -p 6:6:6:6:6:6:6:6:6:6:6:6:6:6:6:6:6:6:6:6:6:6:6:6:6:6:dovecot-core         /etc/dovecot/dovecot-dict-sql.conf.ext
    ucfr -p 7:7:7:7:7:7:7:7:7:7:7:7:7:7:7:7:7:7:7:7:7:7:7:7:7:dovecot-core   /etc/dovecot/dovecot-sql.conf.ext
    ucfr -p 8:8:8:8:8:8:8:8:8:8:8:8:8:8:8:8:8:8:8:8:8:8:8:8:dovecot-core     /etc/dovecot/conf.d/10-auth.conf
    ucfr -p 9:9:9:9:9:9:9:9:9:9:9:9:9:9:9:9:9:9:9:9:9:9:9:dovecot-core       /etc/dovecot/conf.d/10-director.conf
    ucfr -p 10:10:10:10:10:10:10:10:10:10:10:10:10:10:10:10:10:10:10:10:10:10:dovecot-core   /etc/dovecot/conf.d/10-logging.conf
    ucfr -p 11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:11:dovecot-core      /etc/dovecot/conf.d/10-mail.conf
    ucfr -p 12:12:12:12:12:12:12:12:12:12:12:12:12:12:12:12:12:12:12:12:dovecot-core         /etc/dovecot/conf.d/10-master.conf
    ucfr -p 13:13:13:13:13:13:13:13:13:13:13:13:13:13:13:13:13:13:13:dovecot-core    /etc/dovecot/conf.d/10-tcpwrapper.conf
    ucfr -p 14:14:14:14:14:14:14:14:14:14:14:14:14:14:14:14:14:14:dovecot-core       /etc/dovecot/conf.d/15-lda.conf
    ucfr -p 15:15:15:15:15:15:15:15:15:15:15:15:15:15:15:15:15:dovecot-core          /etc/dovecot/conf.d/15-mailboxes.conf
    ucfr -p 16:16:16:16:16:16:16:16:16:16:16:16:16:16:16:16:dovecot-core     /etc/dovecot/conf.d/90-acl.conf
    ucfr -p 17:17:17:17:17:17:17:17:17:17:17:17:17:17:17:dovecot-core        /etc/dovecot/conf.d/90-plugin.conf
    ucfr -p 18:18:18:18:18:18:18:18:18:18:18:18:18:18:dovecot-core   /etc/dovecot/conf.d/90-quota.conf
    ucfr -p 19:19:19:19:19:19:19:19:19:19:19:19:19:dovecot-core      /etc/dovecot/conf.d/auth-checkpassword.conf.ext
    ucfr -p 20:20:20:20:20:20:20:20:20:20:20:20:dovecot-core         /etc/dovecot/conf.d/auth-deny.conf.ext
    ucfr -p 21:21:21:21:21:21:21:21:21:21:21:dovecot-core    /etc/dovecot/conf.d/auth-dict.conf.ext
    ucfr -p 22:22:22:22:22:22:22:22:22:22:dovecot-core       /etc/dovecot/conf.d/auth-master.conf.ext
    ucfr -p 23:23:23:23:23:23:23:23:23:dovecot-core          /etc/dovecot/conf.d/auth-passwdfile.conf.ext
    ucfr -p 24:24:24:24:24:24:24:24:dovecot-core     /etc/dovecot/conf.d/auth-sql.conf.ext
    ucfr -p 25:25:25:25:25:25:25:dovecot-core        /etc/dovecot/conf.d/auth-static.conf.ext
    ucfr -p 26:26:26:26:26:26:dovecot-core   /etc/dovecot/conf.d/auth-system.conf.ext
    ucfr -p 27:27:27:27:27:dovecot-core      /etc/dovecot/conf.d/auth-vpopmail.conf.ext
    ucfr -p 28:28:28:28:dovecot-lmtpd        /etc/dovecot/conf.d/20-lmtp.conf
    ucfr -p 29:29:29:dovecot-sieve   /etc/dovecot/conf.d/90-sieve.conf
    ucfr -p 30:30:dovecot-sieve      /etc/dovecot/conf.d/90-sieve-extprograms.conf
    ucfr -p 31:dovecot-pop3d         /etc/dovecot/conf.d/20-pop3.conf
    
    then:
    # apt-get remove dovecot-* --purge

    although the command "# dpkg --get-selections | grep dovecot" still shows dovecot registries. Then:

    Code:
    # dpkg -P dovecot-core
    # dpkg -P dovecot-imapd
    # dpkg -P dovecot-lmtpd               
    # dpkg -P dovecot-pop3d               
    # dpkg -P dovecot-sieve
    
    then:
    
    # apt-get update
    # apt-get install dovecot-core
    
    and this new install shows no errors.

    However, the ISPC update failed:
    Code:
    # cd /tmp
    # wget http://www.ispconfig.org/downloads/ISPConfig-3.1.13p1.tar.gz
    # tar xvfz ISPConfig-3.1.13p1.tar.gz
    # cd ispconfig3_install/install
    # php -q update.php
    
    reconfigure services: yes
    ....
    Restarting services ...
    Job for dovecot.service failed because the control process exited with error code.
    See "systemctl status dovecot.service" and "journalctl -xe" for details.
    Update finished.
    
    # systemctl status dovecot.service
     ... Fatal: service(pop3) access(/usr/lib/dovecot/pop3) failed: No such file or directory
    
    some dovecot parts still demands to be installed. I thought these were installed before... (?)
    Code:
    # apt-get install dovecot-pop3d
    # apt-get install dovecot-imapd
    ...
    W: APT had planned for dpkg to do more than it reported back (8 vs 12).
       Affected packages: dovecot-core:amd64
    
    just that warning.

    Also dovecot-mysql was missing:
    Code:
    # systemctl start dovecot.service
    
    # tail -f /var/log/mail.log
    ...  host dovecot: auth: Fatal: Unknown database driver 'mysql'
    
    # apt-get install dovecot-mysql
    
    # systemctl restart dovecot.service
    ? dovecot.service - Dovecot IMAP/POP3 email server
       Loaded: loaded (/lib/systemd/system/dovecot.service; enabled; vendor preset: enabled)
       Active: active (running) since Sun 2019-04-14 20:09:22 CEST; 4s ago
         Docs: man:dovecot(1)
               http://wiki2.dovecot.org/
      Process: 1079 ExecStop=/usr/bin/doveadm stop (code=exited, status=0/SUCCESS)
      Process: 1084 ExecStart=/usr/sbin/dovecot (code=exited, status=0/SUCCESS)
     Main PID: 1086 (dovecot)
        Tasks: 4 (limit: 4915)
       CGroup: /system.slice/dovecot.service
               +-1086 /usr/sbin/dovecot
               +-1087 dovecot/anvil
               +-1088 dovecot/log
               +-1090 dovecot/config
    
    finally it works :)

    With openssh-server no problem, just reinstall, re-paste my config file, and restart
    Now the # apt-get upgrade shows clean result.

    Inside /var/lib/ucf/registry shows no problem:
    Code:
    ...
    dovecot-core     /etc/dovecot/dovecot.conf
    dovecot-core     /etc/dovecot/dovecot-dict-auth.conf.ext
    dovecot-core     /etc/dovecot/dovecot-dict-sql.conf.ext
    dovecot-core     /etc/dovecot/dovecot-sql.conf.ext
    dovecot-core     /etc/dovecot/conf.d/10-auth.conf
    dovecot-core     /etc/dovecot/conf.d/10-director.conf
    dovecot-core     /etc/dovecot/conf.d/10-logging.conf
    dovecot-core     /etc/dovecot/conf.d/10-mail.conf
    dovecot-core     /etc/dovecot/conf.d/10-master.conf
    dovecot-core     /etc/dovecot/conf.d/10-tcpwrapper.conf
    dovecot-core     /etc/dovecot/conf.d/15-lda.conf
    dovecot-core     /etc/dovecot/conf.d/15-mailboxes.conf
    dovecot-core     /etc/dovecot/conf.d/90-acl.conf
    dovecot-core     /etc/dovecot/conf.d/90-plugin.conf
    dovecot-core     /etc/dovecot/conf.d/90-quota.conf
    dovecot-core     /etc/dovecot/conf.d/auth-checkpassword.conf.ext
    dovecot-core     /etc/dovecot/conf.d/auth-deny.conf.ext
    dovecot-core     /etc/dovecot/conf.d/auth-dict.conf.ext
    dovecot-core     /etc/dovecot/conf.d/auth-master.conf.ext
    dovecot-core     /etc/dovecot/conf.d/auth-passwdfile.conf.ext
    dovecot-core     /etc/dovecot/conf.d/auth-sql.conf.ext
    dovecot-core     /etc/dovecot/conf.d/auth-static.conf.ext
    dovecot-core     /etc/dovecot/conf.d/auth-system.conf.ext
    dovecot-core     /etc/dovecot/conf.d/auth-vpopmail.conf.ext
    openssh-server   /etc/ssh/sshd_config
    dovecot-pop3d    /etc/dovecot/conf.d/20-pop3.conf
    dovecot-imapd    /etc/dovecot/conf.d/20-imap.conf
    
    so I think it seems the end of this issue..

    It was only this warning in the process:
    Code:
    W: APT had planned for dpkg to do more than it reported back (8 vs 12).
       Affected packages: dovecot-core:amd64
    
    althoug when I do # apt-get check shows no error. I hope it will be a normal task.

    At the end it seems the solution was in the use of ucfr.
    I leave here in case other people can suffer this bug or whatever thing it is. Not too much info about ucf-ucfr searching in Google.

    Thanks for the help! :)
     
    Last edited: Apr 14, 2019
    till likes this.

Share This Page