Upgrade from 5 to 6 issue

Zanthius

Member
May 18, 2019
17
0
21
44
Hi all, experiencing an issue upgrading from 5 to 6 using the instructions from here: https://pmg.proxmox.com/wiki/index.php/Upgrade_from_5.x_to_6.0

I'm getting up to the apt dist-upgrade part where I get issues...


The default action is to keep your current version.
*** pmg-enterprise.list (Y/I/N/O/D/Z) [default=N] ? y
Installing new version of config file /etc/apt/sources.list.d/pmg-enterprise.list ...
Analyzing/Upgrading existing Databases...done
template '/etc/pmg/templates/*' not shipped by pmg-api.
postfix@-.service is not active, cannot reload.
command 'systemctl reload postfix@-' failed: exit code 1
dpkg: error processing package pmg-api (--configure):
installed pmg-api package post-installation script subprocess returned error exit status 1
Setting up gir1.2-pango-1.0:amd64 (1.42.4-8~deb10u1) ...
Setting up gstreamer1.0-plugins-base:amd64 (1.14.4-2) ...
Setting up libshout3:amd64 (2.4.1-2) ...
Setting up librsvg2-common:amd64 (2.44.10-2.1) ...
Setting up libavcodec58:amd64 (7:4.1.4-1~deb10u1) ...
Setting up libchromaprint1:amd64 (1.4.3-3) ...
Setting up libavformat58:amd64 (7:4.1.4-1~deb10u1) ...
Setting up gstreamer1.0-plugins-good:amd64 (1.14.4-1) ...
dpkg: dependency problems prevent configuration of proxmox-mailgateway:
proxmox-mailgateway depends on pmg-api; however:
Package pmg-api is not configured yet.

dpkg: error processing package proxmox-mailgateway (--configure):
dependency problems - leaving unconfigured
Setting up adwaita-icon-theme (3.30.1-1) ...
...
...
Errors were encountered while processing:
pmg-api
proxmox-mailgateway
E: Sub-process /usr/bin/dpkg returned an error code (1)


I've reverted a snapshot now, so I can start again from scratch, but any ideas?
 
The only thing I didn't do was:
echo "deb https://enterprise.proxmox.com/debian/pmg buster pmg-enterprise" > /etc/apt/sources.list.d/pmg-enterprise.list
as I don't have enterprise version... don't know if that would make a difference

that's fine if you're not using enterprise repository.

* is this a cluster or a standalone installation?

