Author Topic: Zentyal 8 breaks when trying to update packages  (Read 773 times)

cursor

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Zentyal 8 breaks when trying to update packages
« on: April 09, 2024, 08:16:24 pm »
I have a Zentyal 8 (Development) server running on a VM.  Whenever I try to upgrade any package via Software Management -> System Updates my installation breaks.  I get the following error:

The package installation has not finished correctly. More information on the logs
dkpg was interrupted, you must manually run 'sudo dpkg --configure  -a' to correct the problem.

It does not matter which package I select form the list of available updates, I always get this same error.  Running dpkg does not fix the problem:

dpkg: error processing package zentyal (--configure):
 dependency problems - leaving unconfigured
Processing triggers for libc-bin (2.35-0ubuntu3.6) ...
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for dbus (1.12.20-2ubuntu4.1) ...
Errors were encountered while processing:
 zentyal-core
 zentyal-ntp
 zentyal-firewall
 zentyal-radius
 zentyal-software
 zentyal-samba
 zentyal-dns
 zentyal-network
 zentyal

I have to restore the VM to get everything working again but now I cannot upgrade anything.  What can I try to get updates working again?

Daniel Joven

  • Zentyal Staff
  • Zen Monk
  • *****
  • Posts: 66
  • Karma: +21/-0
    • View Profile
Re: Zentyal 8 breaks when trying to update packages
« Reply #1 on: April 10, 2024, 10:53:40 am »
Hi,

Could you run the following commands and send me the results, please?

Code: [Select]

sudo dpkg -l | egrep 'zen(tyal|buntu)-’

sudo apt update

sudo apt list --upgradable


Also, about the error you got, do you have any additional information such as the errors?

Best regards, Daniel Joven.

cursor

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Zentyal 8 breaks when trying to update packages
« Reply #2 on: April 10, 2024, 06:03:31 pm »
These are the results when the server is not broken (before trying to update via the web interface):

$ sudo dpkg -l | egrep "zen(tyal|buntu)-"
ii  zenbuntu-core                          8.0.0ubuntu1                                    all          Zentyal Environment for Ubuntu Server
ii  zenbuntu-desktop                       8.0.0ubuntu1                                    all          Zentyal Desktop Environment for Ubuntu Server
iF  zentyal-core                           8.0.0                                           all          Zentyal - Core
iU  zentyal-dns                            8.0.0                                           all          Zentyal - DNS Server
iU  zentyal-firewall                       8.0.0                                           all          Zentyal - Firewall
iU  zentyal-network                        8.0.2                                           all          Zentyal - Network Configuration
iU  zentyal-ntp                            8.0.0                                           all          Zentyal - NTP Service
iU  zentyal-radius                         8.0.0                                           all          Zentyal - RADIUS
iU  zentyal-samba                          8.0.0                                           all          Zentyal - Domain Controller and File Sharing
iU  zentyal-software                       8.0.0                                           all          Zentyal - Software Management

$ sudo apt update
Hit:1 https://download.docker.com/linux/ubuntu jammy InRelease                                                                                                             
Get:2 http://security.ubuntu.com/ubuntu jammy-security InRelease [110 kB]                                                                                                   
Hit:3 https://packages.mozilla.org/apt mozilla InRelease                                                                       
Hit:4 https://packages.zentyal.org/zentyal 8.0 InRelease                                       
Get:5 http://security.ubuntu.com/ubuntu jammy-security/main i386 Packages [444 kB]
Get:6 http://security.ubuntu.com/ubuntu jammy-security/main amd64 Packages [1,343 kB]
Hit:7 http://us.archive.ubuntu.com/ubuntu jammy InRelease
Get:8 http://us.archive.ubuntu.com/ubuntu jammy-updates InRelease [119 kB]
Hit:9 http://us.archive.ubuntu.com/ubuntu jammy-backports InRelease
Get:10 http://security.ubuntu.com/ubuntu jammy-security/main Translation-en [237 kB]                                                                                                                                                                                         
Get:11 http://security.ubuntu.com/ubuntu jammy-security/universe i386 Packages [599 kB]                                                                                                                                                                                     
Get:12 http://security.ubuntu.com/ubuntu jammy-security/universe amd64 Packages [852 kB]                                                                                                                                                                                     
Fetched 3,703 kB in 10s (367 kB/s)                                                                                                                                                                                                                                           
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
22 packages can be upgraded. Run 'apt list --upgradable' to see them.

