[Blue Ocean] API and UI URL mismatch behind reverse proxy

868 views
Skip to first unread message

Javier Martín Caro BEEVA

unread,
Jul 21, 2016, 4:31:43 AM7/21/16
to Jenkins Developers
Hi there!

We have set up jenkins blue ocean behind a nginx reverse proxy and configured successfully the prefix in the url to <URL>/jenkins. Despite of this, when we access to the blue ocean ui in <URL>/jenkins/blue and try to access some pipeline, a 422 (unprocessable entity error) is displayed in the browser debugging console and a white screen is shown.

The URL in the browser is like the following (note the encoded space):

https://<URL>/jenkins/blue/organizations/jenkins%20/<pipeline>/activity


When we call the blue ocean API for organizations the following information is shown (https://<URL>/jenkins/blue/rest/organizations/):

[{"_class":"io.jenkins.blueocean.service.embedded.rest.OrganizationImpl","_links":{"pipelines":{"_class":"io.jenkins.blueocean.rest.hal.Link","href":"/blue/rest/organizations/jenkins /pipelines/"},"self":{"_class":"io.jenkins.blueocean.rest.hal.Link","href":"/blue/rest/organizations/jenkins /"},"user":{"_class":"io.jenkins.blueocean.rest.hal.Link","href":"/blue/rest/organizations/jenkins /user/"},"users":{"_class":"io.jenkins.blueocean.rest.hal.Link","href":"/blue/rest/organizations/jenkins /users/"}},"name":"jenkins "}]

Note the white space in the organizations href after /jenkins /pipelines.

If we call to https://<URL>/jenkins/blue/rest/organizations/jenkins/pipelines/<pipeline>/runs/ the following message is shown:

{
  "message" : "Organization jenkins not found",
  "code" : 422,
  "errors" : [ ]
}

But if we force the organization to be jenkins%20 (https://<URL>/jenkins/blue/rest/organizations/jenkins%20/pipelines/<pipeline>/runs/) the information is displayed correctly.

Can someone help us to configure the proper name for the organization? We thought it was the jenkins url in the settings page but this is set to https://<URL>/jenkins/. 

Old UI is working properly for all pipelines, folder organizations and bitbucket team jobs.

Thank you and regards!

James Dumay

unread,
Jul 25, 2016, 1:39:20 AM7/25/16
to Jenkins Developers
Hi Javier,

Hmm, certainly sounds like something is up. How did you install Blue Ocean? If you built it from source could you try to install it from the experimental update center and try again? 

We are performing weekly binary releases on the path to the beta release and you may have a snapshot where some key things (such as path encoding) was not working correctly.

Sorry for not responding sooner as I've been traveling for work.

Michael Neale

unread,
Jul 25, 2016, 2:12:09 AM7/25/16
to Jenkins Developers
The "dogfood" instance runs begind nginx at the moment (aside: there have been some problems with timing around SSE, but this sounds like you haven't got that far). 

so the first /jenkins resolves to the "classic" UI? 

It looks like nginx is stripping off the space somehow... 

I'll see if we can dig up a config that works and compare. 

are you able to share you nginx proxy config? 


On Thursday, July 21, 2016 at 6:31:43 PM UTC+10, Javier Martín Caro BEEVA wrote:

Michael Neale

unread,
Jul 25, 2016, 2:15:14 AM7/25/16
to Jenkins Developers
also, if you access direct, the extra encoded space, does that appear? 


On Thursday, July 21, 2016 at 6:31:43 PM UTC+10, Javier Martín Caro BEEVA wrote:

Ivan Meredith

unread,
Jul 25, 2016, 2:45:18 AM7/25/16
to Jenkins Developers
Hi there,

It is because your Jenkins instance is in spanish!.

And a quick grep

ivan@MacBook-Pro ~/w/jenkins/core/src/main/resources/jenkins/model (master)$ grep -R -E 'Hudson.DisplayName=.* $' .
./Messages_es.properties:Hudson.DisplayName=Jenkins

I created PR https://github.com/jenkinsci/jenkins/pull/2471 to fix it in Jenkins, 

and also JENKINS-36907 to track it in Blue Ocean.

Switching your language should fix this.I imagine this will be changed in Blue Ocean quickly too.

Michael Neale

unread,
Jul 25, 2016, 5:16:49 AM7/25/16
to Jenkins Developers
haha - this is not the first time i18n has bitten URLs. 

Although in this case the extra space is incorrect (but Blue Ocean just happens to use that in the URL whereas classic does not). 

Daniel Beck

unread,
Jul 25, 2016, 5:32:59 AM7/25/16
to jenkin...@googlegroups.com

> On 25.07.2016, at 11:16, Michael Neale <mne...@cloudbees.com> wrote:
>
> Blue Ocean just happens to use that in the URL

That… seems weird to be honest.

Javier Martín Caro BEEVA

unread,
Jul 26, 2016, 3:32:59 AM7/26/16
to Jenkins Developers
Wow, I really appreciate it, I wouldn't found it in a million years! :)

Thank you all.

Michael Neale

unread,
Jul 26, 2016, 5:05:01 AM7/26/16
to Jenkins Developers
Javier - its this type of thing that Ivan excels at. 

"hey Ivan I am seeing this really odd thing...."


Ivan: "Oh hahaha I know exactly what that is". 


Everyone needs an Ivan. 

rferr...@gmail.com

unread,
Nov 29, 2016, 7:38:08 AM11/29/16
to Jenkins Developers
I'm using Jenkins 2.19.4 and still has this issue while on Spanish language.

When will this issue be fixed?


El lunes, 25 de julio de 2016, 8:45:18 (UTC+2), Ivan Meredith escribió:

Baptiste Mathus

unread,
Nov 29, 2016, 12:09:33 PM11/29/16
to Jenkins Developers
This issue was fixed in 2.16 cf. https://github.com/jenkinsci/jenkins/commit/3956994c286941dab2da810c649269d637dc98d9

So, if you're seeing something close or similar, please file an issue and use the users ML instead.


--
You received this message because you are subscribed to the Google Groups "Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-dev+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-dev/b7a849ac-b33c-4725-8c78-c7f205eb653c%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

James Dumay

unread,
Nov 30, 2016, 1:58:17 AM11/30/16
to Jenkins Developers, m...@batmat.net
I've re-opened JENKINS-36907 and submitted a pull request that should fix this regardless of any errors in the translation. If all goes well it should be in next weeks Blue Ocean beta.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-de...@googlegroups.com.

James Dumay

unread,
Nov 30, 2016, 6:54:32 PM11/30/16
to Jenkins Developers, m...@batmat.net
A fix should be available in Blue Ocean beta 13 next week.
Reply all
Reply to author
Forward
0 new messages