* can you post:
Code:
cat /etc/apt/sources.list
cat /etc/apt/sources.list.d/*

your installation should be fully updated firstly (to the latest 5.x) and then the 'stretch' lines in these should be switched with 'buster'
 
Sorry for the delay, busy week.
This is set to a cluster, but it's the only node at the moment. Haven't gotten around to the second one yet.

Created a new snapshot just in case...

OK, everything is updated as far as I can see to start.

This is my sources.list before any changes:

Code:
$ cat /etc/apt/sources.list
#

# deb cdrom:[Debian GNU/Linux 9.9.0 _Stretch_ - Official amd64 NETINST 20190427-10:30]/ stretch main

#deb cdrom:[Debian GNU/Linux 9.9.0 _Stretch_ - Official amd64 NETINST 20190427-10:30]/ stretch main

deb http://ftp.au.debian.org/debian/ stretch main
deb-src http://ftp.au.debian.org/debian/ stretch main

deb http://security.debian.org/debian-security stretch/updates main
deb-src http://security.debian.org/debian-security stretch/updates main

# stretch-updates, previously known as 'volatile'
deb http://ftp.au.debian.org/debian/ stretch-updates main
deb-src http://ftp.au.debian.org/debian/ stretch-updates main

deb http://download.proxmox.com/debian/pmg stretch pmg-no-subscription
zanthius@MTA:~$ cat /etc/apt/sources.list.d/*
cat: '/etc/apt/sources.list.d/*': No such file or directory

After the command:
Code:
root@MTA:~# sed -i 's/stretch/buster/g' /etc/apt/sources.list
root@MTA:~# cat /etc/apt/sources.list
#

# deb cdrom:[Debian GNU/Linux 9.9.0 _Stretch_ - Official amd64 NETINST 20190427-10:30]/ buster main

#deb cdrom:[Debian GNU/Linux 9.9.0 _Stretch_ - Official amd64 NETINST 20190427-10:30]/ buster main

deb http://ftp.au.debian.org/debian/ buster main
deb-src http://ftp.au.debian.org/debian/ buster main

deb http://security.debian.org/debian-security buster/updates main
deb-src http://security.debian.org/debian-security buster/updates main

# buster-updates, previously known as 'volatile'
deb http://ftp.au.debian.org/debian/ buster-updates main
deb-src http://ftp.au.debian.org/debian/ buster-updates main

deb http://download.proxmox.com/debian/pmg buster pmg-no-subscription

Stopped and masked all services:
Code:
root@MTA:~# systemctl stop postfix pmg-smtp-filter pmgpolicy pmgdaemon pmgproxy pmgmirror pmgtunnel
root@MTA:~# systemctl mask postfix pmg-smtp-filter pmgpolicy pmgdaemon pmgproxy pmgmirror pmgtunnel
Created symlink /etc/systemd/system/postfix.service → /dev/null.
Created symlink /etc/systemd/system/pmg-smtp-filter.service → /dev/null.
Created symlink /etc/systemd/system/pmgpolicy.service → /dev/null.
Created symlink /etc/systemd/system/pmgdaemon.service → /dev/null.
Created symlink /etc/systemd/system/pmgproxy.service → /dev/null.
Created symlink /etc/systemd/system/pmgmirror.service → /dev/null.
Created symlink /etc/systemd/system/pmgtunnel.service → /dev/null.

and started the update / dist-upgrade
582 upgraded, 189 newly installed, 4 to remove and 0 not upgraded.

During the upgrade near the end I found the following:
Code:
Installing new version of config file /etc/apt/sources.list.d/pmg-enterprise.list ...
Analyzing/Upgrading existing Databases...done
template '/etc/pmg/templates/*' not shipped by pmg-api.
postfix@-.service is not active, cannot reload.
command 'systemctl reload postfix@-' failed: exit code 1
dpkg: error processing package pmg-api (--configure):
 installed pmg-api package post-installation script subprocess returned error exit status 1
Setting up gir1.2-pango-1.0:amd64 (1.42.4-8~deb10u1) ...
Setting up gstreamer1.0-plugins-base:amd64 (1.14.4-2) ...
...
...
Setting up gstreamer1.0-plugins-good:amd64 (1.14.4-1) ...
dpkg: dependency problems prevent configuration of proxmox-mailgateway:
 proxmox-mailgateway depends on pmg-api; however:
  Package pmg-api is not configured yet.

dpkg: error processing package proxmox-mailgateway (--configure):
 dependency problems - leaving unconfigured
Setting up adwaita-icon-theme (3.30.1-1) ...
...
...
Errors were encountered while processing:
 pmg-api
 proxmox-mailgateway
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@MTA:~#

Well, continued anyway with the upgrade instructions and it looks like it may have worked!

So I guess if you get those errors, just keep going and it will work out anyway.
 
Well, continued anyway with the upgrade instructions and it looks like it may have worked!

So I guess if you get those errors, just keep going and it will work out anyway.
I just checked - those errors should not happen if you install pmg-api in a current version from pmg-6 - could you please post a bit more of the upgrade log / screen output?
 
Thank you very much - managed to reproduce the issue:
* did you by any chance have any changes to your pmg.conf ?
if you install pmg-api, while postfix is masked, and you have a change, which rewrites the postfix config - the postfix@-.service gets reloaded by
`pmgconfig sync --restart` - which fails if postfix@- is disabled...

In that case it would have been enough to run `pmgconfig sync` before upgrading
(or running `dpkg --configure -a` after the error occured)
 
Glad to help...

No changes to pmg.conf that i'm aware of... at least nothing that wasn't through the GUI.

Do you think it's still worth running the dpkg now?
 
it should not hurt to run it - also it would help if the issue still persists - it could point to another issue than the one i managed to reproduce

if the dpkg --configure -a still runs into an error - please also try running `pmgconfig sync --restart`

Thanks!
 
Hi again,
I run the dpkg command which didn't respond with anything at all, just dropped back to the normal prompt, so i'm guessing nothing is needed.

One thing I have noticed is that clamd isn't running. Checking the logs I see the following:

Code:
Jun  1 13:00:29 MTA systemd[1]: Starting Clam AntiVirus userspace daemon...
Jun  1 13:00:29 MTA systemd[1]: Started Clam AntiVirus userspace daemon.
Jun  1 13:00:29 MTA kernel: [411012.584126] audit: type=1400 audit(1590982229.445:1736): apparmor="DENIED" operation="create" profile="/usr/sbin/clamd" pid=16830 comm="clamd" family="unix" sock_type="stream" protocol=0 requested_mask="create" denied_mask="create" addr=none
Jun  1 13:00:29 MTA kernel: [411012.584142] audit: type=1400 audit(1590982229.445:1737): apparmor="DENIED" operation="create" profile="/usr/sbin/clamd" pid=16830 comm="clamd" family="unix" sock_type="stream" protocol=0 requested_mask="create" denied_mask="create" addr=none
Jun  1 13:00:29 MTA kernel: [411012.584717] audit: type=1400 audit(1590982229.445:1738): apparmor="DENIED" operation="create" profile="/usr/sbin/clamd" pid=16830 comm="clamd" family="unix" sock_type="stream" protocol=0 requested_mask="create" denied_mask="create" addr=none
Jun  1 13:00:29 MTA kernel: [411012.584730] audit: type=1400 audit(1590982229.445:1739): apparmor="DENIED" operation="create" profile="/usr/sbin/clamd" pid=16830 comm="clamd" family="unix" sock_type="stream" protocol=0 requested_mask="create" denied_mask="create" addr=none
Jun  1 13:00:29 MTA kernel: [411012.585006] audit: type=1400 audit(1590982229.445:1740): apparmor="DENIED" operation="create" profile="/usr/sbin/clamd" pid=16830 comm="clamd" family="unix" sock_type="stream" protocol=0 requested_mask="create" denied_mask="create" addr=none
Jun  1 13:00:29 MTA kernel: [411012.585774] audit: type=1400 audit(1590982229.445:1741): apparmor="DENIED" operation="create" profile="/usr/sbin/clamd" pid=16830 comm="clamd" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
Jun  1 13:00:29 MTA kernel: [411012.586348] audit: type=1400 audit(1590982229.445:1742): apparmor="DENIED" operation="create" profile="/usr/sbin/clamd" pid=16830 comm="clamd" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
Jun  1 13:00:29 MTA kernel: [411012.586371] audit: type=1400 audit(1590982229.445:1743): apparmor="DENIED" operation="create" profile="/usr/sbin/clamd" pid=16830 comm="clamd" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
Jun  1 13:00:29 MTA kernel: [411012.586389] audit: type=1400 audit(1590982229.445:1744): apparmor="DENIED" operation="create" profile="/usr/sbin/clamd" pid=16830 comm="clamd" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
Jun  1 13:00:29 MTA kernel: [411012.586629] audit: type=1400 audit(1590982229.445:1745): apparmor="DENIED" operation="create" profile="/usr/sbin/clamd" pid=16830 comm="clamd" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
Jun  1 13:00:29 MTA systemd[1]: pmg-hourly.service: Succeeded.
Jun  1 13:00:29 MTA systemd[1]: Started Hourly Proxmox Mail Gateway activities.
Jun  1 13:00:42 MTA pmg-smtp-filter[13709]: starting database maintainance
Jun  1 13:00:42 MTA pmg-smtp-filter[13709]: end database maintainance (18 ms)
Jun  1 13:00:52 MTA kernel: [411035.685201] kauditd_printk_skb: 2 callbacks suppressed
Jun  1 13:00:52 MTA kernel: [411035.685203] audit: type=1400 audit(1590982252.546:1748): apparmor="DENIED" operation="create" profile="/usr/sbin/clamd" pid=16830 comm="clamd" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
Jun  1 13:00:55 MTA clamd[16830]: ERROR: LOCAL: Socket allocation error: Permission denied
Jun  1 13:00:55 MTA kernel: [411038.579171] audit: type=1400 audit(1590982255.442:1749): apparmor="DENIED" operation="create" profile="/usr/sbin/clamd" pid=16830 comm="clamd" family="unix" sock_type="stream" protocol=0 requested_mask="create" denied_mask="create" addr=none
Jun  1 13:00:55 MTA kernel: [411038.580306] audit: type=1400 audit(1590982255.442:1750): apparmor="DENIED" operation="create" profile="/usr/sbin/clamd" pid=16830 comm="clamd" family="unix" sock_type="dgram" protocol=0 requested_mask="create" denied_mask="create" addr=none
Jun  1 13:00:55 MTA systemd[1]: clamav-daemon.service: Main process exited, code=exited, status=1/FAILURE
Jun  1 13:00:55 MTA systemd[1]: clamav-daemon.service: Failed with result 'exit-code'.

I haven't checked the rest of the forum for this error yet, i'll do so now.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!