jira-plugin
jira-plugin copied to clipboard
"No Proxy Host"-List is not used
Your checklist for this issue
🚨 Please review the guidelines for contributing to this repository.
-
[x] Jenkins version ==> 2.346.1
-
[x] Plugin version ==> 3.7.1
-
[x] OS ==> Red Hat Enterprise Linux Server 7.9 (Maipo)
Reproduction steps
- Add a Proxy
- Add the Jira-Server to the "No Proxy Host"-List
- Use the Plugin (we use it to read Versions)
Results
Expected result:
Jira is accesses without the Proxy, since the Jira-Server is on the "No Proxy Host"-List
Actual result:
The Proxy is used to connect to Jira, our Proxy can't resolve the Jira server, and that cause an Error: See this log:
- http://webproxy.mycompany.example.com:8080 is the Proxy server
- http://jira.otherdomain.example.com:8080 is the Jira Server, and jira.otherdomain.example.com is on the "No Proxy Host"-List
Jul 20, 2022 2:02:48 PM FINE org.apache.http.impl.conn.PoolingHttpClientConnectionManager releaseConnection
Connection released: [id: 10088571][route: {}->http://webproxy.mycompany.example.com:8080->http://jira.otherdomain.example.com:8080][total available: 1; route allocated: 1 of 100; total allocated: 1 of 200]
Jul 20, 2022 2:02:48 PM WARNING hudson.plugins.jira.JiraRestService getVersions
Jira REST client get versions error. cause: status code: 502, reason phrase: notresolvable
org.apache.http.client.HttpResponseException: status code: 502, reason phrase: notresolvable
at org.apache.http.impl.client.AbstractResponseHandler.handleResponse(AbstractResponseHandler.java:70)
at org.apache.http.client.fluent.Response.handleResponse(Response.java:90)
at org.apache.http.client.fluent.Response.returnContent(Response.java:97)
at hudson.plugins.jira.JiraRestService.getVersions(JiraRestService.java:232)
at hudson.plugins.jira.JiraSession.getVersions(JiraSession.java:147)
at hudson.plugins.jira.versionparameter.JiraVersionParameterDefinition.getVersions(JiraVersionParameterDefinition.java:69)
at jdk.internal.reflect.GeneratedMethodAccessor1364.invoke(Unknown Source)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
Relates to https://github.com/jenkinsci/jira-plugin/issues/385 where the proxy was first used
Hi @hinneLinks, Indeed, that might be caused by the fact that the current implementation is not taking into account the noProxyHost setting.
This should be fairly easy reproducible via a test. Would you have sime time to spend and contribute a Pull Request with a fix? Alternatively, please consider sponsoring one of the maintainers to fix this issue.