[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-21 Thread pa...@batanov.me (JIRA)














































Pavel Batanov
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















But unfortunately it does  I've restarted nginx and jenkins again to be sure.


println org.kohsuke.stapler.Stapler.currentRequest.serverName


gives me


build.example.com


I'll try to deploy old version soon, if we can't find other reason for it



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-21 Thread dan...@beckweb.net (JIRA)














































Daniel Beck
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















FWIW your comment with the script console output suggests it did work as the "before" state shows that Jenkins adds the port. It really shouldn't redirect to 8080 anymore afterwards though 



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-21 Thread pa...@batanov.me (JIRA)














































Pavel Batanov
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















yes, I refer Jenkins Url there, just mixed up with atlassian terms (it called display url there). I'll try to provide answers for you in a several hours



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-21 Thread dan...@beckweb.net (JIRA)














































Daniel Beck
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















Is it possible just to replace jenkins.war with old one (i.e 1.598) just to check it works?

Downgrading to before 1.600 may fail to load some plugins if Matrix Project Plugin is enabled. Not sure what happens though. I'd just rename JENKINS_HOME temporarily and provide a clean JENKINS_HOME for the 1.598 test instance.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-21 Thread dan...@beckweb.net (JIRA)














































Daniel Beck
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















UPD. Display url is set up on `https://build.example.com` as it should.

What does that mean? Are you referring to the Jenkins URL option in the global configuration?

You haven't answered this question.

If you mean something else, check what URL is configured there.



In the script console, please also run and provide output for: 
println org.kohsuke.stapler.Stapler.currentRequest.serverName




























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-20 Thread pa...@batanov.me (JIRA)












































  
Pavel Batanov
 edited a comment on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.
















Is it possible just to replace jenkins.war with old one (i.e 1.598) just to check it works? Will I have any compatability issues?



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-20 Thread pa...@batanov.me (JIRA)














































Pavel Batanov
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















Is it possible just to replace jenkins.war with old one (i.e 1.598) just to check it works? Will I have some compatability issues?



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-20 Thread pa...@batanov.me (JIRA)














































Pavel Batanov
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















Nope, this didn't help. nginx and jenkins were restarted after setting to be sure

After setting X-Forwarded-Port 443

https://build.example.com/
null
https
443
8080


Before setting X-Forwarded-Port 443

https://build.example.com:8080/
null
https
null
8080




























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-20 Thread pa...@batanov.me (JIRA)














































Pavel Batanov
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















Additionaly, I've tried to update everything at the jenkins host, so jenkins is 1.605 now. And still not works



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-20 Thread dan...@beckweb.net (JIRA)














































Daniel Beck
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















If that doesn't help, please provide the output of the following script in Manage Jenkins » Script Console:


println Jenkins.instance.rootUrlFromRequest
println org.kohsuke.stapler.Stapler.currentRequest.getHeader('X-Forwarded-Host')
println org.kohsuke.stapler.Stapler.currentRequest.getHeader('X-Forwarded-Proto')
println org.kohsuke.stapler.Stapler.currentRequest.getHeader('X-Forwarded-Port')
println org.kohsuke.stapler.Stapler.currentRequest.serverPort




























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-20 Thread dan...@beckweb.net (JIRA)














































Daniel Beck
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















Try proxy_set_header X-Forwarded-Port 443



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-20 Thread pa...@batanov.me (JIRA)














































Pavel Batanov
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















To be honour, port exposig just occures on any internal redirection. Form save, trailing slash redirection, etc. The redirected version contains internal port.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-20 Thread pa...@batanov.me (JIRA)














































Pavel Batanov
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















Also problem exists only for some routers. I.e

Going /log -> redirects me to :8080/log/ (with trailing slash)
Going /systeminfo -> succeedes (without trailing slash)
Going /pluginManager -> redirects me to :8080/pluginManager/

Harder example is /configure. It opens normally, but redirects me to :8080/ (main page with port) on configuration save



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-20 Thread pa...@batanov.me (JIRA)














































Pavel Batanov
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















The main idea, that nginx config was touched several months ago. And anything worked properly more than for a year.

I've updated nginx to the latest versiona available. I've checked that configuration is equal to the link you refer. (first one, second is not applicable as jenkins is not on the same host)

Here it is for you to be sure


server {

   listen  *:80;

server_name build.example.com build.other.tld;
rewrite ^/(.*) https://build.example.com/$1;
}

server {

   listen  *:443;

server_name build.example.com build.other.tld;

location / {
proxy_pass http://10.0.0.19:8080/;
proxy_set_header   X-Real-IP $remote_addr;
proxy_set_header   Host $host:$proxy_port;
proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header   X-Forwarded-Proto $scheme;
proxy_redirect http:// https://;
}
client_max_body_size 400m;

ssl on;
ssl_certificate /root/chain/chained/build.example.com.crt;
ssl_certificate_key /root/chain/keys/build.example.com.key;
}


And firstly I've asked about this bug on a Jenkins IRC chat, and `orrc` confirmed that he has the same behavior.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-20 Thread dan...@beckweb.net (JIRA)














































Daniel Beck
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















Honestly this looks like your nginx config is broken rather than a Jenkins issue.

Figure out what's going on there, maybe set up a test box with nginx configured like in the linked wiki articles. Remember: This is an issue tracker, not a support site.

Only if everything is set up correctly from scratch and the issue occurs again, attach some configuration to this issue.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-20 Thread pa...@batanov.me (JIRA)












































  
Pavel Batanov
 edited a comment on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.
















Everything was working fine about 1.599 or 1.598 or so and worked fine.

But recently I noticed the same behavior with atlassian stash behind same nginx (but only for http access, https works fine), so I'll check first if any platform updates (i.e. jre or nginx update) can cause this issue.

What is the best way to post configs and /systeminfo here to be checked?



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-20 Thread pa...@batanov.me (JIRA)














































Pavel Batanov
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















Everything was working fine about 1.599 or 1.598 or so and worked fine.

But recently I noticed the same behavior with stash behind same nginx (but only for http access, https works fine), so I'll check first if any platform updates (i.e. jre or nginx update) can cause this issue.

What is the best way to post configs and /systeminfo here to be checked?



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-17 Thread dan...@beckweb.net (JIRA)














































Daniel Beck
 commented on  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















Display url is set up on `https://build.example.com` as it should.

What does that mean? Are you referring to the Jenkins URL option in the global configuration?

Everything was running OK until some latest updates

Be more specific. Which version was the last to work correctly, which is the first to break?

How does your nginx configuration compare to:
https://wiki.jenkins-ci.org/display/JENKINS/Jenkins+behind+an+NGinX+reverse+proxy
https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+behind+Nginx

In fact, show your configuration.

This report currently contains barely any information to investigate further.



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-17 Thread pa...@batanov.me (JIRA)














































Pavel Batanov
 updated  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.
















Change By:


Pavel Batanov
(17/Mar/15 7:06 PM)




Description:


When navigating most of menu and interface links in jenkins there are some links, for example `https://build.example.com/log` (in the configure jenkins menu) redirects me not to the `https://build.example.com/log/` (trailing slash added), but on `https://build.example.com:8080/log/`. Removing the port gives me page needed without additional redirections.The same thing occures with many other routes (`/pluginManager`, `/configure`, etc). As my jenkins is hidden behind the reverse proxy, `8080` port is not exposed to public access, so these redirects lead to request failures, so now I have to manually remove `:8080` port after most of requests.
UPD. Display url is set up on `https://build.example.com` as it should.Everything was running OK until some latest updates



























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[JIRA] [core] (JENKINS-27468) Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.

2015-03-17 Thread pa...@batanov.me (JIRA)














































Pavel Batanov
 created  JENKINS-27468


Jenkins exposes internal port while redirecting to trailed slash URLs from no-slash URLs.















Issue Type:


Bug



Assignee:


Unassigned


Components:


core



Created:


17/Mar/15 7:05 PM



Description:


When navigating most of menu and interface links in jenkins there are some links, for example `https://build.example.com/log` (in the configure jenkins menu) redirects me not to the `https://build.example.com/log/` (trailing slash added), but on `https://build.example.com:8080/log/`. Removing the port gives me page needed without additional redirections.

The same thing occures with many other routes (`/pluginManager`, `/configure`, etc). As my jenkins is hidden behind the reverse proxy, `8080` port is not exposed to public access, so these redirects lead to request failures, so now I have to manually remove `:8080` port after most of requests.




Environment:


Jenkins 1.602, SSL Nginx as reverse proxy on other machine



-->build.example.com:443 nginx 10.0.0.100 <--> 10.0.0.19:8080 jenkins




Project:


Jenkins



Labels:


Routing




Priority:


Critical



Reporter:


Pavel Batanov

























This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators.
For more information on JIRA, see: http://www.atlassian.com/software/jira







-- 
You received this message because you are subscribed to the Google Groups "Jenkins Issues" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-issues+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.