Sources list problem

Hello ,
The following is showing on my server on /etc/apt/sources.list.d :
15_ucs-online-version.list
20_ucs-online-component.list

# An error occurred during the repository check. The error message:
#   Traceback (most recent call last):
#     File "<stdin>", line 13, in <module>
#     File "/usr/lib/pymodules/python2.7/univention/updater/tools.py", line 571, in __init__
#       self.ucr_reinit()
#     File "/usr/lib/pymodules/python2.7/univention/updater/tools.py", line 633, in ucr_reinit
#       assert self.server.access('/univention-repository/')
#     File "/usr/lib/pymodules/python2.7/univention/updater/tools.py", line 492, in access
#       raise ConfigurationError(uri, reason)
#   ConfigurationError: Configuration error: host is unresolvable
#

# After fixing this issue, you should rewrite this file with the following command:
#   univention-config-registry commit /etc/apt/sources.list.d/15_ucs-online-version.list
         Of course this files are important to do any kind  updates or upgrades against your servers.  Please advice on what commands to run to regenerate the sources list for both files.  

Rolando Riley

Whats the output of

ucr get repository/online/server
ucr search version/

Is the repository server reachable with ping?

Hello,
Bellow the output of both commands

root@mail:/etc/apt/sources.list.d# ucr get repository/online/server
https://updates.software-univention.de/

 ucr search version/
repository/mirror/version/end: <empty>
 If the mirroring of the repository is active (see 'repository/mirror'), this variable is set each time to the UCS version which was last retrieved from the mirror.

repository/mirror/version/start: <empty>
 If the mirroring of the repository is active (see 'repository/mirror'), this variable configures the lowest UCS version which is retrieved from the mirror.

version/erratalevel: 364
 Four types of UCS updates are differentiated: Major releases (released approximately every four years, may introduce bigger changes), minor releases (released approximately every 6-8 months, error corrections and new functions), patch level releases (released every 2-3 months, less changes compared to a minor release, focus on bugfixes) and errata updates (timely bugfixes for security problems and critical bugs). This variable is set automatically during updates and contains the version of the installed errata updates.

version/patchlevel: 4
 Four types of Univention Configuration Registry updates are differentiated: Major releases (released approximately every four years, may introduce bigger changes), minor releases (released approximately every 6-8 months, error corrections and new functions), patch level releases (released every 2-3 months, less changes compared to a minor release, focus on bugfixes) and errata updates (timely bugfixes for security problems and critical bugs). This variable is set automatically during updates and contains the version of the installed patch level release.

version/releasename: Walle
 This variable contains the codename of the UCS release.

version/version: 4.0
 Four types of UCS updates are differentiated: Major releases (released approximately every four years, may introduce bigger changes), minor releases (released approximately every 6-8 months, error corrections and new functions), patch level releases (released every 2-3 months, less changes compared to a minor release, focus on bugfixes) and errata updates (timely bugfixes for security problems and critical bugs). This variable is set automatically during updates and contains the version of major and minor update.



Rolando Riley

And whats the output of

nslookup updates.software-univention.de
ping updates.software-univention.de

Do you have tried a

