Univention Bugzilla – Full Text Bug Listing |
Summary: | False positives in system diagnostics when http_proxy is used | ||
---|---|---|---|
Product: | UCS | Reporter: | Philipp Hahn <hahn> |
Component: | UMC - System diagnostic | Assignee: | Christian Castens <castens> |
Status: | CLOSED FIXED | QA Contact: | Florian Best <best> |
Severity: | normal | ||
Priority: | P5 | CC: | ahrnke, best, castens, damrose, fg, grandjean, gulden, info, scheinig, schnick, voelker |
Version: | UCS 4.4 | ||
Target Milestone: | UCS 5.0-0-errata | ||
Hardware: | Other | ||
OS: | Linux | ||
See Also: |
https://forge.univention.org/bugzilla/show_bug.cgi?id=51682 https://forge.univention.org/bugzilla/show_bug.cgi?id=49151 |
||
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?: | 3: Will affect average number of installed domains | How will those affected feel about the bug?: | 2: A Pain – users won’t like this once they notice it |
User Pain: | 0.171 | Enterprise Customer affected?: | Yes |
School Customer affected?: | Yes | ISV affected?: | |
Waiting Support: | Flags outvoted (downgraded) after PO Review: | ||
Ticket number: | 2020011421000538, 2020072421000508, 2020070321000299, 2020080321000564, 2020082521000273, 2020122821000214 | Bug group (optional): | External feedback, Regression |
Max CVSS v3 score: | |||
Bug Depends on: | |||
Bug Blocks: | 53575 |
Description
Philipp Hahn
2019-12-10 16:44:43 CET
TT: 2019-12-09/10 (In reply to Philipp Hahn from comment #0) > Situation: Internal DNS does not resolve external addresses. Access to > internet only works through http-proxy. > > Running the diagnostic checks fails: > univention-run-diagnostic-checks --username Administrator --bindpwdfile > <(echo -n univention) -t 12_proxy > Failed writing body (0 != 8088) (code=23) > A customer has this issue in two environments, after an update to 4.4-3 e413 TT: 2020-06-18/19 TT: 2020-05-14/15 TT: 2020-04-23/24 Added affected customers and ticket numbers I had to spend time on this issue (was not the main problem of the ticket, but had to explain the critical alert) Same again... adding ticket. Seems to me that 12_proxy.py does never succeed as soon as a proxy is set. I got used to tell my customers they only have to allow www.univention.de (http and https) in their proxy, but this never cured the problem. You always get the write error (23) no matter if the proxy allows access. I'd suspect the culprit to be line 53: buf = io.StringIO() which was changed from StringIO.StringIO() somewhere along the lines of Python3 preparation. According to the docs http://pycurl.io/docs/latest/callbacks.html#writefunction the write function only accepts bytes strings, while io.StringIO requires unicode. Changing line 53 to read buf = io.BytesIO() made it work. Another major customer is affected by this. TT: 2020-11-19/20 diff --git a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/12_proxy.py b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/12_proxy.py index f9e823c8d2..77d4b7ba45 100644 --- a/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/12_proxy.py +++ b/management/univention-management-console-module-diagnostic/umc/python/diagnostic/plugins/12_proxy.py @@ -50,7 +50,7 @@ def run(_umc_instance, url='http://www.univention.de/', connecttimeout=30, timeo curl.setopt(pycurl.URL, url) # curl.setopt(pycurl.VERBOSE, bVerbose) - buf = io.StringIO() + buf = io.BytesIO() curl.setopt(pycurl.WRITEFUNCTION, buf.write) MODULE.process(''.join("Trying to connect to %s via HTTP proxy %s" % (url, proxy))) TT: 2021-02-18/19 The patch from one of the previous comments has been applied. 5.0-0: 3936c2a2a47cd20a7f9f9d028e844943dedb053a (changes) ab309682fd0c7ee244e492e008e6ac1475e42bfb (yaml) Package: univention-management-console-module-diagnostic Version: 6.0.0-13A~5.0.0.202107131648 Branch: ucs_5.0-0 Scope: errata5.0-0 OK: fix OK: code review OK: YAML |