Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-73667

IIS reverse proxy "It appears that your reverse proxy set up is broken." after Jenkins 2.473 upgrade

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • core
    • None

      originally i followed Reverse proxy - IIS (jenkins.io) to set up reverse proxy and it was all working fine until I upgraded to Jenkins 2.473.

       

      from browser dev tools, I can see call is being made to 

      GET

      https://jenkins.mycompany.com/administrativeMonitor/hudson.diagnosis.ReverseProxySetupMonitor/testForReverseProxySetup/https%3A%2F%2Fjenkins.mycompany.com%2Fmanage%2F/ which returns 404

       

      If i open this url in browser tab, i see message Oops! message with 

       

      https://jenkins.mycompany.com:8080/manage vs. https://jenkins.mycompany.com/manage/

      This page may not exist, or you may not have permission to see it.

          [JENKINS-73667] IIS reverse proxy "It appears that your reverse proxy set up is broken." after Jenkins 2.473 upgrade

          Bharat Bhatia added a comment -

          markewaite yes, the url is configured correctly

           

          Also, i did followed the guide and it started recently since i upgraded

          Bharat Bhatia added a comment - markewaite yes, the url is configured correctly   Also, i did followed the guide and it started recently since i upgraded

          Bharat Bhatia added a comment -

          Also, just reverted back to 2.471 and warning goes away and reverse proxy is working as  expected with no changes on server or any rules.

          Bharat Bhatia added a comment - Also, just reverted back to 2.471 and warning goes away and reverse proxy is working as  expected with no changes on server or any rules.

          Bharat Bhatia added a comment -

          Any update on this as this is also causing Jenkins to redirect to port “8080” in url after clicking built button

          Bharat Bhatia added a comment - Any update on this as this is also causing Jenkins to redirect to port “8080” in url after clicking built button

          Mark Waite added a comment -

          I'm not aware of any case in the past where that message was anything other than a configuration error.  The fact that the configuration error is exposed on a Jenkins upgrade is interesting but not at all conclusive that the issue is a Jenkins bug.

          I don't run an IIS reverse proxy and I don't know many users that run an IIS reverse proxy.  Your alternatives include:

          • Switch to a more widely used reverse proxy (like nginx). Host the nginx reverse proxy on a Unix server and point it to the Jenkins controller on your Windows computer
          •  Stop using a reverse proxy

          I'm not willing to attempt to duplicate your configuration because I'm not interested in configuring an IIS reverse proxy. You're welcome to raise a question on https://community.jenkins.io in hopes that there are other users of IIS as a reverse proxy that are interested in helping.

          Mark Waite added a comment - I'm not aware of any case in the past where that message was anything other than a configuration error.  The fact that the configuration error is exposed on a Jenkins upgrade is interesting but not at all conclusive that the issue is a Jenkins bug. I don't run an IIS reverse proxy and I don't know many users that run an IIS reverse proxy.  Your alternatives include: Switch to a more widely used reverse proxy (like nginx). Host the nginx reverse proxy on a Unix server and point it to the Jenkins controller on your Windows computer  Stop using a reverse proxy I'm not willing to attempt to duplicate your configuration because I'm not interested in configuring an IIS reverse proxy. You're welcome to raise a question on https://community.jenkins.io in hopes that there are other users of IIS as a reverse proxy that are interested in helping.

          Bharat Bhatia added a comment -

          At least I found workaround for build with parameters redirect to port 8080 issue. Check "Reverse rewrite host in response headers" in iis for ARR settings if anyone else is having this issue

          Bharat Bhatia added a comment - At least I found workaround for build with parameters redirect to port 8080 issue. Check "Reverse rewrite host in response headers" in iis for ARR settings if anyone else is having this issue

          David added a comment -

          Just going to add my name to the list of 'rare IIS reverse proxy' users and we are also seeing this issue.

          Pre-upgrade to 2.479.2 we had no issues. Now we get this warning and the issues with redirects.

          Again we've had zero changes made to our functioning IIS reverse proxy.

          David added a comment - Just going to add my name to the list of 'rare IIS reverse proxy' users and we are also seeing this issue. Pre-upgrade to 2.479.2 we had no issues. Now we get this warning and the issues with redirects. Again we've had zero changes made to our functioning IIS reverse proxy.

          Tim Jacomb added a comment -

          daveq_work have you tried the Reverse rewrite host in response headers setting?

          Tim Jacomb added a comment - daveq_work have you tried the Reverse rewrite host in response headers setting?

          David added a comment -

          timja Yes I made that change in our IIS instance. It did indeed fix the issue with 'build' redirecting, which is great (thank you xs2bharat).

          However I still get the warning in manage jenkins and the same result when using the test endpoint `administrativeMonitor/hudson.diagnosis.ReverseProxySetupMonitor/test` where the port number of the proxied service is appearing after the 'public' address

          David added a comment - timja Yes I made that change in our IIS instance. It did indeed fix the issue with 'build' redirecting, which is great (thank you xs2bharat ). However I still get the warning in manage jenkins and the same result when using the test endpoint ` administrativeMonitor/hudson.diagnosis.ReverseProxySetupMonitor/test`  where the port number of the proxied service is appearing after the 'public' address

          xs2bharat timja daveq_work : We also seem to have the same issue and while "Reverse rewrite host in response headers setting" fixes one part but it ends up breaking the other part of Jenkins where in we want to use the capability of "Serve resource files from another domain using Resource Root URL". The reverse rewrite host setting also rewrites the host in case of resource root url as well. 

          Alok Kumar Singh added a comment - xs2bharat timja daveq_work : We also seem to have the same issue and while "Reverse rewrite host in response headers setting" fixes one part but it ends up breaking the other part of Jenkins where in we want to use the capability of "Serve resource files from another domain using Resource Root URL". The reverse rewrite host setting also rewrites the host in case of resource root url as well. 

          John added a comment -

          xs2bharat and timja 

          Similar issue after I update from Jenkins 2.462.3 to Jenkins 2.479.2 LTS.
          I am getting Redirect URI issue.

          Jenkins changelog includes upgrading Jetty from 10.x to 12.x.
          I guess, something in there is causing the issue.

          After update, I am getting the following issue.

          AADSTS50011: The redirect URI https://\{your_jenkins_host}:8080/securityRealm/finishLogin’ specified in the request does not match the redirect URIs configured for the application ‘’. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to [Error AADSTS50011 the redirect URI does not match the redirect URIs configured for the application | Microsoft Learn|https://aka.ms/redirectUriMismatchError] to learn more about how to fix this.

           

          Jenkins setup:

          I have IIS in Windows server.

          Jenkins: 2.462.3
          OS: Windows Server 2022 - 10.0
          Java: 17.0.7 - Eclipse Adoptium (OpenJDK 64-Bit Server VM)

          Office-365-Connector:5.0.0
          active-directory:2.38

          John added a comment - xs2bharat and timja   Similar issue after I update from Jenkins 2.462.3 to Jenkins 2.479.2 LTS. I am getting  Redirect URI  issue. Jenkins changelog includes upgrading Jetty from 10.x to 12.x. I guess, something in there is causing the issue. After update, I am getting the following issue. AADSTS50011: The redirect URI   ‘ https://\ {your_jenkins_host}:8080/securityRealm/finishLogin’  specified in the request does not match the redirect URIs configured for the application ‘’. Make sure the redirect URI sent in the request matches one added to your application in the Azure portal. Navigate to  [Error AADSTS50011 the redirect URI does not match the redirect URIs configured for the application | Microsoft Learn|https://aka.ms/redirectUriMismatchError]  to learn more about how to fix this.   Jenkins setup: I have IIS  in Windows server. Jenkins: 2.462.3 OS: Windows Server 2022 - 10.0 Java: 17.0.7 - Eclipse Adoptium (OpenJDK 64-Bit Server VM) Office-365-Connector:5.0.0 active-directory:2.38

            Unassigned Unassigned
            xs2bharat Bharat Bhatia
            Votes:
            3 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: