• Blue Ocean 1.4 - beta 3

      Using Folders and Blue Ocean results in 404 when clicked from the job

      Original location: http://domain/job/CD/job/OPF2-Plat-Dep-KCloud/

      Blue Ocean location: http://domain/blue/organizations/jenkins/CD/OPF2-Plat-Dep-KCloud/

      Jenkins is behind an NGINX Proxy

      For reference NGINX configuration as follows:

      server {
          listen       80;
          server_name  $hostname;
      
          #charset koi8-r;
          #access_log  /var/log/nginx/log/host.access.log  main;
      
          location / {
              proxy_pass http://192.168.1.201:8080/;
              sendfile off;
              proxy_set_header   Host             $host:$server_port;
              proxy_set_header   X-Real-IP        $remote_addr;
              proxy_set_header   X-Forwarded-For  $proxy_add_x_forwarded_for;
              proxy_max_temp_file_size 0;
      
              #this is the maximum upload size
              client_max_body_size       555550m;
              client_body_buffer_size    128k;
      
              proxy_connect_timeout      90;
              proxy_send_timeout         90;
              proxy_read_timeout         90;
      
              proxy_buffer_size          4k;
              proxy_buffers              4 32k;
              proxy_busy_buffers_size    64k;
              proxy_temp_file_write_size 64k;
      
                  # Required for new HTTP-based CLI
              proxy_http_version 1.1;
              proxy_request_buffering off;
              }
      
          error_page   500 502 503 504  /50x.html;
          location = /50x.html {
              root   /usr/share/nginx/html;
          }
      
          location /grafana {
              proxy_pass http://192.168.1.205:3000;
           rewrite  ^/grafana/(.*)  /$1 break;
           proxy_set_header   Host $host;
          }
      
      }

      For reference here is the output of nginx logs

      10.8.1.144 - - [22/Nov/2017:10:59:34 +0000] "GET /sse-gateway/listen/jenkins-blueocean-core-js-1511347664463-h19lhh HTTP/1.1" 499 0 "http://domain/blue/organizations/jenkins/CD/OPF2-Plat-Dep-KCloud/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0" "-"
      10.8.1.144 - - [22/Nov/2017:10:59:34 +0000] "GET /blue/organizations/jenkins/CD/OPF2-Plat-Dep-KCloud/ HTTP/1.1" 200 4251 "http://domain/job/CD/job/OPF2-Plat-Dep-KCloud/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0" "-"
      10.8.1.144 - - [22/Nov/2017:10:59:34 +0000] "GET /static/da45a637/plugin/blueocean-web/assets/jdl/css/jenkins-design-language.css HTTP/1.1" 304 0 "http://domain/blue/organizations/jenkins/CD/OPF2-Plat-Dep-KCloud/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0" "-"
      10.8.1.144 - - [22/Nov/2017:10:59:34 +0000] "GET /static/da45a637/plugin/blueocean-web/assets/corejs/css/blueocean-core-js.css HTTP/1.1" 304 0 "http://domain/blue/organizations/jenkins/CD/OPF2-Plat-Dep-KCloud/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0" "-"
      10.8.1.144 - - [22/Nov/2017:10:59:34 +0000] "GET /adjuncts/da45a637/io/jenkins/blueocean/blueocean.js HTTP/1.1" 304 0 "http://domain/blue/organizations/jenkins/CD/OPF2-Plat-Dep-KCloud/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0" "-"
      10.8.1.144 - - [22/Nov/2017:10:59:34 +0000] "GET /adjuncts/da45a637/io/jenkins/blueocean/blueocean.css HTTP/1.1" 304 0 "http://domain/blue/organizations/jenkins/CD/OPF2-Plat-Dep-KCloud/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0" "-"
      10.8.1.144 - - [22/Nov/2017:10:59:35 +0000] "GET /sse-gateway/connect?clientId=jenkins-blueocean-core-js-1511347664463-h19lhh HTTP/1.1" 200 73 "http://domain/blue/organizations/jenkins/CD/OPF2-Plat-Dep-KCloud/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0" "-"
      10.8.1.144 - - [22/Nov/2017:10:59:35 +0000] "GET /blue/rest/i18n/blueocean-web/1.3.0/jenkins.plugins.blueocean.web.Messages/en-GB HTTP/1.1" 200 2043 "http://domain/blue/organizations/jenkins/CD/OPF2-Plat-Dep-KCloud/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0" "-"
      

          [JENKINS-48159] Open Blue ocean for Job results in 404

          That's why I've pasted my nginx config there so that it's clear. To be honest everything works on the normal jenkins interface and if I search within blue ocean it's also fine. However clicking the link will always produce a 404

          Peter Teichner added a comment - That's why I've pasted my nginx config there so that it's clear. To be honest everything works on the normal jenkins interface and if I search within blue ocean it's also fine. However clicking the link will always produce a 404

          James Dumay added a comment -

          Thanks pteichner.

          michaelneale any bright ideas what this could be?

          James Dumay added a comment - Thanks pteichner . michaelneale any bright ideas what this could be?

          Should there be a need for tcpdump please let me know 

          Peter Teichner added a comment - Should there be a need for tcpdump please let me know 

          Michael Neale added a comment - - edited

          Not sure there is enough info here to act on, so no, no ideas here - I don't think it is related to encoding. If accessing NOT via a proxy does it work? Does the link to blue ocean work in any places? 

           

          "clicking the link will always 404" - not sure what that means? you said search works but you can't click on a result? 

          Michael Neale added a comment - - edited Not sure there is enough info here to act on, so no, no ideas here - I don't think it is related to encoding. If accessing NOT via a proxy does it work? Does the link to blue ocean work in any places?    "clicking the link will always 404" - not sure what that means? you said search works but you can't click on a result? 

          Sorry I should have been more specific:

          Through Proxy:

          • Jenkins home -> Blue ocean: OK
          • Inside Folder (with some jobs) -> Blue Ocean: OK (although it does display all jobs rather than just folder)
          • From Job (inside Folder) -> Blue Ocean: NOK (link: blue/organizations/jenkins/BLR1/AGW/ where BLR1 is folder and AGW is pipeline
          • From Job Build -> Blue Ocean: NOK (link: blue/organizations/jenkins/BLR1/AGW/detail/AGW/138/)

          Directly:

          • Jenkins home -> Blue ocean: OK
          • Inside Folder (with some jobs) -> Blue Ocean: OK (although it does display all jobs rather than just folder)
          • From Job (inside Folder) -> Blue Ocean: OK* (link:blue/organizations/jenkins/BLR1%2FAGW/ where BLR1 is folder and AGW is pipeline NOTICE the encoding difference
            * From Job Build -> Blue Ocean: OK
            (link: blue/organizations/jenkins/BLR1%2FAGW/detail/AGW/138/pipeline) *NOTICE the encoding difference

          As a general comment it's also fair to say that accessing direct seems a lot lot faster than through nginx. So my assumption is that nginx is not quite correct in it's configuration

          Peter Teichner added a comment - Sorry I should have been more specific: Through Proxy: Jenkins home -> Blue ocean: OK Inside Folder (with some jobs) -> Blue Ocean: OK (although it does display all jobs rather than just folder) From Job (inside Folder) -> Blue Ocean: NOK (link: blue/organizations/jenkins/BLR1/AGW/ where BLR1 is folder and AGW is pipeline From Job Build -> Blue Ocean: NOK (link: blue/organizations/jenkins/BLR1/AGW/detail/AGW/138/) Directly: Jenkins home -> Blue ocean: OK Inside Folder (with some jobs) -> Blue Ocean: OK (although it does display all jobs rather than just folder) From Job (inside Folder) -> Blue Ocean: OK * (link:blue/organizations/jenkins/BLR1%2FAGW/ where BLR1 is folder and AGW is pipeline NOTICE the encoding difference * From Job Build -> Blue Ocean: OK (link: blue/organizations/jenkins/BLR1%2FAGW/detail/AGW/138/pipeline) *NOTICE the encoding difference As a general comment it's also fair to say that accessing direct seems a lot lot faster than through nginx. So my assumption is that nginx is not quite correct in it's configuration

          So I've modified the nginx config and this seem to have fixed the issue

              if ($request_uri ~* "/blue(/.*)") {
                  proxy_pass http://192.168.1.201:8080/blue$1;
                  break;
              }

          Peter Teichner added a comment - So I've modified the nginx config and this seem to have fixed the issue     if ($request_uri ~* "/blue(/.*)") {         proxy_pass http://192.168.1.201:8080/blue$1 ;         break;     }

          This needs to go back to the guide

          Peter Teichner added a comment - This needs to go back to the guide

          Michael Neale added a comment -

          pteichner 

           

          how does https://wiki.jenkins.io/display/JENKINS/Blue+Ocean+Plugin look now regarding that guide? 

          Michael Neale added a comment - pteichner     how does https://wiki.jenkins.io/display/JENKINS/Blue+Ocean+Plugin  look now regarding that guide? 

          michaelneale I can't verify the apache section but I think nginx looks fine. I'm not sure if its maybe worth having a mention of this on the jenkins nginx guide page... I would probably be expecting it there too. Otherwise okay for me. 

          Peter Teichner added a comment - michaelneale I can't verify the apache section but I think nginx looks fine. I'm not sure if its maybe worth having a mention of this on the jenkins nginx guide page... I would probably be expecting it there too. Otherwise okay for me. 

          Michael Neale added a comment -

          pteichner added it to there as well. Thanks.

          Michael Neale added a comment - pteichner added it to there as well. Thanks.

            michaelneale Michael Neale
            pteichner Peter Teichner
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: