Environment
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Managed controller
-
CloudBees CI (CloudBees Core) on modern cloud platforms - Operations Center
-
CloudBees CI (CloudBees Core) on traditional platforms - Client controller
-
CloudBees CI (CloudBees Core) on traditional platforms - Operations Center
Resolution
There are some reasons why you have a networking error message when you try to reach an external URL (or an internet resource). One of them is the Connection timeout
. If you confirm you are able to reach this external URL from the machine that hosts the Jenkins instance, it’s time to check your proxy configuration if you have a proxy set up in your network environment.
In Jenkins we have three locations where you can set the proxy configuration:
-
In the Jenkins UI (
Manage Jenkins -> Manage Plugins -> Advanced
). -
In the JVM arguments (
-Dhttp.proxyHost
,-Dhttp.proxyPort
, etc). -
In the Plugin Specific Proxy settings (
Subversion SCM Plugin
, etc).
You should check for the following conditions to ensure your proxy configuration is correct:
-
You should set at least the
host
andport
field in your proxy configuration. If thehost
orport
field is missing, your current proxy configuration will be incorrect. -
You should add any host you want to bypass your proxy configuration in the
No Proxy Host
field. For the Jenkins UI, you can put each host in each line. For the JVM arguments, you should use the character|
to split each host. -
You should put the same
Host
,Port
, andNo Proxy Host
values in each Proxy settings location (Jenkins UI, JVM arguments, and Plugin Specific Proxy Settings). -
Probably, you should put the CJOC hostname in the
No Proxy Host
for the Controller instances. In the most common installations where both instances are located in the same network, you should put the CJOC hostname in theNo Proxy Host
for the Controller instance in order to bypass the proxy server during the connection between the CJOC instance and the Controller instances.
As you can see in the reference Setting a Proxy Configuration, Jenkins and some plugins rely on proxy settings in different locations and you will face wrong behavior if you set up different proxy values on these locations.
Additionally, please notice you have different proxy settings for HTTP or HTTPS connections from the JVM arguments. You can use the http.proxyHost
, http.proxyPort
and http.nonProxyHosts
for HTTP connections and https.proxyHost
, https.proxyPort
and https.nonProxyHosts
for HTTPS connections. Therefore, you should be very careful setting your proxy configuration in case you have different proxies depending on the connection type (HTTP or HTTPS). Also, please notice you have only one proxy setting for both HTTP and HTTPS connections from the Jenkins UI. Therefore, this feature (different proxies depending on the connection type) is not completely supported by Jenkins.