Author Topic: My failed attempt at upgading from 7.1.1 to Zentyal 8.0  (Read 496 times)

scottdr

  • Zen Apprentice
  • *
  • Posts: 18
  • Karma: +6/-0
  • Zentyal community edition 7.1.1
    • View Profile
My failed attempt at upgading from 7.1.1 to Zentyal 8.0
« on: March 29, 2024, 11:29:26 pm »
I wanted to upload a PDF attachment to show dialogue boxes with this report, but was unable to do so. The PDF was 179KB but there was no upload space.
Hope it helps



My attempt at carrying out an upgrade to Zentyal Version 8 from an up to date version of Zentyal 7.1.1
Platform: QEMU-KVM Hypervsisor host on HPE Proliant DL380 Gen9 running Ubuntu 22.04.4 LTS server with updates to 28th March 2024 including ESM updates.
VM 8vCPU, 8G Ram scsi drives on *.qcow2 2 x virtio bridge network connections

 
The dialogue below is misleading as it suggests that the Upgrade is finished and you can click close, but leave it open, In a separate shell monitor dpkg.log for progress ‘tail -f /var/log/dkpg.log’


 
 
Even though it will display ‘Finishing the upgrade’ watch the dpkg.log for the update finished message before clicking on ‘Close’
From dkpg.log
 
Click Close on Upgrading to Zentyal 8.0 dialogue and then reboot the system.
A stop job for Zentyal will delay the reboot for 1min 30sec
When the system restarted, the Zentyal logger daemon repeatedly stopped and started which might be a clue to issues ahead.
 
 
On restart, the Dashboard looked OK, but the Antivirus service failed to start. Also, the mysql service also failed due to permission issues on lock directory and missing log folder /var/log/mysql
This prevented the zentyal-core update script running to complete the install process.

Mar 29 11:23:28 hcs-zentyal6 systemd[1]: mysql.service: Start request repeated too quickly.
Mar 29 11:23:28 hcs-zentyal6 systemd[1]: mysql.service: Failed with result 'exit-code'.
░░ Subject: Unit failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ The unit mysql.service has entered the 'failed' state with result 'exit-code'.
Mar 29 11:23:28 hcs-zentyal6 systemd[1]: Failed to start MySQL Community Server.
░░ Subject: A start job for unit mysql.service has failed
░░ Defined-By: systemd
░░ Support: http://www.ubuntu.com/support
░░ A start job for unit mysql.service has finished with a failure.
░░ The job identifier is 9012 and the job result is failed.
Setting up zentyal-core (8.0.0) ...
Connection DB Error: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
dpkg: error processing package zentyal-core (--configure):
 installed zentyal-core package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 zentyal-core
E: Sub-process /usr/bin/dpkg returned an error code (1)

Had to create a folder for mysql /var/log/mysql and chown mysql to that folder for mysql to start
Now clamav failing
Unable to work out clamav issues
Removed Antivirus module from Zentyal and rebooted
Mysql failed again, so had to chown mysql /var/log/mysql
Setting up zentyal-core (8.0.0) ...
Synchronizing state of apparmor.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install disable apparmor
sed: can't read /etc/apt/apt.conf.d/20auto-upgrades: No such file or directory
dpkg: error processing package zentyal-core (--configure):
 installed zentyal-core package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 zentyal-core
E: Sub-process /usr/bin/dpkg returned an error code (1)
Removed Antivirus module, mailfilter and antivirus

Unable to process /etc/apt/apt.conf.d/20auto-upgrades: No such file or directory

Gave up!! Reverted VM to V7.1.1 with no outstanding updates as at 29th March 2024

Hope this helps somebody.

Thank you Zentyal for the community version.


cforker

  • Zen Apprentice
  • *
  • Posts: 5
  • Karma: +0/-0
    • View Profile
Re: My failed attempt at upgading from 7.1.1 to Zentyal 8.0
« Reply #1 on: April 01, 2024, 06:51:01 pm »
Hi scottdr,

I have had the same issues although I didn’t close any dialog boxes until I was sure it had finished all tasks. Eventually you have to reboot into the new server and antivirus was stoped but the rest was working. I managed to set the 20autostart and 50xxxx files to get to work, but the update process of zentyal-core never finished and is now stuck on expecting the unattended package which is not installed and can not be installed because of the unfinished installation proces of zentyal-core. I think that this is the bottleneck of all the problems.

I would advise to install the Debian unattended package before upgrading to Zentyal 8. Probably this will help to upgrade without issues. Once I have fixed my upgrade I will check this approach but maybe someone has a chance to test this theory before I can.

I also hope the the Zentyal community finds a way to finish the stuck unattended installation so we don’t have to fall back or restore to the earlier version.

C.

zyzio

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile

rsalles

  • Zen Apprentice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: My failed attempt at upgading from 7.1.1 to Zentyal 8.0
« Reply #3 on: April 09, 2024, 02:38:14 pm »
Good morning,

Stuck there too...

sed: can't read /etc/apt/apt.conf.d/20auto-upgrades: No such file or directory <------- This file is provided by the .deb.package unattended-upgrades, which will be downloaded and installed manually.

dpkg: error processing package zentyal-core (--configure):
 installed zentyal-core package post-installation script subprocess returned error exit status 2
Errors were encountered while processing:
 zentyal-core
E: Sub-process /usr/bin/dpkg returned an error code (1)


Solution:
cd /tmp
sudo apt download unattended-upgrades
sudo dpkg -i unattended-upgrades.deb (fill correct name of the pack downloaded previously)
sudo dpkg zentyal-core --configure


