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

Blue Ocean pages not updated/refreshed when behind Nginx reverse proxy

    • Blue Ocean 1.1-beta4

      When running Jenkins with Blue Ocean UI behind an Nginx reverse proxy, the job summary page and the running job page do not always get updated correctly.   You have to refresh the web page in order to have the latest information from the job.

      Attachment job1 it what I see for several minutes, but it never refreshed the page.  I know the job is completed as it only takes 23 seconds to run.  When I refresh the page, I correctly see the status (attachment job2).   Page updates do every once in a while seem to work for a job run.

      When I connect directly to the backend Jenkins app bypassing Nginx, the Blue Ocean UI works 100% as expected.

      Nginx is configured using the configuration file referenced by the Blue Ocean plugin here:

      https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Nginx

      Only change was to change the "server_name" line.

       

       

        1. job1.PNG
          job1.PNG
          19 kB
        2. job2.PNG
          job2.PNG
          24 kB

          [JENKINS-43944] Blue Ocean pages not updated/refreshed when behind Nginx reverse proxy

          Michael Neale added a comment -

          Hi johnlengeling  - will need some more info on this. I use nginx and it doesnt' show this, so it seems a very sensitive config. 

          Some questions to dig in to help: 

          • Do you see this on pipelines/branches that have "/" in the name? (ie a git branch called foo/bar) ? 
          • If so, can you open a pipeline with / in the name (will show up as %20 or something) - and then refresh it in the browser?
          • Do you see any errors in the browser console when the screen isn't updating? 
          • Is it only the results screen, or do you see things not update in the activity screen when you start a job? 
          • Is your nginx config set to be http 1.1 all the way - ie 1.1 from browser to nginx, and 1.1 to jenkins? 
          • is proxy_pass pointing directly to the jenkins port? otherwise need to read this: http://stackoverflow.com/questions/28684300/nginx-pass-proxy-subdirectory-without-url-decoding/37584637#37584637

           

          Sorry for the wall of things to look at. My theory is that this is either related to pipelines with / in the name (like git branch names), or SSE is failing you in some way. 2 different issues. Could you also perhaps share your nginx config? 

          Michael Neale added a comment - Hi johnlengeling  - will need some more info on this. I use nginx and it doesnt' show this, so it seems a very sensitive config.  Some questions to dig in to help:  Do you see this on pipelines/branches that have "/" in the name? (ie a git branch called foo/bar) ?  If so, can you open a pipeline with / in the name (will show up as %20 or something) - and then refresh it in the browser? Do you see any errors in the browser console when the screen isn't updating?  Is it only the results screen, or do you see things not update in the activity screen when you start a job?  Is your nginx config set to be http 1.1 all the way - ie 1.1 from browser to nginx, and 1.1 to jenkins?  is proxy_pass pointing directly to the jenkins port? otherwise need to read this: http://stackoverflow.com/questions/28684300/nginx-pass-proxy-subdirectory-without-url-decoding/37584637#37584637   Sorry for the wall of things to look at. My theory is that this is either related to pipelines with / in the name (like git branch names), or SSE is failing you in some way. 2 different issues. Could you also perhaps share your nginx config? 

          Michael,

          I went through your list and we didn't have http 1.1 enabled, so I added:

          proxy_http_version 1.1;

          While enabling http 1.1 helped, we still had occasional page refresh issues.  We are running nginx 1.4.4 (old...)  On a hunch, I upgraded to the 1.12.0 stable release and that appears to have fully resolved the issue.   I will be doing some additional testing, but it looks good now.

          I would recommend updating this page:

          https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Nginx

           

          John Lengeling added a comment - Michael, I went through your list and we didn't have http 1.1 enabled, so I added: proxy_http_version 1.1; While enabling http 1.1 helped, we still had occasional page refresh issues.  We are running nginx 1.4.4 (old...)  On a hunch, I upgraded to the 1.12.0 stable release and that appears to have fully resolved the issue.   I will be doing some additional testing, but it looks good now. I would recommend updating this page: https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Nginx  

          James Dumay added a comment -

          Assigning to you michaelneale as you appear to be the active investigator.

          James Dumay added a comment - Assigning to you michaelneale as you appear to be the active investigator.

          Michael Neale added a comment -

          johnlengeling https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Nginx has been updated - can you double check it looks similar to what you have? 

          Michael Neale added a comment - johnlengeling https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Nginx  has been updated - can you double check it looks similar to what you have? 

          Michael Neale added a comment -

          Closing this - it was due to needing http proxy working with http 1.1

          Michael Neale added a comment - Closing this - it was due to needing http proxy working with http 1.1

            michaelneale Michael Neale
            johnlengeling John Lengeling
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: