Upsource behind a proxy server

We've changed our GIT Server from a local repository to *.visualstudio.com and we're using Upsource 2017.2.2398.
We need to configure a proxy passthrough server to get to *visualstudio.com, since our network policy doesn't allow direct connections to outside domains. I've already tried different options to get the proxy configuration working, even those mentioned in the similar proxy server posts which do not have a resolution.

Here's what i've tried so far:

- http_proxy and https_proxy environment variables
- launcher.setenv.bat: set LAUNCHER_ENV_OPTS=-Djava.awt.headless=true -Dproxyset=true -Dhttps.proxyHost=proxyServer.com -Dhttps.proxyPort=8080 -Dhttp.proxyHost=proxyServer.com -Dhttp.proxyPort=8080
- git config --global http.proxy http://proxyuser:proxypwd@proxy.server.com:8080
-
git config --global https.proxy https://proxyuser:proxypwd@proxy.server.com:8080

The connection outside of Upsource works using git command line. I've seen in the microsoft network monitor the upsource java process ignores all proxy server settings and tries directly to connect to the *.visualstudio.com (or to be exact, *.cloudapp.net) server, which doesn't work in our environment.

Does Upsource with this version even support proxy passthrough?

 

3 comments

Hello Daniel,

Try adding your proxy settings in the following manner:

Inside {UPSOURCE_HOME}/conf/upsource-frontend/upsource-frontend.jvmoptions

-Dhttp.proxyHost=mycompany.com
-Dhttp.proxyPort=3128
-Dhttps.proxyHost=mycompany.com
-Dhttps.proxyPort=3128
0

Hi Artem

I just tried your suggestions, but the frontend won't come up with these settings:

[2017-11-20 08:08:50,182] [Upsource Frontend Error] javax.ws.rs.ForbiddenException: HTTP 403 Forbidden
[2017-11-20 08:08:50,182] [Upsource Frontend Error]     at org.glassfish.jersey.client.JerseyInvocation.convertToException(JerseyInvocation.java:1005)
[2017-11-20 08:08:50,182] [Upsource Frontend Error]     at org.glassfish.jersey.client.JerseyInvocation.translate(JerseyInvocation.java:816)
[2017-11-20 08:08:50,182] [Upsource Frontend Error]     at org.glassfish.jersey.client.JerseyInvocation.access$700(JerseyInvocation.java:92)
[2017-11-20 08:08:50,182] [Upsource Frontend Error]     at org.glassfish.jersey.client.JerseyInvocation$2.call(JerseyInvocation.java:700)
[2017-11-20 08:08:50,182] [Upsource Frontend Error]     at org.glassfish.jersey.internal.Errors.process(Errors.java:315)
[2017-11-20 08:08:50,182] [Upsource Frontend Error]     at org.glassfish.jersey.internal.Errors.process(Errors.java:297)
[2017-11-20 08:08:50,182] [Upsource Frontend Error]     at org.glassfish.jersey.internal.Errors.process(Errors.java:228)
[2017-11-20 08:08:50,182] [Upsource Frontend Error]     at org.glassfish.jersey.process.internal.RequestScope.runInScope(RequestScope.java:444)
[2017-11-20 08:08:50,182] [Upsource Frontend Error]     at org.glassfish.jersey.client.JerseyInvocation.invoke(JerseyInvocation.java:696)
[2017-11-20 08:08:50,182] [Upsource Frontend Error]     at org.glassfish.jersey.client.JerseyInvocation$Builder.method(JerseyInvocation.java:420)
[2017-11-20 08:08:50,182] [Upsource Frontend Error]     at org.glassfish.jersey.client.JerseyInvocation$Builder.get(JerseyInvocation.java:316)
[2017-11-20 08:08:50,182] [Upsource Frontend Error]     at jetbrains.jetpass.client.oauth2.OAuth2Client.getHubScope(OAuth2Client.kt:44)
[2017-11-20 08:08:50,183] [Upsource Frontend Error]     at jetbrains.jetpass.client.hub.HubClient.getAccountsClient(HubClient.kt:68)
[2017-11-20 08:08:50,183] [Upsource Frontend Error]     at com.jetbrains.upsource.server.auth.impl.HubProviderImpl.createAccountsClient(HubProviderImpl.kt:205)
[2017-11-20 08:08:50,183] [Upsource Frontend Error]     at com.jetbrains.upsource.server.auth.impl.HubProviderImpl.<init>(HubProviderImpl.kt:88)
[2017-11-20 08:08:50,183] [Upsource Frontend Error]     at com.jetbrains.upsource.server.auth.impl.AuthManagerImpl.<init>(AuthManagerImpl.java:128)
[2017-11-20 08:08:50,183] [Upsource Frontend Error]     at com.jetbrains.upsource.hub.HubInitializerImpl.createAuthManager(HubInitializerImpl.java:62)
[2017-11-20 08:08:50,185] [Upsource Frontend Error]     at com.jetbrains.upsource.server.hub.HubInitializerFactory.compute(HubInitializerFactory.java:89)
[2017-11-20 08:08:50,185] [Upsource Frontend Error]     at com.jetbrains.upsource.backend.server.facade.UpsourceApplicationEnvironment.buildMainContainer(UpsourceApplicationEnvironment.java:237)
[2017-11-20 08:08:50,185] [Upsource Frontend Error]     at com.jetbrains.upsource.backend.server.facade.UpsourceApplicationEnvironment.<init>(UpsourceApplicationEnvironment.java:97)
[2017-11-20 08:08:50,186] [Upsource Frontend Error]     at com.jetbrains.upsource.backend.cli.UpsourceApplicationEnvironmentDaemonBase.startDaemon(UpsourceApplicationEnvironmentDaemonBase.java:23)
[2017-11-20 08:08:50,186] [Upsource Frontend Error]     at com.jetbrains.upsource.daemon.UpsourceDaemonBase.start(UpsourceDaemonBase.java:128)
[2017-11-20 08:08:50,186] [Upsource Frontend Error]     at com.jetbrains.upsource.daemon.UpsourceDaemonBase.start(UpsourceDaemonBase.java:222)
[2017-11-20 08:08:50,186] [Upsource Frontend Error]     at com.jetbrains.upsource.backend.server.daemon.JointServicesDaemon.start(JointServicesDaemon.java:59)
[2017-11-20 08:08:50,186] [Upsource Frontend Error]     at com.jetbrains.launcher.AppProxy$6$1.call(AppProxy.java:99)
[2017-11-20 08:08:50,186] [Upsource Frontend Error]     at com.jetbrains.launcher.AppProxy$6$1.call(AppProxy.java:97)
[2017-11-20 08:08:50,186] [Upsource Frontend Error]     at java.util.concurrent.FutureTask.run(FutureTask.java:266)
[2017-11-20 08:08:50,186] [Upsource Frontend Error]     at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
[2017-11-20 08:08:50,186] [Upsource Frontend Error]     at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
[2017-11-20 08:08:50,186] [Upsource Frontend Error]     at java.lang.Thread.run(Thread.java:748)
[2017-11-20 08:08:50,216] [Upsource Frontend Error] [2017-11-20 08:08:50,213] ERROR APP-WRAPPER] Proxy 1                 ver.daemon.JointServicesDaemon - Unable to start daemon

 

0

Ok i figured it out myself, Upsource was not able to connect using the specified proxy to our Hub server (this does not work, as the proxy server is only able to communicate with external domains, otherwise we wouldn't be needing a proxy). So i removed the Hub configuration from Upsource, restarted and it worked.

It's strange that TeamCity can communicate with Hub even when a proxy server is specified, where Upsource cant.

0

Please sign in to leave a comment.