Univention Bugzilla – Bug 46790
Better error messages for activation wizard
Last modified: 2020-06-03 12:52:37 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.
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"
(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?
The UCS system was connected to a AD Server. If I remember correctly, the UCS system took the wrong network settings from the AD
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 '''
Looks like this bug is a duplicate of Bug #47839.
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.
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.
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
Good idea. I slightly altered the error message in univention-system-activation 4.0.0-6A~4.4.0.201909112329
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
<http://errata.software-univention.de/ucs/4.4/280.html> <http://errata.software-univention.de/ucs/4.4/281.html>
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
(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.