Bug 35614 - Better error messages for UCS activation
Better error messages for UCS activation
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: UMC - App-Center
UCS 3.2
Other Linux
: P5 normal (vote)
: UCS 4.0-2-errata
Assigned To: Florian Best
Alexander Kramer
:
: 35604 (view as bug list)
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-08-15 09:30 CEST by Janis Meybohm
Modified: 2015-08-06 17:55 CEST (History)
5 users (show)

See Also:
What kind of report is it?: ---
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Error handling, External feedback, Usability
Max CVSS v3 score:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Janis Meybohm univentionstaff 2014-08-15 09:30:02 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.
Comment 1 Florian Best univentionstaff 2015-01-23 11:49:05 CET
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
Comment 2 Florian Best univentionstaff 2015-01-23 11:51:22 CET
(In reply to Florian Best from comment #1)
Well, the error there could also be that just our appcenter server is overloaded.
Comment 3 Dirk Wiesenthal univentionstaff 2015-04-08 10:44:13 CEST
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.
Comment 4 Florian Best univentionstaff 2015-05-06 15:26:57 CEST
(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>
Comment 5 Florian Best univentionstaff 2015-05-11 16:40:30 CEST
*** Bug 35604 has been marked as a duplicate of this bug. ***
Comment 6 Florian Best univentionstaff 2015-07-07 15:52:05 CEST
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
Comment 7 Florian Best univentionstaff 2015-07-23 15:46:10 CEST
plus svn r62365, which was commited as Bug #38926
Comment 8 Alexander Kramer univentionstaff 2015-08-04 10:30:45 CEST
#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?
Comment 9 Alexander Kramer univentionstaff 2015-08-04 11:03:32 CEST
# 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?
Comment 10 Alexander Kramer univentionstaff 2015-08-04 11:08:08 CEST
FYI: Currently this fix (Bug #38132) prevents the msg to be displayed (umc)
Comment 11 Alexander Kramer univentionstaff 2015-08-04 13:43:52 CEST
#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
Comment 12 Alexander Kramer univentionstaff 2015-08-05 10:28:52 CEST
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.
Comment 13 Janek Walkenhorst univentionstaff 2015-08-06 17:55:53 CEST
<http://errata.univention.de/ucs/4.0/265.html>