$ sudo apt list --upgradable
Listing... Done
bsdextrautils/jammy-updates,jammy-security 2.37.2-4ubuntu3.4 amd64 [upgradable from: 2.37.2-4ubuntu3.3]
bsdutils/jammy-updates,jammy-security 1:2.37.2-4ubuntu3.4 amd64 [upgradable from: 1:2.37.2-4ubuntu3.3]
eject/jammy-updates,jammy-security 2.37.2-4ubuntu3.4 amd64 [upgradable from: 2.37.2-4ubuntu3.3]
ethtool/jammy-updates 1:5.16-1ubuntu0.1 amd64 [upgradable from: 1:5.16-1]
fdisk/jammy-updates,jammy-security 2.37.2-4ubuntu3.4 amd64 [upgradable from: 2.37.2-4ubuntu3.3]
firefox/mozilla 124.0.2~build1 amd64 [upgradable from: 124.0.1~build1]
libblkid1/jammy-updates,jammy-security 2.37.2-4ubuntu3.4 amd64 [upgradable from: 2.37.2-4ubuntu3.3]
libfdisk1/jammy-updates,jammy-security 2.37.2-4ubuntu3.4 amd64 [upgradable from: 2.37.2-4ubuntu3.3]
libmount1/jammy-updates,jammy-security 2.37.2-4ubuntu3.4 amd64 [upgradable from: 2.37.2-4ubuntu3.3]
libnspr4/jammy-security 2:4.35-0ubuntu0.22.04.1 amd64 [upgradable from: 2:4.32-3build1]
libnss3-tools/jammy-security 2:3.98-0ubuntu0.22.04.1 amd64 [upgradable from: 2:3.68.2-0ubuntu1.2]
libnss3/jammy-security 2:3.98-0ubuntu0.22.04.1 amd64 [upgradable from: 2:3.68.2-0ubuntu1.2]
libsmartcols1/jammy-updates,jammy-security 2.37.2-4ubuntu3.4 amd64 [upgradable from: 2.37.2-4ubuntu3.3]
libuuid1/jammy-updates,jammy-security 2.37.2-4ubuntu3.4 amd64 [upgradable from: 2.37.2-4ubuntu3.3]
linux-generic/jammy-updates,jammy-security 5.15.0.102.99 amd64 [upgradable from: 5.15.0.101.98]
linux-headers-generic/jammy-updates,jammy-security 5.15.0.102.99 amd64 [upgradable from: 5.15.0.101.98]
linux-image-generic/jammy-updates,jammy-security 5.15.0.102.99 amd64 [upgradable from: 5.15.0.101.98]
mount/jammy-updates,jammy-security 2.37.2-4ubuntu3.4 amd64 [upgradable from: 2.37.2-4ubuntu3.3]
qemu-guest-agent/jammy-updates 1:6.2+dfsg-2ubuntu6.18 amd64 [upgradable from: 1:6.2+dfsg-2ubuntu6.17]
util-linux/jammy-updates,jammy-security 2.37.2-4ubuntu3.4 amd64 [upgradable from: 2.37.2-4ubuntu3.3]
xserver-common/jammy-updates,jammy-updates,jammy-security,jammy-security 2:21.1.4-2ubuntu1.7~22.04.10 all [upgradable from: 2:21.1.4-2ubuntu1.7~22.04.8]
xserver-xorg-core/jammy-updates,jammy-security 2:21.1.4-2ubuntu1.7~22.04.10 amd64 [upgradable from: 2:21.1.4-2ubuntu1.7~22.04.8]



