-
Improvement
-
Resolution: Fixed
-
Minor
-
None
Current situation does an error difficult to decrypt because the plugin doesn't check for the response status code:
2019-06-12 11:14:33.668+0000 [id=86689] SEVERE o.j.c.p.j.client.RestApiClient#getRemoteItems: Failed to list job from remote <url> org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 3; The element type "hr" must be terminated by the matching end-tag "</hr>". at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) at org.jenkins.ci.plugins.jobimport.client.RestApiClient.getRemoteItems(RestApiClient.java:34) at org.jenkins.ci.plugins.jobimport.JobImportAction.doQueryInternal(JobImportAction.java:278) at org.jenkins.ci.plugins.jobimport.JobImportAction.doQuery(JobImportAction.java:174)
Proposed fix checking for this status code:
Jun 13, 2019 12:41:52 PM org.jenkins.ci.plugins.jobimport.client.RestApiClient getRemoteItems SEVERE: Failed to list job from remote <url>. Response status code received 401. Content: <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 401 Invalid password/token for user: pierre</title> </head> <body><h2>HTTP ERROR 401</h2> <p>Problem accessing /api/xml. Reason: <pre> Invalid password/token for user: pierre</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/></body> </html>
[JENKINS-57991] Improve the error message when any issue happens while communicating to the target Jenkins
Assignee | New: Pierre Beitz [ pierrebtz ] |
Status | Original: Open [ 1 ] | New: In Progress [ 3 ] |
Status | Original: In Progress [ 3 ] | New: In Review [ 10005 ] |
Summary | Original: Improve the error message when the credentials of the remote Jenkins are not correct | New: Improve the error message when any issue happens while communicating to the target Jenkins |
Description |
Original:
Current situation does an error difficult to decrypt because the plugin doesn't check for the response status code: {noformat} 2019-06-12 11:14:33.668+0000 [id=86689] SEVERE o.j.c.p.j.client.RestApiClient#getRemoteItems: Failed to list job from remote <url> org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 3; The element type "hr" must be terminated by the matching end-tag "</hr>". at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) at org.jenkins.ci.plugins.jobimport.client.RestApiClient.getRemoteItems(RestApiClient.java:34) at org.jenkins.ci.plugins.jobimport.JobImportAction.doQueryInternal(JobImportAction.java:278) at org.jenkins.ci.plugins.jobimport.JobImportAction.doQuery(JobImportAction.java:174){noformat} Proposed fix checking for this status code: {noformat} Jun 12, 2019 5:36:04 PM org.jenkins.ci.plugins.jobimport.client.RestApiClient getRemoteItems SEVERE: Failed to list job from remote <url>/SEVERE: Failed to list job from remote <url>/org.acegisecurity.AccessDeniedException: Remote Jenkins denied access. Please check the provided credentials at org.jenkins.ci.plugins.jobimport.utils.URLUtils.fetchUrl(URLUtils.java:88) at org.jenkins.ci.plugins.jobimport.client.RestApiClient.getRemoteItems(RestApiClient.java:35) at org.jenkins.ci.plugins.jobimport.JobImportAction.doQueryInternal(JobImportAction.java:278) at org.jenkins.ci.plugins.jobimport.JobImportAction.doQuery(JobImportAction.java:174){noformat} |
New:
Current situation does an error difficult to decrypt because the plugin doesn't check for the response status code: {noformat} 2019-06-12 11:14:33.668+0000 [id=86689] SEVERE o.j.c.p.j.client.RestApiClient#getRemoteItems: Failed to list job from remote <url> org.xml.sax.SAXParseException; lineNumber: 10; columnNumber: 3; The element type "hr" must be terminated by the matching end-tag "</hr>". at com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:257) at com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339) at javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:121) at org.jenkins.ci.plugins.jobimport.client.RestApiClient.getRemoteItems(RestApiClient.java:34) at org.jenkins.ci.plugins.jobimport.JobImportAction.doQueryInternal(JobImportAction.java:278) at org.jenkins.ci.plugins.jobimport.JobImportAction.doQuery(JobImportAction.java:174){noformat} Proposed fix checking for this status code: {noformat} Jun 13, 2019 12:41:52 PM org.jenkins.ci.plugins.jobimport.client.RestApiClient getRemoteItems SEVERE: Failed to list job from remote <url>. Response status code received 401. Content: <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 401 Invalid password/token for user: pierre</title> </head> <body><h2>HTTP ERROR 401</h2> <p>Problem accessing /api/xml. Reason: <pre> Invalid password/token for user: pierre</pre></p><hr><a href="http://eclipse.org/jetty">Powered by Jetty:// 9.4.z-SNAPSHOT</a><hr/></body> </html>{noformat} |
Resolution | New: Fixed [ 1 ] | |
Status | Original: In Review [ 10005 ] | New: Fixed but Unreleased [ 10203 ] |