【问题标题】:Other ways of setting (and unsetting) http-proxy-host for subversion (MacOS)为 subversion (MacOS) 设置(和取消设置)http-proxy-host 的其他方法
【发布时间】:2014-02-01 18:04:26
【问题描述】:

很久以前,我们的公司网络环境需要一个代理来处理所有与 http 相关的流量。因此,我配置了我的 Subversion 发行版以允许它通过防火墙进行访问。

说明非常简单...我修改了 ~/.subversion/servers 并设置了 http-proxy-host=10.0.6.251。我还修改了我的 Eclipse 首选项->常规->网络连接以使用代理。到目前为止小菜一碟。多年来一直如此。

快进到 2014 年,网络专家已经没有代理了。因此,我重新配置了我的 Subversion 发行版以删除防火墙设置 - 只需删除 http-proxy-host 和 http-proxy-port 条目。我还从 Eclipse 中删除了代理的所有痕迹。

我已重新启动、重新启动所有内容等。但我的环境仍在尝试使用代理:

org.tigris.subversion.svnclientadapter.SVNClientException: org.apache.subversion.javahl.ClientException: svn: E175002: CONNECT request failed on 'http://10.0.6.251:3128'
svn: E175002: CONNECT of 'my-svn-server.corp:443': 504 Gateway Time-out (https://my-svn-server.corp)
    at org.tigris.subversion.svnclientadapter.javahl.AbstractJhlClientAdapter.update(AbstractJhlClientAdapter.java:1133)
    at org.tigris.subversion.subclipse.core.commands.UpdateResourcesCommand.run(UpdateResourcesCommand.java:81)
    at org.tigris.subversion.subclipse.ui.operations.UpdateOperation.execute(UpdateOperation.java:82)
    at org.tigris.subversion.subclipse.ui.operations.ReplaceOperation.execute(ReplaceOperation.java:97)
    at org.tigris.subversion.subclipse.ui.operations.RepositoryProviderOperation.execute(RepositoryProviderOperation.java:74)
    at org.tigris.subversion.subclipse.ui.operations.SVNOperation.run(SVNOperation.java:90)
    at org.eclipse.team.internal.ui.actions.JobRunnableContext.run(JobRunnableContext.java:144)
    at org.eclipse.team.internal.ui.actions.JobRunnableContext$ResourceJob.runInWorkspace(JobRunnableContext.java:72)
    at org.eclipse.core.internal.resources.InternalWorkspaceJob.run(InternalWorkspaceJob.java:38)
    at org.eclipse.core.internal.jobs.Worker.run(Worker.java:53)
Caused by: org.apache.subversion.javahl.ClientException: svn: E175002: CONNECT request failed on 'http://10.0.6.251:3128'

请注意,10.0.6.251:3128 是旧的(不需要的)代理服务器的 ip/端口。我删除的那个。 只有 SVN 对此有所抱怨,其他一切正常

我的问题:SVN 还可能从哪里读取此代理服务器信息?据我所知,所有对它的引用都已被删除。它没有在我的环境、subversion 服务器文件或 Eclipse 中设置(据我所知)。

还有其他人有什么想法可以让我看看吗?

编辑 1:

我怀疑代理设置可能是在 java 属性中设置的,所以我这样做了:

public class Prop {
    public static void main(String[] args) {
        Properties p = System.getProperties();
        Enumeration keys = p.keys();
        while (keys.hasMoreElements()) {
          String key = (String)keys.nextElement();
          String value = (String)p.get(key);
          System.out.println(key + ": " + value);
        }
    }
}

一点运气都没有。 Phantom 代理服务器在 Java 可见的任何系统属性中都不存在。还检查了 Mac OSX 系统属性中的 Java 控制面板,我的连接设置为“直接”。

编辑 2:情节变厚

所以我在 Eclipse 中环顾四周,我注意到这条消息:

而且我确信这就是它的原因。我只是不知道在我的外部环境(Mac OSX Mavericks)中设置了什么。如果我在 Eclipse 使用我的偏好重置值之后使用 SVN,则 SVN 可以工作。但是后来我的环境中的某些东西再次覆盖它并且它失败了,有时是在同步中。

【问题讨论】:

  • 您是否在 Eclipse 中使用 Subversion JavaHL 或 SVNKit?命令行客户端是否会发生相同的行为?
  • SVNKit 与 Eclipse。是的,我在命令行客户端也看到了这种行为——尽管只是有时。它快把我逼疯了。 'svn update' 一整天都可以正常工作,然后我会尝试它并在我不存在的代理服务器上获取'504 Gateway timeout'。我还使用两个全新的工作区尝试了两个不同版本的 Eclipse - 我仍然看到“系统属性 xxx 已被外部源设置为 yyy”,所以它绝对是 Eclipse 外部的东西。
  • SVNKit 在代理方面可能有完全不同的行为。但是 Subversion 本身不使用除了您已经检查以决定使用代理的那些配置文件之外的任何东西。一种可能性是您有一个透明代理,它在处理您的请求时遇到了问题。在您尝试使用命令行客户端并捕获故障时运行 Wireshark 可能会很有趣。如果 Wireshark 显示您直接连接到服务器,那么这不是本地问题。

标签: eclipse macos svn proxy


【解决方案1】:

我会说这是Where is the user's Subversion config file stored on the major operating systems? 的更具体的副本

只有您可以设置代理服务器的其他地方是/etc/subversion/servers

Subversion 不尊重任何其他代理设置(环境变量、操作系统设置等)。

【讨论】:

  • 运气不好,我什至没有 /etc/subversion 文件夹。我确实学到了一些新东西(参见上面的编辑)并在这里找到了类似的 SO 讨论(没有解决方案)stackoverflow.com/questions/619567/…
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 2016-08-02
  • 1970-01-01
  • 2014-11-09
  • 1970-01-01
  • 1970-01-01
  • 2018-06-12
  • 2011-01-03
相关资源
最近更新 更多