Daniel Joven

  • Zentyal Staff
  • Zen Monk
  • *****
  • Posts: 66
  • Karma: +21/-0
    • View Profile
Re: Zentyal 8 breaks when trying to update packages
« Reply #4 on: April 11, 2024, 03:36:08 pm »
Hi,

Did you try to fix the packages manually through CLI?

Code: [Select]
export DEBIAN_FRONTEND=noninteractive

dpkg --configure --force-confdef -a

unset DEBIAN_FRONTEND
NOTE: You must need to run the 'dpkg' command more than once.

If the error persists, analyze the output you get as well as the following log files:

- /var/log/zentyal/zentyal.log
- /var/log/syslog
- /var/log/dpkg.log

In case this server was upgraded from Zentyal 7.1, the issue might be caused by the following:

1. The file ‘/etc/apt/apt.conf.d/20auto-upgrades’ does not exist and because of this, the zentyal-core package cannot be configured and it blocks the rest of the packages.
   
    To fix this, edit the configuration file /var/lib/dpkg/info/zentyal-core.postinst and just apply the following fix:
   
    - https://github.com/zentyal/zentyal/commit/88a3414deefde4f7a629d0b0289348a464471788#diff-425f0921e7f356c2b4c325f6ce96d4efe02241140befe47a61a92741cb7ca24c

2. Mysql server is not running:
   
   
Code: [Select]
    sudo systemctl status mysql
   
   
    If it is stopped, you must run the following commands:
   
   
Code: [Select]
    mkdir /var/log/mysql/
    chown -R mysql:adm /var/log/mysql
    chmod -R 0770 /var/log/mysql
    systemctl restart mysql
   
   
If you applied any of the above two issues, you must run the mentioned commands at the beginning of this answer to fix all the packages.

Best regards, Daniel Joven.

cursor

  • Zen Apprentice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
Re: Zentyal 8 breaks when trying to update packages
« Reply #5 on: April 11, 2024, 08:48:18 pm »
Thank you very much.  I did the modifications to /var/lib/dpkg/info/zentyal-core.postinst and now I can upgrade all packages without breaking my install.

Daniel Joven

  • Zentyal Staff
  • Zen Monk
  • *****
  • Posts: 66
  • Karma: +21/-0
    • View Profile
Re: Zentyal 8 breaks when trying to update packages
« Reply #6 on: April 12, 2024, 10:09:38 am »
Thank you very much.  I did the modifications to /var/lib/dpkg/info/zentyal-core.postinst and now I can upgrade all packages without breaking my install.

Great, I am glad to hear that you could fix all the packages. Enjoy your Zentyal 8.0 :D

Best regards, Daniel Joven.

Daniel Joven

  • Zentyal Staff
  • Zen Monk
  • *****
  • Posts: 66
  • Karma: +21/-0
    • View Profile
Re: Zentyal 8 breaks when trying to update packages
« Reply #7 on: April 12, 2024, 11:31:58 am »
Hi,

We have released the packages:

- zentyal-core 7.1.2
- zentyal-core 8.0.1

Both packages correct the APT and Mysql issues.

In case you already upgraded your Zentyal server and have any issues, you can check the following link out:

- https://forum.zentyal.org/index.php/topic,35673.msg115823.html#msg115823

Again, thank you for reporting the issues.

Best regards, Daniel Joven.

trvaa

  • Zen Apprentice
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: Zentyal 8 breaks when trying to update packages
« Reply #8 on: April 12, 2024, 04:36:36 pm »
Many thanks for this.

I can confirm that after using option 2 here (command line option): https://doc.zentyal.org/en/upgrade.html

this worked for me (7.1.2 to 8.0.1)

Small point for correction at some point - Splash screen on start-up still says Zentyal 7.0