2

I'm setting up Jenkins with Tomcat on AWS behind an ELB. I want ELB to terminate SSL connections and make a non-SSL connections to the backend jenkins on 8080.

My connection looks like --

Incoming 443 to ELB -> non-SSL incoming to jenkins on EC2 on 8080

Outgoing 443 to ELB <- non-SSL traffic from jenkins outgoing to ELB

Ive got the first one working where I can access jenkins via https://. However, jenkins says -- "It appears that your reverse proxy set up is broken" and has a link to https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+says+my+reverse+proxy+setup+is+broken

I'm not too familiar with tomcat configuration and I think it needs a proxy configuration. I tried adding proxyPort="443" to my server.xml for the connector port="8080" .. line and that didn't work.

How do you ensure that ELB acts as a SSL to non-SSL proxy and jenkins http responses from tomcat are sent as https:// by the ELB

2

After further effort to solve this, I figured out a way to get what I wanted done. Instead of me deploying a war from jenkins manually, I installed jenkins from their RHEL distribution repo and everything seems to be working well.

My setup is:

Internet -> (443) ELB (443) ---> (8080) EC2 Jenkins

ELB has no stickiness enabled and is terminating SSL connections. Connection to Jenkins backend is over HTTP.

Hopefully this will help anyone who wants to run Jenkins directly behind an ELB without a webserver inbetween to proxy.

| improve this answer | |
  • Did you need to change any configuration in Jenkins? I'm trying to do Internet -> (https:9090) ELB ---> (http:8080) EC2 Jenkins but I'm getting a protocol error – Acuariano Oct 6 '16 at 21:32
  • It's been a while. A few thing I'd check - 1. Is SSL on ELB configured properly. 2. Set the Jenkins URL in Jenkins configuration UI to have the https://<elb dns>:9090 – Chida Oct 7 '16 at 9:28
  • Don't worry. My problem was between keyboard and chair (was using the server URL instead of the ELB). – Acuariano Oct 8 '16 at 13:56
1

If you are deploying Jenkins via the WAR file, you can setup the ELB to forward HTTPS connections over port 8080.

In the ELB Listeners, setup a new listener with protocol as HTTPS, and in the port change 443 to 8080. Select instance protocol as HTTP and port as 8080. Now when you go to https://jenkins.server.com:8080, it should serve you the Jenkins running from the WAR.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.