[JIRA] (JENKINS-57991) Improve the error message when any issue happens while communicating to the target Jenkins

5 views
Skip to first unread message

pibeitz@gmail.com (JIRA)

unread,
Jun 13, 2019, 6:49:02 AM6/13/19
to jenkinsc...@googlegroups.com
Pierre Beitz updated an issue
 
Jenkins / Improvement JENKINS-57991
Improve the error message when any issue happens while communicating to the target Jenkins
Change By: Pierre Beitz
Summary: Improve the error message when any issue happens while communicating to the credentials of the remote target Jenkins are not correct
Add Comment Add Comment
 
This message was sent by Atlassian Jira (v7.11.2#711002-sha1:fdc329d)

pibeitz@gmail.com (JIRA)

unread,
Jun 13, 2019, 6:50:02 AM6/13/19
to jenkinsc...@googlegroups.com
Pierre Beitz updated an issue
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 13 , 2019 5 12 : 36 41 : 04 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
/ SEVERE html;charset=utf-8"/>
<title>Error 401 Invalid password/token for user
: Failed to list job from remote pierre < url /title >
<
/ org head>
<body><h2>HTTP ERROR 401</h2>
<p>Problem accessing /api/xml
. acegisecurity.AccessDeniedException Reason : Remote Jenkins denied access. Please check the provided credentials at org.jenkins.ci.plugins.jobimport.utils.URLUtils.fetchUrl(URLUtils.java
<pre>    Invalid password/token for user
: 88) at org.jenkins.ci.plugins.jobimport.client.RestApiClient.getRemoteItems(RestApiClient.java pierre</pre></p><hr><a href="http : 35) at org //eclipse . jenkins.ci.plugins.jobimport.JobImportAction.doQueryInternal(JobImportAction.java:278) at org /jetty">Powered by Jetty:// 9 . jenkins 4 . ci.plugins.jobimport.JobImportAction.doQuery(JobImportAction.java:174) z-SNAPSHOT</a><hr/></body>
</html>
{noformat}

pibeitz@gmail.com (JIRA)

unread,
Oct 6, 2019, 1:04:03 PM10/6/19
to jenkinsc...@googlegroups.com
Change By: Pierre Beitz
Status: In Review Fixed but Unreleased
Resolution: Fixed
This message was sent by Atlassian Jira (v7.13.6#713006-sha1:cc4451f)
Atlassian logo
Reply all
Reply to author
Forward
0 new messages