Upgrade to 4.2.1/4.20 fails

Hello, I tried updating our UCS-Server (Version 4.1.4) to 4.20/4.2.1

If I do it with the Web console the Update simply doesn´t finish, and a reboot renders my server useless because it can´t boot anymore.

I tried it via ssh-terminal, and it also fails. I will put in the latest entries of the updater.log

2017-06-28 12:29:46,216 DEBUG:univention.appcenter.actions.upgrade.progress:80
send_information: action=upgrade app=ucsschool value=None status=200
2017-06-28 12:29:46,228 DEBUG:univention.appcenter.utils:send_information: action=upgrade app=ucsschool value=None status=200
tracking information: {‘status’: 200, ‘uuid’: ‘bae595a6-fa6b-4aa1-8e51-27129cdbd70a’, ‘app’: u’ucsschool’, ‘version’: u’4.1 R2 v12’, ‘role’: ‘domaincontroller_master’, ‘action’: ‘upgrade’, ‘system-uuid’: ‘ac7c2b29-fde8-49e1-9cad-12da49faaf93’}
2017-06-28 12:29:46,229 DEBUG:univention.appcenter.utils:tracking information: {‘status’: 200, ‘uuid’: ‘bae595a6-fa6b-4aa1-8e51-27129cdbd70a’, ‘app’: u’ucsschool’, ‘version’: u’4.1 R2 v12’, ‘role’: ‘domaincontroller_master’, ‘action’: ‘upgrade’, ‘system-uuid’: ‘ac7c2b29-fde8-49e1-9cad-12da49faaf93’}
Calling upgrade-search
2017-06-28 12:29:47,158 DEBUG:univention.appcenter.actions.upgrade-search:Calling upgrade-search
0
2017-06-28 12:29:47,158 DEBUG:univention.appcenter.actions.upgrade-search.progress:0
Checking ucsschool=4.1 R2 v12
2017-06-28 12:29:47,158 DEBUG:univention.appcenter.actions.upgrade-search:Checking ucsschool=4.1 R2 v12
100
2017-06-28 12:29:47,330 DEBUG:univention.appcenter.actions.upgrade-search.progress:100
100
2017-06-28 12:29:47,330 DEBUG:univention.appcenter.actions.upgrade.progress:100
univention-app upgrade finished at Wed Jun 28 12:29:47 2017…
done
Checking for release updates: found: UCS 4.2-0

Starting univention-upgrade. Current UCS version is 4.1-4 errata430

Starting update to UCS version 4.2-0 at Wed Jun 28 14:07:02 2017…
Starting update to UCS version 4.2-0
28.06.17 14:07:03.609 DEBUG_INIT
**** Starting univention-updater with parameter=[’/usr/share/univention-updater/univention-updater’, ‘net’, ‘–updateto’, ‘4.2-0’, ‘–silent’]
Version=4.1
Patchlevel=4
starting net mode
—>DBG:update_available(mode=net, cdrom_mount_point=/media/cdrom, iso=None)
Checking network repository
Update to = 4.2-0
**** Downloading scripts at Wed Jun 28 14:07:07 2017
**** Starting actual update at Wed Jun 28 14:07:09 2017
Running preup.sh script
Mi 28. Jun 14:07:09 CEST 2017

HINT:
Please check the release notes carefully BEFORE updating to UCS 4.2-0:
English version: https://docs.software-univention.de/release-notes-4.2-0-en.html
German version: https://docs.software-univention.de/release-notes-4.2-0-de.html

Please also consider documents of following release updates and
3rd party components.

Do you want to continue [Y/n]?
Starting univention-upgrade. Current UCS version is 4.1-4 errata430

WARNING: You are logged in using SSH – this may interrupt the update and result in an inconsistent system!
Please log in under the console or re-run with “–ignoressh” to ignore it.
Error: Update aborted by pre-update script of release 4.2-0
exitcode of univention-updater: 1
ERROR: update failed. Please check /var/log/univention/updater.log

How do I fix this issue?

Thanks in advance for helping!

There is everything written. You shouldn’t run the update directly via SSH. You could do it via the UMC, directly on the server (text terminal) or inside a screen environment. In the last case you still have to add the option “–ignoressh” to the command.

1 Like

Thank you for that answer,

I got a little further this time, but now the updates fails with the following log-entry:

Neue Version der Konfigurationsdatei /etc/cron.daily/spamassassin wird installiert …
Neue Version der Konfigurationsdatei /etc/default/spamassassin.debian wird installiert …
Neue Version der Konfigurationsdatei /etc/init.d/spamassassin wird installiert …
Neue Version der Konfigurationsdatei /etc/spamassassin/init.pre wird installiert …
Neue Version der Konfigurationsdatei /etc/spamassassin/local.cf wird installiert …
Can’t locate Net/DNS.pm in @INC (you may need to install the Net::DNS module) (@INC contains: /usr/share/perl5 /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.20.2 /usr/local/share/perl/5.20.2 /usr/lib/x86_64-linux-gnu/perl5/5.20 /usr/lib/x86_64-linux-gnu/perl/5.20 /usr/share/perl/5.20 /usr/local/lib/site_perl) at /usr/bin/sa-update line 87.
BEGIN failed–compilation aborted at /usr/bin/sa-update line 87.
dpkg: Fehler beim Bearbeiten des Paketes spamassassin (–configure):
Unterprozess installiertes post-installation-Skript gab den Fehlerwert 2 zurück
Trigger für systemd (215-17+deb8u5A~4.2.0.201701111554) werden verarbeitet …
Fehler traten auf beim Bearbeiten von:
spamassassin
Traceback (most recent call last):
File “/usr/sbin/univention-pkgdb-scan”, line 37, in
univention.pkgdb.main()
File “/usr/lib/pymodules/python2.7/univention/pkgdb.py”, line 538, in main
connection = open_database_connection(config_registry, pkgdbu=False)
File “/usr/lib/pymodules/python2.7/univention/pkgdb.py”, line 521, in open_database_connection
connection = pgdb.connect(database=connectstring)
File “/usr/lib/python2.7/dist-packages/pgdb.py”, line 482, in connect
dbtty, dbuser, dbpasswd)
pg.InternalError: FATAL: PAM-Authentifizierung f?r Benutzer >>isnix1$<< fehlgeschlagen

E: Sub-process /usr/bin/dpkg returned an error code (1)
Error: Failed to execute “apt-get -o DPkg::Options::=–force-confold -o DPkg::Options::=–force-overwrite -o DPkg::Options::=–force-overwrite-dir --trivial-only=no --assume-yes --quiet=1 -u dist-upgrade”
exitcode of univention-updater: 1
ERROR: update failed. Please check /var/log/univention/updater.log

Can you please post the full log in a code environment?

1 Like

Since I can´t upload the log or copy it since it is too long, I uploaded it to our extranet and created an external link for you.

You can download the full log here.

Thank you for your help!

Of course I meant only the parts after starting the upgrade. I’ve removed the irrelevant parts:
updater.log (2,4 MB)

If you ask me, you have to many staff out of unmaintained installed. Why you need a Pascal compiler on a server? But I’m not a expert in UCS@school, maybe It’s normal.

1 Like

Hello,

I take care of our UCS-Environment since January. I actually don´t know if all of those programs are needed.

I tried unchecking the “use unmaintained repositories”-Box in the Webconsole. But the Update still crashes…

From the logfile there are at least three problems:

  • libnet-dns-perl is not installed, but spamassassin needs it.
  • libapache2-mod-auth-pam is still installed, but it should not be.
  • libapache2-mod-php5 was not correctly installed.

Is the system still running? What do you mean by “it can’t boot anymore”? You can start by checking the status of those packages:
dpkg -l PACKAGENAME

1 Like

After a failed update it´s still running on the old version.
If I do the update via webconsole it freezes and after a reboot it can´t boot because it is in an infinite loop of searching network interfaces

Okay,

I have tried fixing those three issues.

Everytime it quits with the following error:

Trigger für initramfs-tools (0.120+deb8u2) werden verarbeitet …
update-initramfs: Generating /boot/initrd.img-4.9.0-ucs103-amd64
Fehler traten auf beim Bearbeiten von:
plymouth
spamassassin
univention-spamassassin
Traceback (most recent call last):
File “/usr/sbin/univention-pkgdb-scan”, line 37, in
univention.pkgdb.main()
File “/usr/lib/pymodules/python2.7/univention/pkgdb.py”, line 538, in main
connection = open_database_connection(config_registry, pkgdbu=False)
File “/usr/lib/pymodules/python2.7/univention/pkgdb.py”, line 521, in open_database_connection
connection = pgdb.connect(database=connectstring)
File “/usr/lib/python2.7/dist-packages/pgdb.py”, line 482, in connect
dbtty, dbuser, dbpasswd)
pg.InternalError: FATAL: PAM-Authentifizierung f?r Benutzer >>isnix1$<< fehlgeschlagen
E: Sub-process /usr/bin/dpkg returned an error code (1)