The stalled deb packs and unfinished configs have just gone after that,

HTH,

RSalles



Daniel Joven

  • Zentyal Staff
  • Zen Monk
  • *****
  • Posts: 53
  • Karma: +21/-0
    • View Profile
Re: My failed attempt at upgading from 7.1.1 to Zentyal 8.0
« Reply #4 on: April 10, 2024, 11:08:39 am »
Hi all,

First of all, thank you for reporting the issues you got during the upgrade. Unfortunately, in the tests we did before releasing the script, we did not encounter those errors. Could you tell me how was installed your Zentyal 7.1 server? I mean:

1. It was installed through the official Zentyal 7.1 ISO?
2. It was upgraded from other versions such as Zentyal 7.0, if so, what was the original version?
3. It was installed in a working Ubuntu Server or Ubuntu Desktop?

At this moment, we are working on fixing the following errors:

1. Mysql log directory (/var/log/mysql/).
2. Missing APT file (/etc/apt/apt.conf.d/20auto-upgrades)

Finally, about the Antivirus issue, do you have any log or something that we can analyze?

Best regards, Daniel Joven.

chapderprinz

  • Zen Apprentice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: My failed attempt at upgading from 7.1.1 to Zentyal 8.0
« Reply #5 on: April 12, 2024, 05:57:28 pm »
Hi Daniel,

i updated my zentyal today with zentyal-core 7.1.2 and zentyal-core 8.0.1. The update process worked fine.
After that i restarted the server and e_mail, fetchmail and antivirus stoped working. After deinstall and reinstall the antivirus and mailfilter componets e-mail and fetchmail works fine.
Antivirus does not work. After restart the antivirus it seems to work for about 30 seconds. then the service stops again.

var/log/clamav/clamav.log tells the following:

Fri Apr 12 17:27:17 2024 -> +++ Started at Fri Apr 12 17:27:17 2024
Fri Apr 12 17:27:17 2024 -> Received 0 file descriptor(s) from systemd.
Fri Apr 12 17:27:17 2024 -> clamd daemon 0.103.11 (OS: linux-gnu, ARCH: x86_64, CPU: x86_64)
Fri Apr 12 17:27:17 2024 -> Log file size limited to 4294967295 bytes.
Fri Apr 12 17:27:17 2024 -> Reading databases from /var/lib/clamav
Fri Apr 12 17:27:17 2024 -> Not loading PUA signatures.
Fri Apr 12 17:27:17 2024 -> Bytecode: Security mode set to "TrustSigned".
Fri Apr 12 17:27:27 2024 -> Loaded 8690518 signatures.
Fri Apr 12 17:27:30 2024 -> ERROR: LOCAL: Socket file /var/run/clamav/clamd.ctl could not be bound: Permission denied


Regards
Charles


EDIT:
Changed the owner of /var/run/clamav to user "clamav" and it works for me (drwxr-xr-x  2 clamav   root)

Charles
« Last Edit: April 12, 2024, 07:28:51 pm by chapderprinz »

trvaa

  • Zen Apprentice
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: My failed attempt at upgading from 7.1.1 to Zentyal 8.0
« Reply #6 on: April 12, 2024, 06:28:06 pm »
Same symptoms here for Antivirus - start from GUI, stops after about 30 secs

Exact same log entry

The following file does not exist in my system:

/var/run/clamav/clamd.ctl
« Last Edit: April 12, 2024, 06:32:59 pm by trvaa »

zyzio

  • Zen Apprentice
  • *
  • Posts: 12
  • Karma: +0/-0
    • View Profile
Re: My failed attempt at upgading from 7.1.1 to Zentyal 8.0
« Reply #7 on: April 12, 2024, 07:43:05 pm »
Daniel Joven:
It install official Zentyal ISO :
- probably 5(...)->6(...)->7(...)->8 - problem with mysql and  and missing apt
- 7(...)->8 problem with missing apt, mysql ok

trvaa

  • Zen Apprentice
  • *
  • Posts: 27
  • Karma: +0/-0
    • View Profile
Re: My failed attempt at upgading from 7.1.1 to Zentyal 8.0
« Reply #8 on: April 12, 2024, 08:09:50 pm »
running the following and accepting defaults seems to do the trick:

dpkg-reconfigure clamav-daemon

Daniel Joven

  • Zentyal Staff
  • Zen Monk
  • *****
  • Posts: 53
  • Karma: +21/-0
    • View Profile
Re: My failed attempt at upgading from 7.1.1 to Zentyal 8.0
« Reply #9 on: April 15, 2024, 04:54:55 pm »
Hi,

We are debugging the antivirus issue, we believe three things should be analyzed:

1. The server was not rebooted after the upgrade, so the directory /var/run/clamav does not belong to the owner clamav.
2. You have a persistent stub and because of that, the module’s configuration is old.
3. ClamAV databases are not updated. It requires sudo freshclam

Meanwhile, we do the required tests, you should try the following:

1. Update the internal database:
   
    sudo freshclam
   

2. Make sure the module is enabled through the Zentyal GUI.
3. Ensure the directory /var/run/clamav belongs to clamav as chapderprinz suggested.
   
    sudo chown -R clamav /var/run/clamav/
   

4. Restart the module through the CLI:
   
    sudo zs antivirus restart
   


If the issue persists, you can try to restart the service through Systemd and then, check the log files.

sudo systemctl restart clamav-daemon
sudo journalctl -u clamav-daemon


Log files:
- /var/log/zentyal/zentyal.log
- /var/log/syslog
- /var/log/clamav/clamav.log

Best regards, Daniel Joven.