ucr commit /etc/apt/sources.list.d/*

Has then the content changed?

[code]oot@mail:/etc/apt/sources.list.d# nslookup updates.software-univention.de
Server: 192.168.1.2
Address: 192.168.1.2#53

Non-authoritative answer:
Name: updates.software-univention.de
Address: 176.9.114.147

root@mail:/etc/apt/sources.list.d# ping updates.software-univention.de
PING updates.software-univention.de (176.9.114.147) 56(84) bytes of data.
64 bytes from download2.software-univention.de (176.9.114.147): icmp_req=1 ttl=50 time=186 ms
64 bytes from download2.software-univention.de (176.9.114.147): icmp_req=2 ttl=50 time=226 ms
64 bytes from download2.software-univention.de (176.9.114.147): icmp_req=3 ttl=50 time=185 ms
64 bytes from download2.software-univention.de (176.9.114.147): icmp_req=4 ttl=50 time=183 ms
64 bytes from download2.software-univention.de (176.9.114.147): icmp_req=5 ttl=50 time=183 ms
64 bytes from download2.software-univention.de (176.9.114.147): icmp_req=6 ttl=50 time=182 ms
64 bytes from download2.software-univention.de (176.9.114.147): icmp_req=7 ttl=50 time=192 ms
64 bytes from download2.software-univention.de (176.9.114.147): icmp_req=8 ttl=50 time=190 ms
^C
updates.software-univention.de ping statistics —
8 packets transmitted, 8 received, 0% packet loss, time 7006ms
rtt min/avg/max/mdev = 182.050/191.202/226.957/13.899 ms
[/code]

ucr commit recreates the files exactly with the same content as the original post.

root@mail:/etc/apt/sources.list.d# ucr commit /etc/apt/sources.list.d/* File: /etc/apt/sources.list.d/15_ucs-online-version.list File: /etc/apt/sources.list.d/20_ucs-online-component.list

content of the file bellow:

root@mail:/etc/apt/sources.list.d# cat /etc/apt/sources.list.d/15_ucs-online-version.list
#Warning: This file is auto-generated and might be overwritten by
#         univention-config-registry.
#         Please edit the following file(s) instead:
#Warnung: Diese Datei wurde automatisch generiert und kann durch
#         univention-config-registry überschrieben werden.
#         Bitte bearbeiten Sie an Stelle dessen die folgende(n) Datei(en):
#
#       /etc/univention/templates/files/etc/apt/sources.list.d/15_ucs-online-version.list
#

# An error occurred during the repository check. The error message:
#   Traceback (most recent call last):
#     File "<stdin>", line 13, in <module>
#     File "/usr/lib/pymodules/python2.7/univention/updater/tools.py", line 571, in __init__
#       self.ucr_reinit()
#     File "/usr/lib/pymodules/python2.7/univention/updater/tools.py", line 633, in ucr_reinit
#       assert self.server.access('/univention-repository/')
#     File "/usr/lib/pymodules/python2.7/univention/updater/tools.py", line 492, in access
#       raise ConfigurationError(uri, reason)
#   ConfigurationError: Configuration error: host is unresolvable
#

# After fixing this issue, you should rewrite this file with the following command:
#   univention-config-registry commit /etc/apt/sources.list.d/15_ucs-online-version.list
#

Rolando Riley

Any thoughts on this?

RR

Hello RR,

your system is unable to contact the Univention update server and its repository. The error message is “host is unresolvable” which points to DNS. Let’s check if your system can resolve and reach the update server at all. Would you please execute the following commands and paste the output here:

host updates.software-univention.de
wget https://updates.software-univention.de/4.0/maintained/4.0-4/all/Packages.gz && md5sum Packages.gz

Best regards,
Michael Grandjean


root@mail:~# host updates.software-univention.de
updates.software-univention.de has address 176.9.114.147
updates.software-univention.de has IPv6 address 2a01:4f8:151:6489::2
root@mail:~# wget https://updates.software-univention.de/4.0/maintained/4.0-4/al    l/Packages.gz && md5sum Packages.gz
--2016-05-05 09:48:23--  https://updates.software-univention.de/4.0/maintained/4    .0-4/all/Packages.gz
Resolving updates.software-univention.de (updates.software-univention.de)... 176    .9.114.147, 2a01:4f8:151:6489::2
Connecting to updates.software-univention.de (updates.software-univention.de)|17    6.9.114.147|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 58524 (57K) [application/x-gzip]
Saving to: `Packages.gz'

100%[======================================>] 58,524      22.7K/s   in 2.5s

2016-05-05 09:48:30 (22.7 KB/s) - `Packages.gz' saved [58524/58524]

19c79a5fc1d2b2e968fe5e8485211a39  Packages.gz

Don’t see any problem. Is there a way I can grab those files from web to my system; if it is the case the systema can not regenerate them?

Rolando

Hey,

even if you replace the files with a working copy from someone else chances are they’ll get overwritten again soon if the underlying problem isn’t fixed. So let’s debug this some more.

Can you please post the output of the following commands:

[ul][li]cat /etc/resolv.conf[/li]
[li]ucr search --brief proxy/http[/li][/ul]

Additionally please run the following and attach the resulting file “/tmp/trace.txt” to this post: “strace -s 1000 -tt -f -o /tmp/trace.txt ucr commit /etc/apt/sources.list.d/15_ucs-online-version.list”

If the “strace” tool is not installed then download it manually from here, copy it to the server and install it with “dpkg -i strace*deb”.

Kind regards,
mosu

Moritz,

   The problem was resolved by the kind of help of Americas representative.  

[quote]
As for the details:

A UCS update is divided into multiple parts: A pre update script, the update
itself and a post update script.

On the server the pre update script for UCS 4.1 was already applied in parts,
but then canceled. This resulted in the server being already set to use an
encrypted connection for the update, but at the same time to a host that
didn’t support encrypted connections.

The issue could be easily resolved by setting the server to the new value and
unsetting the port:
ucr set repository/online/server=updates.software-univention.de
ucr unset repository/online/port[/quote]

Thanks Kevin

I experienced the same problems. After setting

ucr set repository/online/server=updates.software-univention.de
ucr unset repository/online/port

according to rriley recommendation I am getting following:

File: /etc/apt/sources.list.d/15_ucs-online-version.list
# An error occurred during the repository check. 
The error message: E: Problem executing scripts APT::Update::Pre-Invoke 'grep -Fqs '
# An error occurred during the repository check.' /etc/apt/sources.list.d/15_ucs-online-version.list && ucr commit /etc/apt/sources.list.d/15_ucs-online-version.list ; ! grep -F '
# An error occurred during the repository check.' /etc/apt/sources.list.d/15_ucs-online-version.list'
E: Sub-process returned an error code

host updates.software-univention.de
updates.software-univention.de has address 176.9.114.147
updates.software-univention.de has IPv6 address 2a01:4f8:151:6489::2

wget https://updates.software-univention.de/4.0/maintained/4.0-4/all/Packages.gz && md5sum Packages.gz
–2017-05-28 13:48:48-- https://updates.software-univention.de/4.0/maintained/4.0-4/all/Packages.gz
Auflösen des Hostnamen »updates.software-univention.de (updates.software-univention.de)«… 176.9.114.147, 2a01:4f8:151:6489::2
Verbindungsaufbau zu updates.software-univention.de (updates.software-univention.de)|176.9.114.147|:443…

stops

Found the error: wrong port forwarding in IPTABLES :innocent:

Mastodon