simplestreams do not raise errors for failures behind a proxy
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
simplestreams |
New
|
Undecided
|
Unassigned | ||
simplestreams (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
Simplestreams do not catch errors created for being behind a proxy.
In MAAS, we were expecting / validating for json to be returned from simplestreams, but we kept seeing this failure:
[...]
line 325, in load_content
return json.loads(content)
File "/usr/lib/
return _default_
File "/usr/lib/
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/
raise JSONDecodeError
To debug, I had to do this:
--- simplestreams/
+++ simplestreams/
@@ -320,6 +320,7 @@
def load_content(
+ print(content)
if isinstance(content, bytes):
content = content.
return json.loads(content)
And this resulted in:
2018-08-31 14:13:36 stdout: [info] body
2018-08-31 14:13:36 stdout: [info] :lang(fa) { direction: rtl; font-size: 100%; font-family: Tahoma, Roya, sans-serif; float: right; }
2018-08-31 14:13:36 stdout: [info] :lang(he) { direction: rtl; }
2018-08-31 14:13:36 stdout: [info] --></style>
2018-08-31 14:13:36 stdout: [info] </head><body id=ERR_
2018-08-31 14:13:36 stdout: [info] <div id="titles">
2018-08-31 14:13:36 stdout: [info] <h1>ERROR</h1>
2018-08-31 14:13:36 stdout: [info] <h2>The requested URL could not be retrieved</h2>
2018-08-31 14:13:36 stdout: [info] </div>
2018-08-31 14:13:36 stdout: [info] <hr>
2018-08-31 14:13:36 stdout: [info]
2018-08-31 14:13:36 stdout: [info] <div id="content">
2018-08-31 14:13:36 stdout: [info] <p>The following error was encountered while trying to retrieve the URL: <a href="http://[2001:67c:
/v1/index.
2018-08-31 14:13:36 stdout: [info]
2018-08-31 14:13:36 stdout: [info] <blockquote id="error">
2018-08-31 14:13:36 stdout: [info] <p><b>Connection to 2001:67c:
2018-08-31 14:13:36 stdout: [info] </blockquote>
2018-08-31 14:13:36 stdout: [info]
2018-08-31 14:13:36 stdout: [info] <p id="sysmsg">The system returned: <i>(110) Connection timed out</i></p>
2018-08-31 14:13:36 stdout: [info]
2018-08-31 14:13:36 stdout: [info] <p>The remote host or network may be down. Please try the request again.</p>
2018-08-31 14:13:36 stdout: [info]
2018-08-31 14:13:36 stdout: [info] <p>Your cache administrator is <a href="mailto:
0ATimeStamp%
ser-Agent%
2018-08-31 14:13:36 stdout: [info]
2018-08-31 14:13:36 stdout: [info] <br>
2018-08-31 14:13:36 stdout: [info] </div>
2018-08-31 14:13:36 stdout: [info]
2018-08-31 14:13:36 stdout: [info] <hr>
2018-08-31 14:13:36 stdout: [info] <div id="footer">
2018-08-31 14:13:36 stdout: [info] <p>Generated Fri, 31 Aug 2018 14:13:36 GMT by localhost (squid/3.1.19)</p>
2018-08-31 14:13:36 stdout: [info] <!-- ERR_CONNECT_FAIL -->
2018-08-31 14:13:36 stdout: [info] </div>
2018-08-31 14:13:36 stdout: [info] </body></html>
2018-08-31 14:13:36 stdout: [info]
Which shows that simplestreams was failing to access the mirror because of a proxy issue, but it is not catching such issues.
Changed in simplestreams (Ubuntu): | |
importance: | Undecided → High |
importance: | High → Undecided |