Cannot migrate youtrack to exteranl hub
Answered
I have zip standalone installations of youtrack (YouTrack 2017.2 Build 34480) and hub (2017.2.6307) proxied via apache2 on debian server. Hub use selfsigned certificate. I try to migrate youtrack to external hub, but at the end I get next message:
I try to press "Open hub" button in chrome, firefox and edge - nothing happen. Open hub manualy and trust migration manager - nothing change. What wrong with my setup and how to fix it?
Please sign in to leave a comment.
Hello, please check the following:
1) Are there any errors in the browser console when you click 'Open Hub'? If yes, please attach a screenshot.
2) Does the issue reproduce if you use the Incognito/Private mode in your browser?
Thanks.
1) Errors from console
Blocked loading mixed active content “http://hub.xxx.com/hub/api/rest/users/me?fields=guest%2Cid%2Cname%2Cprofile%2Favatar%2Furl”[Learn More] main.js:27:16035
Unhandled promise rejection TypeError: e.response is undefined
Stack trace:
i.prototype._validateAgainstUser/<@https://trac.xxx.com/bundle/admin/main.js:27:19132
main.js:51:20315
K/</t< https://trac.xxx.com/bundle/admin/main.js:51:20315
G https://trac.xxx.com/bundle/admin/main.js:51:19712
K/< https://trac.xxx.com/bundle/admin/main.js:51:20192
e.exports https://trac.xxx.com/bundle/admin/main.js:44:31662
<anonymous> https://trac.xxx.com/bundle/admin/main.js:51:17038
$ https://trac.xxx.com/bundle/admin/main.js:51:16896
C https://trac.xxx.com/bundle/admin/main.js:51:16916
GET
XHR
https://trac.xxx.com/bundle/admin/api/hub/info [HTTP/1.1 200 OK 4ms]
Unhandled promise rejection TypeError: e.response is undefined
Stack trace:
i.prototype._validateAgainstUser/<@https://trac.xxx.com/bundle/admin/main.js:27:19132
main.js:51:20315
K/</t< https://trac.xxx.com/bundle/admin/main.js:51:20315
G https://trac.xxx.com/bundle/admin/main.js:51:19712
K/< https://trac.xxx.com/bundle/admin/main.js:51:20192
e.exports https://trac.xxx.com/bundle/admin/main.js:44:31662
<anonymous> https://trac.xxx.com/bundle/admin/main.js:51:17038
$ https://trac.xxx.com/bundle/admin/main.js:51:16896
C
2) yes, it reproduce.
Jabacrack, the thins is that your YouTrack uses an address with HTTPS while Hub uses HTTP. You need to set your Hub up so that it uses HTTPS as well.
Please give it a try and let me know the results. Thanks!
Sorry for the lack of informative error messages, we'll improve the situation.
I remove configuration for 80 port and use only 443 in apache. and in youtrack set hub adress with https://. But click on open hub button redirect me to http://hub.xxx.com/hub/api/rest/oauth2/auth?response_type=token&state=f7f0a797-ebd6-4ce6-b1e4-74d32aa42a15&redirect_uri=https%3A%2F%2Ftrac.phaestis.com%2Fbundle%2Fadmin%2FredirectUrl&request_credentials=default&client_id=af152986-6a1a-43e6-b2a4-a5f851a8c1b6&scope=0-0-0-0-0 and 503 error (in this moment i haven any configuration for http). I think this isbug, when I type hub url with https, but youtrack try to open http url.
My https configuration for hub
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName hub.xxx.com
SSLEngine On
SSLCertificateFile /mnt/crypt/apache-ssl-keys/hub.crt
SSLCertificateKeyFile /mnt/crypt/apache-ssl-keys/hub.key
ProxyRequests Off
ProxyPreserveHost On
RewriteEngine On
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
RequestHeader set X-Forwarded-Proto "https"
ProxyPass / http://server:8990/
ProxyPassReverse / http://server:8990/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
I find my mistake - I set base url without https in command line parameters. Thank you for your help.