1

当 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
4

1 回答 1

2

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

您需要编辑git-tf启动 JVM 的启动器脚本才能执行此操作。您可以在和中将-Djava.net.preferIPv4Stack=true参数添加到启动行。git-tfgit-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 "$@"

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

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 %*
于 2012-10-12T17:16:28.677 回答