Git-tf thowing权限被拒绝通过VPN

时间:2012-10-12 14:11:54

标签: tfs vpn git-tf

我正在尝试从家里访问VPN时访问我们的TFS服务器,但它只给了我以下消息:

Connecting to TFS...
git-tf: Permission denied: connect

我正在使用完全限定的URL,其他所有内容都可以在VPN上正常运行。我可以尝试任何身份验证配置设置吗?我无法在任何地方找到任何在线提及。

当然,当我在办公室时,它运作得很好。

编辑 - 来自日志的堆栈跟踪

2012-10-12 10:07:31,231 INFO  [main] (com.microsoft.tfs.core.config.httpclient.DefaultHTTPClientFactory) HttpClient configured for http://svrtfs2010.ms.innovativesol.com:8080/tfs/DefaultCollection, authenticating as innovative/jrusso
2012-10-12 10:07:31,535 INFO  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect
2012-10-12 10:07:31,535 INFO  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) Retrying request
2012-10-12 10:07:31,535 INFO  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect
2012-10-12 10:07:31,535 INFO  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) Retrying request
2012-10-12 10:07:31,535 INFO  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) I/O exception (java.net.SocketException) caught when processing request: Permission denied: connect
2012-10-12 10:07:31,535 INFO  [main] (com.microsoft.tfs.core.httpclient.HttpMethodDirector) Retrying request
2012-10-12 10:07:31,544 WARN  [main] (git-tf) Error executing command: pull --deep --rebase
com.microsoft.tfs.core.exceptions.TECoreException: Permission denied: connect
    at com.microsoft.tfs.core.exceptions.mappers.TECoreExceptionMapper.map(TECoreExceptionMapper.java:99)
    at com.microsoft.tfs.core.exceptions.mappers.LocationExceptionMapper.map(LocationExceptionMapper.java:32)
    at com.microsoft.tfs.core.clients.framework.location.internal.LocationWebServiceProxy.connect(LocationWebServiceProxy.java:76)
    at com.microsoft.tfs.core.clients.framework.location.LocationService.connect(LocationService.java:754)
    at com.microsoft.tfs.core.clients.framework.location.LocationService.ensureConnected(LocationService.java:884)
    at com.microsoft.tfs.core.clients.framework.location.LocationService.ensureAuthenticated(LocationService.java:923)
    at com.microsoft.tfs.core.TFSConnection.ensureAuthenticated(TFSConnection.java:739)
    at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:354)
    at com.microsoft.gittf.client.clc.commands.framework.Command.getConnection(Command.java:326)
    at com.microsoft.gittf.client.clc.commands.framework.Command.getVersionControlClient(Command.java:474)
    at com.microsoft.gittf.client.clc.commands.framework.Command.getVersionControlService(Command.java:492)
    at com.microsoft.gittf.client.clc.commands.PullCommand.run(PullCommand.java:140)
    at com.microsoft.gittf.client.clc.Main.main(Main.java:319)
Caused by: com.microsoft.tfs.core.ws.runtime.exceptions.TransportException: Permission denied: connect
    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:744)
    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequest(SOAPService.java:473)
    at ms.ws._LocationWebServiceSoap12Service.connect(_LocationWebServiceSoap12Service.java:384)
    at com.microsoft.tfs.core.clients.framework.location.internal.LocationWebServiceProxy.connect(LocationWebServiceProxy.java:70)
    ... 10 more
Caused by: java.net.SocketException: Permission denied: connect
    at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
    at java.net.DualStackPlainSocketImpl.socketConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.doConnect(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connectToAddress(Unknown Source)
    at java.net.AbstractPlainSocketImpl.connect(Unknown Source)
    at java.net.PlainSocketImpl.connect(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at com.microsoft.tfs.core.httpclient.protocol.DefaultProtocolSocketFactory.createSocket(DefaultProtocolSocketFactory.java:147)
    at com.microsoft.tfs.core.httpclient.HttpConnection.open(HttpConnection.java:862)
    at com.microsoft.tfs.core.httpclient.MultiThreadedHttpConnectionManager$HttpConnectionAdapter.open(MultiThreadedHttpConnectionManager.java:1690)
    at com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeWithRetry(HttpMethodDirector.java:495)
    at com.microsoft.tfs.core.httpclient.HttpMethodDirector.executeMethod(HttpMethodDirector.java:197)
    at com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:464)
    at com.microsoft.tfs.core.httpclient.HttpClient.executeMethod(HttpClient.java:376)
    at com.microsoft.tfs.core.ws.runtime.client.SOAPService.executeSOAPRequestInternal(SOAPService.java:588)
    ... 13 more

1 个答案:

答案 0 :(得分:2)

这与Java bug 703177有关。 Java 7带来了IPv6支持,据报道,思科的VPN客户端拒绝IPv6流量。您可以强制Java使用IPv4作为其java.net.preferIPv4Stack系统属性的传输。

您需要编辑启动JVM的git-tf启动程序脚本才能执行此操作。您可以在-Djava.net.preferIPv4Stack=truegit-tf中将git-tf.cmd参数添加到启动行。

git-tf的最后一行应该是:

exec java -Xmx512m -classpath "$GITTF_CLASSPATH" \
    "-Dcom.microsoft.tfs.jni.native.base-directory=$BASE_DIRECTORY/native" \
    -Djava.net.preferIPv4Stack=true \
    com.microsoft.gittf.client.clc.Main "$@"

git-tf.cmd的第47行应该是:

java -ea -Xmx512M -cp %GITTF_CLASSPATH% "-Dcom.microsoft.tfs.jni.native.base-directory=%BASE_DIRECTORY%native" -Djava.net.preferIPv4Stack=true com.microsoft.gittf.client.clc.Main %*