Wrong redirect to YouTrack after Hub-login - SOLVED



I'm in the process of migrating our installation of Jetbrains Hub/YouTrack/TeamCity from one machine to three different ones. Today they currently run on the same machine, but on different ports and an IIS with rewrite-rules to enable SSL-traffic. 


What we want to do is to have them run on one machine each, with different domainnames (youtrack.domain.com, hub.domain,com, teamcity.domain.com).

I took a backup from both the Hub and YouTrack and successfully installed them on their respective machine. YouTrack required the old installation of the Hub to be active for the installation before I could swith over to the new one. I have an IIS-instance in front of both applications to use SSL. 

Everything seems to be working just as planned, until I try to login to YouTrack.

I'm going to the url: https://youtrack.domain.com and it starts to load. It adds /oauth?state=%2F  to the url and thinks for about 20 seconds and then I get this url: https://hub.domain.com/oauth#access_token=... with this message:


Problem accessing /oauth. Reason:

    Not Found

If I replace the word hub in the uri with youtrack, I get access to YouTrack as if the login work perfectly. 

I have tried to google for similar issues with no luck.
I've checked the Service-settings in the hub where the field Home URL contains https://youtrack.domain.com
The list of Redirect URIs fills up with a bunch of different values, non that starts with hub. I do have ./oauth and /oauth but clearing the list and try again have not been successful. 

Is there anyone that has any tips on what to do next? What I can look for? 

Best regards,

Comment actions Permalink
Official comment

Hello Jens, thank you for reaching out!

Please do the following:

1) Write us the value of `hub-url` parameter in the file `<youtrack directory>/conf/internal/bundle.properties`

2) Record us a HAR-file on the unsuccessful authorisation (instructions are here, p.3:)

3) Try to reconfigure IIS according to https://www.jetbrains.com/help/youtrack/standalone/7.0/Reverse-Proxy-Configuration.html#IIS_Config

You can provide us additional data here or in a support request.

Thank you!

Comment actions Permalink

Hi, thanks for the quick response.


We've solved it after a lot of looking. The solution is described here: http://stackoverflow.com/questions/23508938/url-rewrite-keeps-original-host-location-when-reverse-proxy-301-redirects

Your guide for setting up the reverse proxy was terrific, just this one thing that messed it up. Maybe you can look at it and evalutate if you should include this in your guide. 

All in all, problem solved and everything seems to work according to plan.

Best regards,

Comment actions Permalink

Hello Jens, thank you for the update! As far as we can see, our guide actually contains the information that was useful for you:

> 11. Deselect the Reverse rewrite host in response headers checkbox and click Apply.

Please let us know if you have any further questions for us. Thank you!

Comment actions Permalink
Hi Jens
We wanna have the solution you had originally.

Unfotunately, I only get youtrack or hub to work. I started up both (youtrack on port 8081, hub on 8080). / and /hub are passed to port 8080 and /youtrack is passed to port 8081. I can only reach hub via /hub, not via /, youtrack not. Weirdly, when I map / to 8081, I can access youtrack via /youtrack, but nothing via / or /hub. Maybe you can help me?


Thanks in advance



Please sign in to leave a comment.