-
Bug
-
Resolution: Unresolved
-
Major
-
None
-
http request plugin: 1.8.24
Jenkins: 2.204.2
Dear Jenkins Community,
im using httprequest plugin with systemproperties.
unfortunately, when using proxy from systemproperties, the request does not work.
When giving the proxy dedicated into httprequest dsl method, it works:
Works:
httpRequest httpProxy: 'http://192.105.124.55:8081', authentication: 'GitHubID', url: "https://raw.github.blabla.net/bl-abla/some/master/project/project.properties"
Does not work:
httpRequest authentication: 'GitHubID', responseHandle: 'NONE', url: "https://raw.github.blabla.net/bl-abla/some/master/project/project.properties" , useSystemProperties: true
The system properties are as follows and should fit to what is required:
http.proxyHost http://192.105.124.55:8081
http.proxyPort 8081
https.proxyHost http://192.105.124.55:8081
https.proxyPort 8081
However, with systemproperties it does not work:
11:34:49 [Pipeline] httpRequest 11:34:50 HttpMethod: GET 11:34:50 URL: https://raw.github.blabla.net/bl-abla/some/master/project/project.properties 11:34:50 Using authentication: GitHubID 11:34:50 Sending request to url: https://raw.github.blabla.net/bl-abla/some/master/project/project.properties 11:34:50 Treating UnknownHostException(http://192.105.124.55: Temporary failure in name resolution) as 404 Not Found
And with proxy it works:
11:34:49 [Pipeline] httpRequest 11:34:49 HttpMethod: GET 11:34:49 URL: https://raw.github.blabla.net/bl-abla/some/master/project/project.properties 11:34:49 Using authentication: GitHubID 11:34:49 Sending request to url: https://raw.github.blabla.net/bl-abla/some/master/project/project.properties 11:34:49 Response Code: HTTP/1.1 200 OK
Could you help here?
What am i doing wrong?
The useSystemProperties flag is passed to Apache HttpClientBuilder, which then should use the system properties unless other proxy settings are passed in.
However on the (corp) Jenkins instance I have, there are no proxy settings in System.getProperties, but a proxy is returned by in Jenkins.get().getProxy().
Check whether the System.getProperties() contains the http. and https. settings you expect within the build environment?
Additionally: Should your *.proxyHost properties include the protocol and port? These are specified elsewhere in the properties. Some implementations may be more tolerant that others!