Status: Open (View Workflow)
Environment:AWS EC2 instance running Amazon Linux 2
docker container jenkins/jenkins:lts (V2.235.3)
saml plugin V1.1.6
configuration as code plugin V1.42
java.runtime.name OpenJDK Runtime Environment
Browser: Google Chrome 84.0.4147.105
My environment is behind a corporate forward proxy. There is no direct access to the internet.
With the CASC config split over two different yaml files:
where 01_jenkins.yaml contains the proxy config:
and 02_saml.yaml containing a saml security realm:
Starting Jenkins fails with a "connect timeout" exception because the saml plugin is unable to download the IDP metadata.
The logs (see attached screenshot) show that the proxy is being configured(multiple entries for this) but then subsequently, an IOException is thrown since jenkins cannot download a metadatafile required for the saml plugin.
This seems to be some racing condition where the proxy config is not yet persisted once the saml plugin tries to grab the IDP metadata.
There is no issue with my config or starting Jenkins if I remove the 02_saml.yaml file and use a local Jenkins user in my security realm. In this case there are no errors in the logs and the proxy gets configured as expected.
If I then add 02_saml.yaml and restart Jenkins so that the JCASC configuration get reloaded, everything works as expected.
As a workaround, I now inject a file 'proxy.xml' directly in $JENKINS_HOME before starting Jenkins.