TC9: Access VSO behind corporate proxy

Hi,

I'm running TeamCity Professional Version 9.0.2 (build 32195) and I'm trying to access something.visualstudio.com. My server which runs TC is behind a corporate proxy.

When I try to connect to my VCS root, I get the following error:

ERROR - TF400324: Team Foundation services are not available from server https://something.visualstudio.com/DefaultCollection.
Technical information (for administrator):
  The remote name could not be resolved: 'something.visualstudio.com'


Is there any way to set the proxy TC uses for tfs?

I've searched several threads, but could only come up with teamcity.tfs.useSystemProxy=true in the internal.properties, which does not seem to help.

7 comments
Comment actions Permalink

Hi Koen,

Please try to add java options suggested in the blog post and set 'teamcity.tfs.useSystemProxy=true' internal property to make TFS work via proxy.
Please watch and vote for the related issue https://youtrack.jetbrains.com/issue/TW-33545.

0
Comment actions Permalink

Could you please explain further?

1) The blogpost mentions using the tomcat7w, which does not seem to work for me. A comment suggests it is removed TC7 or higher.

2) I've set the teamcity.tfs.useSystemProxy=true already, this does not seem to help.

2015-02-04_0901.png

3) One of the related threads, and a tweet I got, mentions Team Explorer. Do I need to manually install this on my TC build server?

0
Comment actions Permalink

TeamCity can use proxy server for outgoing connections. There are no special settings in UI, but TeamCity is a Java application, so these options can be specified using a common Java approach. So you need to set the following JVM options:

Dhttp.proxyHost=proxy.domain.com 
Dhttp.proxyPort=8080
Dhttp.nonProxyHosts=
domain.com
Dhttps.proxyHost=
proxy.domain.com
Dhttps.proxyPort=8080
Dhttps.nonProxyHosts=
domain.com

You can check that TeamCity has correctly uploaded JVM arguments on Administration > Diagnostics > Java Configuration page.

TFS integration is required to have Team Explorer installed and correctly functioning on the TeamCity server. For more details please read https://confluence.jetbrains.com/display/TCD9/Team+Foundation+Server.
0
Comment actions Permalink

I've tried the solutions you provided and it's still not working here:

I've set the Java options, they're shown in Diagnostics > Internal Properties > Java system properties:

http.nonProxyHosts=localhost|127.0.0.1
http.proxyHost=proxy.something.com
http.proxyPort=80
https.nonProxyHosts=localhost|127.0.0.1
https.proxyHost=proxy.something.com
https.proxyPort=80
proxyset=true

I have VS2012 installed, I can use Team Explorer in there to connect to my Team Project.

Still gives me the same error when I try to connect: "The remote name could not be resolved: 'something.visualstudio.com'."
0
Comment actions Permalink

Found it, thanks for your help!

I had to run the TeamCity Server windows service under a network account to get everything working.
Only thing that's still required then is the teamcity.tfs.useSystemProxy internal setting. The Java settings didn't affect anything.

0
Comment actions Permalink

I'm having a similar problem, though it's connecting to JIRA behind a proxy.

Teamcity is running on Centos7. (real proxy server renamed to proxy.mydomain.net)

Here is the Java Configuration as listed at /admin/admin.html?item=diagnostics&tab=dumps

Java version: 1.8.0_60

Java VM info: Java HotSpot(TM) 64-Bit Server VM

Java Home path: /usr/java/jdk1.8.0_60/jre

Server: Apache Tomcat/7.0.59

JVM arguments:

...

-Dproxyset=true

-Dhttp.proxyHost=proxy.mydomain.net

-Dhttp.proxyPort=3128

-Dhttp.nonProxyHosts=*.mydomain.net|localhost

-Dhttps.proxyHost=proxy.mydomain.net

-Dhttps.proxyPort=3128

-Dhttps.nonProxyHosts=*.mydomain.net|localhost

...

I've confirmed I'm able to connect to a Github VCS root (so internet access works).

The way I verified this is an issue with the proxy (and not Jira) was using ngrok.  https://ngrok.com/

Setting up an NGROK tunnel, it tells me when requests come in, and what the URL is of the request (even if that request ultimately goes nowhere)

I've confirmed that the request never gets in NGROK which means that it's not using the proxy settings. I can't seem to figure out what's going on.

0

Please sign in to leave a comment.