Bug 46790 - Better error messages for activation wizard
Better error messages for activation wizard
Status: CLOSED FIXED
Product: UCS
Classification: Unclassified
Component: License
UCS 4.2
Other Linux
: P5 normal (vote)
: UCS 4.4-1-errata
Assigned To: Dirk Wiesenthal
Jürn Brodersen
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2018-04-06 17:25 CEST by Jürn Brodersen
Modified: 2020-06-03 12:52 CEST (History)
4 users (show)

See Also:
What kind of report is it?: Bug Report
What type of bug is this?: 5: Major Usability: Impairs usability in key scenarios
Who will be affected by this bug?: 2: Will only affect a few installed domains
How will those affected feel about the bug?: 4: A User would return the product
User Pain: 0.229
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number: 2018072921000227
Bug group (optional): External feedback
Max CVSS v3 score:


Attachments
patch (fbest/46790-acivation-error-handling) (2.74 KB, patch)
2019-08-27 15:33 CEST, Florian Best
Details | Diff
Catch stderr (1.64 KB, patch)
2019-09-10 10:25 CEST, Jürn Brodersen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jürn Brodersen univentionstaff 2018-04-06 17:25:01 CEST
File: base/univention-system-activation/www/ActivationWizard.js

The activation wizard uses "umc/json!/license" to get the license from UCS. If that call fails no error is thrown. Instead the variable license is just set to {}. That results in the error seen in bug 46098.
Comment 1 Christina Scheinig univentionstaff 2018-07-18 16:45:50 CEST
A customer reported this error message on his server, when trying to activate UCS. He did not know where to look up the problem. He tried several mail addresses, but finally it was a wrong dns entry.
"Die Aktivierung des UCS-Systems schlug fehl. Bitte wiederholen sie den Aktivierungsvorgang über das Benutzermenü oben rechts"
Comment 2 Nico Gulden univentionstaff 2018-07-30 10:18:26 CEST
(In reply to Christina Scheinig from comment #1)
> A customer reported this error message on his server, when trying to
> activate UCS. He did not know where to look up the problem. He tried several
> mail addresses, but finally it was a wrong dns entry.
> "Die Aktivierung des UCS-Systems schlug fehl. Bitte wiederholen sie den
> Aktivierungsvorgang über das Benutzermenü oben rechts"

Which DNS entry was wrong? On the UCS system or on the client that requested the license from the activation wizard?
Comment 3 Christina Scheinig univentionstaff 2018-07-30 11:15:18 CEST
The UCS system was connected to a AD Server.  If I remember correctly, the UCS system took the wrong network settings from the AD
Comment 4 Jürn Brodersen univentionstaff 2018-09-20 12:20:00 CEST
The current error message:

'''
The following error occurred:

Error 422: Invalid licence: Licence is missing.

If you encounter problems during the activation, please send an email to: feedback@univention.de
'''
Comment 5 Nico Gulden univentionstaff 2019-07-15 20:09:24 CEST
Looks like this bug is a duplicate of Bug #47839.
Comment 6 Florian Best univentionstaff 2019-08-27 15:33:42 CEST
Created attachment 10166 [details]
patch (fbest/46790-acivation-error-handling)

Suggested patch, which adds error handling to the request which accesses the current license. In case an error happens a pop up is displayed. In case a exception occurrs our traceback feedback dialog is shown.

That dialog might be unable to send traceback feedback to us because in the activation wizard UMC is blocked, IIRC. Nevertheless, if that fails, a message is shown with the option to send this to us as feedback. That's what currently happens, too, but would now include correct error messages or tracebacks.
Comment 7 Dirk Wiesenthal univentionstaff 2019-09-05 15:49:09 CEST
Fixed in
  univention-system-activation 4.0.0-5A~4.4.0.201909051142
and
  univention-web 3.0.5-29A~4.4.0.201909050917

The traceback is now shown as in UMC but without the "Send to vendor" button: It cannot work as this requires a UMC session.
Comment 8 Jürn Brodersen univentionstaff 2019-09-10 10:25:48 CEST
Created attachment 10177 [details]
Catch stderr

No send mail button is shown in case the ldapsearch subprocess fails
I think we should also catch stderr from the ldapsearch. (See patch as to what I mean)

-> Reopen
Comment 9 Dirk Wiesenthal univentionstaff 2019-09-11 23:30:03 CEST
Good idea. I slightly altered the error message in
  univention-system-activation 4.0.0-6A~4.4.0.201909112329
Comment 10 Jürn Brodersen univentionstaff 2019-09-13 12:19:53 CEST
What I tested (with an owncloud appliance):
Requesting a licence -> OK
Stopping the ldap server -> An error containing the stderr output is shown and can be send via mail -> OK
The send to vendor button is shown by default -> OK

jenkins installation tests are looking good -> OK

yaml -> OK

-> Verified
Comment 12 Florian Best univentionstaff 2020-05-29 12:13:52 CEST
git:d212cae2037f63fbf83620ab44fc770c2d3e7f16 introduces an error:
+               cmd = ['usr/bin/sudo', '/usr/bin/univention-ldapsearch', '-LLL', 'objectClass=univentionLicense']
-                       out = subprocess.check_output(['/usr/bin/sudo', '/usr/bin/univention-ldapsearch', '-LLL', 'objectClass=univentionLicense'])

→
Traceback (most recent call last):
  File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
    self.result = application(self.environ, self.start_response)
  File "src/wsgi.py", line 101, in application
    proc = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
  File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
    errread, errwrite)
  File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
Comment 13 Florian Best univentionstaff 2020-06-03 12:52:37 CEST
(In reply to Florian Best from comment #12)
> git:d212cae2037f63fbf83620ab44fc770c2d3e7f16 introduces an error:
> +               cmd = ['usr/bin/sudo', '/usr/bin/univention-ldapsearch',
> '-LLL', 'objectClass=univentionLicense']
> -                       out = subprocess.check_output(['/usr/bin/sudo',
> '/usr/bin/univention-ldapsearch', '-LLL', 'objectClass=univentionLicense'])
> 
> →
> Traceback (most recent call last):
>   File "/usr/lib/python2.7/wsgiref/handlers.py", line 85, in run
>     self.result = application(self.environ, self.start_response)
>   File "src/wsgi.py", line 101, in application
>     proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
> stderr=subprocess.STDOUT)
>   File "/usr/lib/python2.7/subprocess.py", line 390, in __init__
>     errread, errwrite)
>   File "/usr/lib/python2.7/subprocess.py", line 1024, in _execute_child
>     raise child_exception
> OSError: [Errno 2] No such file or directory

This has been fixed in Bug #51373.