During an upgrade it’s always helpful to disable the packagedb, at least on the packagedb server:

ucr set pkgdb/scan='no'
1 Like

I have done all the steps above.

The Update failed again, because some 15_Univention_Update.list thing wasnt available or something, sorry I forgot to note down the exact name.

I tried a reboot. After being stuck in a screen that just said “loading” for an eternity, I got a login screen. I entered my credentials and we will see what happens next… The webconsole is not available.

Okay I am logged in and got a desktop. I can´t even enter the webconsole from the server itself. But Internet works

I have tried everything so far, and I´m still having trouble.
Is there any more Log or Information I can provide that will help locate the issue?

Can you check the following:

# ucr search --brief version
# apt-cache policy sysv-rc
1 Like

# ucr search --brief version gives:

appcenter/apps/cups/version: 1.5.3
appcenter/apps/dhcp-server/version: 10.0.1
appcenter/apps/kde/version: 4
appcenter/apps/mailserver/version: 10
appcenter/apps/pkgdb/version: 9
appcenter/apps/radius/version: 3.0
appcenter/apps/samba4/version: 4.5
appcenter/apps/self-service/version: 1.0
appcenter/apps/squid/version: 3.1
appcenter/apps/ucc/version: 3.0
appcenter/apps/ucsschool/version: 4.1 R2 v12
appcenter/apps/xrdp/version: 0.8.1
repository/mirror/version/end:
repository/mirror/version/start:
repository/online/component/.*/version:
repository/online/component/4.1-0-errata/version: 4.1
repository/online/component/4.1-1-errata/version: 4.1
repository/online/component/4.1-2-errata/version: 4.1
repository/online/component/4.1-3-errata/version: 4.1
repository/online/component/4.1-4-errata/version: 4.1
repository/online/component/ucc_20160811170611/version: current
repository/online/component/ucsschool_20170620134153/version: current
repository/online/component/xrdp_20150902/version: current
update/umc/nextversion: true
version/erratalevel: 435
version/patchlevel: 4
version/releasename: Vahr
version/version: 4.1

apt-cache policy sysv-rc gives:

sysv-rc:
Installiert: 2.88dsf-41.43.201408220944
Installationskandidat: 2.88dsf-41.43.201408220944
Versionstabelle:
*** 2.88dsf-41.43.201408220944 0
500 https://updates.software-univention.de/4.0/maintained/ 4.0-0/all/ Packages
100 /var/lib/dpkg/status

Okay, from your description that seems a little messed up - starting with the already installed unmaintained packages and all subsequent steps. First: unchecking the “unmaintained” checkbox does nothing for the already installed packages and may further complicate the problem since dependencies cannot be resolved anymore.

Is it possible to revert the server to before the update? After that I would uninstall all packages that are not needed, uncheck the “unmaintained”, run a “# dpkg --audit” followed by a “# dpkg --configure -a” and THEN do the update again. I think that would be best.

If that is no option, I would start with a “# dpkg --audit” followed by a “# dpkg --configure -a” -> is that looking okay?

1 Like

Yeah, I feared that the system being “messed up” is the problem here…

I can revert the server to a state before the failed update, but I do not have a backup of the server at a point where no unmaintained repository was used, sadly.

dpkg – audit and dpkg --configure -a dont get me any output.

Yes, reckoned that. I do not think you need to revert to a point where the unmaintained repos were not used, but you should remove packages you do not need and come from unmaintained:

# apt-get policy <packagename>
# apt-get remove <packagename>

and start from a clean package state:

# dpkg --audit

before attempting to update again.

Thanks for that tip!

Is there an easy way to find out what package is from unmaintained?

other then checking the package itself? # apt-get policy <packagename> tells you the source (so if it is from unmaintained you can see that there). Alternativly go to http://updates.software-univention.de/4.1/unmaintained/ and check the package list with the packages from the repository directly.

But I think your foremost thing to have in mind would be to leave only packages on the server, that you need productivly. That is the key, I think.

Mastodon