Univention Bugzilla – Bug 35614
Better error messages for UCS activation
Last modified: 2015-08-06 17:55:53 CEST
UCS activation (key-id generation etc.) are the first things a new customer or tester has to go thru. We should extend potential error messages with some hints and tips what may have gone wrong or what to check. Example: --- Die Anfrage konnte nicht ausgeführt werden. Fehlernachnaricht des Servers: Das Kommando ist fehlgeschlagen: Ein Fehler ist während des Anforderns aufgetreten: <urlopen error [Errno -2] Der Name oder der Dienst ist nicht bekannt> --- Most likely this happens because of wrong DNS settings. We should directly provide help on how to check and fix them.
When fixing this bug please not just catch urlopen-error and assume that the error is "Der Name oder der Dienst ist nicht bekannt". It could e.g. be the case that something is really wrong on the system with e.g. the SSL settings like the following reported case: http://forum.univention.de/viewtopic.php?t=3709&p=13298#p13298
(In reply to Florian Best from comment #1) Well, the error there could also be that just our appcenter server is overloaded.
See r58613, r58614, r58622 The problem can still occur in the App Center, but this specific issue is now in UDM's code. Maybe the error messages in the patches are too specific, one should test whether this can happen in other situations.
(In reply to Florian Best from comment #1) http://forum.univention.de/download/file.php?id=384&sid=faa00e3aa844895eef05af0579cbc028&mode=view Ein Fehler ist während des Anforderns aufgetreten. <urlopen error [Errno 1] _ssl.c:504 … routines:SSL23_GET_SERVER_HELLO:unknown protocol>
*** Bug 35604 has been marked as a duplicate of this bug. ***
The error messages in UDM are now handled, too. univention-management-console-module-udm (5.1.25-72): r61848 | Bug #35614: implement error handling when requesting license 2015-05-12-univention-management-console-module-udm.yaml: r61850 | YAML Bug #35614
plus svn r62365, which was commited as Bug #38926
#QA: Case 1: Wrong DNS config HOWTO: I just removed the external DNS server in network setting: english: 04.08.15 10:27:27.940 DEBUG_INIT 04.08.15 10:27:41.207 MODULE ( ERROR ) : ### str(exc): <urlopen error [Errno -2] Name or service not known> 04.08.15 10:27:41.208 MODULE ( ERROR ) : ### exc.reason: [Errno -2] Name or service not known 04.08.15 10:27:41.208 MODULE ( ERROR ) : ### exc.errno: -2 04.08.15 10:27:41.208 MODULE ( PROCESS ) : An error occurred while contacting the license server: Name or service not known. This is probably due to the DNS settings of your server. You may find help at http://docs.univention.de/manual-4.0.html#networks:dns. german: 04.08.15 10:23:54.846 DEBUG_INIT 04.08.15 10:24:15.144 MODULE ( ERROR ) : ### str(exc): <urlopen error [Errno -2] Der Name oder der Dienst ist nicht bekannt> 04.08.15 10:24:15.145 MODULE ( ERROR ) : ### exc.reason: [Errno -2] Der Name oder der Dienst ist nicht bekannt 04.08.15 10:24:15.145 MODULE ( ERROR ) : ### exc.errno: -2 04.08.15 10:24:15.145 MODULE ( PROCESS ) : Ein Fehler beim kontaktieren des Lizenz-Servers ist aufgetreten: Der Name oder der Dienst ist nicht bekannt. Grund sind wahrscheinlich die DNS-Einstellungen Ihres Servers. Sie finden Hilfe unter http://docs.univention.de/handbuch-4.0.html#networks:dns. Question: Is it possible to display the link to the german docs?
# QA Case 2: License Server is not reachable HOWTO: I added an entry into /etc/hosts like this: -> 10.200.36.xxx <FQDN license Server> behind the ip address is no server so you will get this error: 04.08.15 10:55:54.406 MODULE ( ERROR ) : ### str(exc): <urlopen error [Errno 113] No route to host> 04.08.15 10:55:54.406 MODULE ( ERROR ) : ### exc.reason: [Errno 113] No route to host 04.08.15 10:55:54.406 MODULE ( ERROR ) : ### exc.errno: 113 04.08.15 10:55:54.406 MODULE ( PROCESS ) : An error occurred while contacting the license server: No route to host IMHO the msg 'No route to host' will confuse the user. I would prefer the line: 'This seems to be a problem with the license server. Please try again later. --> in this case strerror won't become this string, because - (A) exc has no attribute getcode and - while hasattr(exc, 'reason') would overwrite strerror Is it necessary to evaluate exc.reason? Is there a use-case where the reason will provide useful info fpr the user?
FYI: Currently this fix (Bug #38132) prevents the msg to be displayed (umc)
#QA: Case: 3 SSL Error As discussed here: http://forum.univention.de/viewtopic.php?t=3709&p=13298#p13298 I tried to reproduce the ssl error. Sadly I wasn't able to configure squid in such way that I got the same error. Instead I used a (miss)configured ip forwading to reproduce an ssl error. As you can see this will no be handled as expected. The msg that is provided to the user is still cryptic. HOWTO: iptables -t nat -A OUTPUT -p tcp --dport 443 -j DNAT --to-destination :80 04.08.15 13:29:03.710 MODULE ( ERROR ) : ### str(exc): <urlopen error [Errno 8] _ssl.c:504: EOF occurred in violation of protocol> 04.08.15 13:29:03.710 MODULE ( ERROR ) : ### exc.reason: [Errno 8] _ssl.c:504: EOF occurred in violation of protocol 04.08.15 13:29:03.710 MODULE ( ERROR ) : ### exc.errno: 8 04.08.15 13:29:03.711 MODULE ( PROCESS ) : An error occurred while contacting the license server: _ssl.c:504: EOF occurred in violation of protocol 04.08.15 13:36:41.366 MAIN ( WARN ) : Shutting down all open connections 04.08.15 13:38:00.848 MAIN ( WARN ) : Shutting down all open connections
As discussed with Stefan I am closing this Bug so we can go on with the errata process. The fix doesn't solve the problem, but also does not break something. Cause of that I will clone this Bug for a later rework. UCS4.0-2 OK - debian/changelog OK - yaml file FYI: Changes were made before adding the branch for UCS4.1, so no merge needed.
<http://errata.univention.de/ucs/4.0/265.html>