Hello,
Port redirection for Atlassian Data Center Bitbucket is not working as expected. At least, this is what I see:
$ curl -v <URL>:7990
...< HTTP/1.1 302
...
< Location: <URL>/dashboard
...
in lieu of "<URL>:7990/dashboard".
So the redirect header does not include the port number. Because we're using a load balancer to redirect traffic to the service nodeport, I expected the redirect to be to the same port, which is not the case.
This is a snippet from file "values.yaml" we used to deploy Bitbucket:
# Bitbucket configuration
#
bitbucket:
# K8s Service configuration
#
service:
# -- The port on which the Bitbucket K8s Service will listen
#
port: 7990
# -- The type of K8s service to use for Bitbucket
#
type: NodePort
Any help would be appreciated.
Community moderators have prevented the ability to post new answers.
From the manpage, the -L switch should do what you want. Hopefully that's what you're after.
curl -L <url>
Hello @Dave Theodore [Coyote Creek Consulting] ,
Thanks, but the problem is not getting curl to follow the redirect. The problem I am having is that the redirect eventually drops the port we have configured the load balancer to use (7990), after which we receive a HTTP status code 404, e.g. (here using 'curl -Lv' as suggested):
$ curl -Lv <URL>:7990/dashboard
* About to connect() to <URL> port 7990 (#0)
* Trying <IP>...
* Connected to <URL> (<IP>) port 7990 (#0)
> GET /dashboard HTTP/1.1
> User-Agent: curl/7.29.0
> Host: <URL>:7990
> Accept: */*
>
< HTTP/1.1 302
< X-AREQUESTID: @55C3QLx1044x132x0
< x-xss-protection: 1; mode=block
< x-frame-options: SAMEORIGIN
< x-content-type-options: nosniff
< Pragma: no-cache
< Expires: Thu, 01 Jan 1970 00:00:00 GMT
< Cache-Control: no-cache
< Cache-Control: no-store
< Location: <URL>/login?nextUrl=%2Fdashboard
< Content-Language: en-US
< Content-Length: 0
< Date: Tue, 19 Jul 2022 17:24:50 GMT
<
* Connection #0 to host <URL> left intact
* Issue another request to this URL: '<URL>/login?nextUrl=%2Fdashboard'
* Found bundle for host <URL>: 0x1f67ff0
* About to connect() to <URL> port 80 (#1)
* Trying <IP>...
* Connected to <URL> (<IP>) port 80 (#1)
> GET /login?nextUrl=%2Fdashboard HTTP/1.1
> User-Agent: curl/7.29.0
> Host: <URL>
> Accept: */*
>
< HTTP/1.1 404 Not Found
< Date: Tue, 19 Jul 2022 17:24:50 GMT
< Content-Type: text/html
< Content-Length: 146
< Connection: keep-alive
<
<html>
<head><title>404 Not Found</title></head>
<body>
<center><h1>404 Not Found</h1></center>
<hr><center>nginx</center>
</body>
</html>
* Connection #1 to host <URL> left intact
There doesn't appear to be a way to set this in the UI, but we configured Bitbucket to serve on port 7990 on deployment. Once I get past the initial login, the port number is retained when clicking on items on the dashboard (for example).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.