简体   繁体   English

Apache Archiva 2.1.1 升级:代理不起作用

[英]Apache Archiva 2.1.1 Upgrade: Proxy does not work

we try to upgrade from archvia 1.3.6 to 2.1.1 but suddenly the remote repositories (including proxy connectors) stopped working.我们尝试从 archvia 1.3.6升级到2.1.1但突然远程存储库(包括代理连接器)停止工作。 The remote repository view shows error marks in the column "Remote check" but no error message is shown.远程存储库视图在“远程检查”列中显示错误标记,但未显示任何错误消息。

远程检查示例

Is there a possibility to find out what is going on?有没有可能找出发生了什么?

We are using a proxy, we tried with proxy activated, deactivated.我们正在使用代理,我们尝试激活、停用代理。 I even installed archiva locally on my machine with a fresh database, but still no success.我什至使用全新的数据库在我的机器上本地安装了存档,但仍然没有成功。

(how does this remote check even work when the proxy is activated/deactivated in the proxy connectors?) (在代理连接器中激活/停用代理时,此远程检查如何工作?)

Eclipse (with newest m2e) says Missing artifact junit:junit:jar:3.8.9 . Eclipse(使用最新的 m2e)说Missing artifact junit:junit:jar:3.8.9 It goes so fast, that i don't think archiva is trying to reach the central-Repository.它进行得如此之快,以至于我认为档案馆并没有试图到达中央存储库。 The logs on archiva-side are empty.档案端的日志是空的。

Does anybody have some hints or the same problem?有没有人有一些提示或同样的问题? I think i will try it at home tonight, to see if it is a network issue.我想我今晚回家试试看是不是网络问题。

Thanks in advance for any tips!提前感谢您的任何提示!

Update更新

It really seems that the proxy connector does not work since the internal Repository is empty.由于内部存储库是空的,因此代理连接器似乎真的不起作用。 http://localhost:8080/archiva/repository/internal/ only shows .indexer http://localhost:8080/archiva/repository/internal/只显示.indexer

Update 2更新 2

The proxy configuration seems bugged in Archiva 2.1.1 . Archiva 2.1.1的代理配置似乎有问题。 I can see the same behaviour as here: Mailing List我可以看到与此处相同的行为: 邮件列表

A JIRA task for this would be nice.一个 JIRA 任务会很好。

Does anybody know a workaround to set the proxy for a proxy connector?有人知道为代理连接器设置代理的解决方法吗? Or is there a possibility to set a global proxy via a settings file?或者是否有可能通过设置文件设置全局代理?

Update 3更新 3

Rellay seems like a bug in archiva. Relay 似乎是档案中的一个错误。 I sent a mail to the mailing lists.我向邮件列表发送了一封邮件。 Hopefully this is getting fixed soon because this is a blocker for every user with a proxy.希望这个问题很快得到解决,因为这对每个使用代理的用户来说都是一个障碍。

I won't delete this question for documentation if someone has the same problem.如果有人有同样的问题,我不会删除这个问题的文档。 The issue can be found in JIRA here该问题可以在 JIRA 中找到

我也遇到了这个问题,简单的解决方案是将代理协议从“http”更改为“https”。

I also had the same problem.我也有同样的问题。 On first glance the solution given by Christian Quast seemed to work, but it didn't solve the problem.乍一看,Christian Quast 给出的解决方案似乎有效,但并没有解决问题。 I eventually used a work around by using JVM proxy settings:我最终通过使用 JVM 代理设置来解决:

  • -Dhttp.proxyHost=[your_proxy_address] -Dhttp.proxyHost=[your_proxy_address]
  • -Dhttp.proxyPort=[your_proxy_port] -Dhttp.proxyPort=[your_proxy_port]
  • -Dhttp.proxyUser=[your_proxy_user_name] -Dhttp.proxyUser=[your_proxy_user_name]
  • -Dhttp.proxyPassword=[your_proxy_user_password] -Dhttp.proxyPassword=[your_proxy_user_password]
  • -Dhttp.nonProxyHosts=localhost|127.0.0.1|::0|[any_other_hosts_not_to_use_proxy] -Dhttp.nonProxyHosts=localhost|127.0.0.1|::0|[any_other_hosts_not_to_use_proxy]

Update更新

I know it may sound weird but, using the settings above, the error/warning icon on "Remote Check" may still appear.我知道这听起来可能很奇怪,但是,使用上面的设置,“远程检查”上的错误/警告图标可能仍会出现。 If you add the "network proxy" (mine is using https protocol) to your remote repository (the error/warning icon is still there) but editing the remote repository again and removing it's "network proxy" will show the OK/sun icon.如果您将“网络代理”(我的使用 https 协议)添加到远程存储库(错误/警告图标仍然存在),但再次编辑远程存储库并删除它的“网络代理”将显示 OK/sun 图标。

In my case <networkProxy> under conf\\settings.xml gets updated correctly including the port information (probably because my port is not a default 8080) but remote repository connection is still failing.在我的情况下, conf\\settings.xml下的<networkProxy>得到正确更新,包括端口信息(可能是因为我的端口不是默认的 8080),但远程存储库连接仍然失败。 Also, changing proxy protocol to https did not help.此外,将代理协议更改为 https 也无济于事。 I know the proxy is right because I use the same for maven .m2\\settings.xml我知道代理是正确的,因为我对 maven .m2\\settings.xml使用了相同的代理

Fortunately I am only evaluating open source repo management tools.幸运的是,我只是在评估开源仓库管理工具。 Started with Archiva as it is by Apache and we use Maven in our project.从 Apache 开始使用 Archiva,我们在我们的项目中使用 Maven。 Would have moved ahead if this critical issue had a fix or work around.如果这个关键问题得到修复或解决,就会继续前进。 Guess I will have to take a shot at Nexus.猜猜我将不得不在 Nexus 上试一试。

Exactly same problem here.这里的问题完全相同。 I can't vote on your BUG report because I have no jira account.我无法对您的 BUG 报告进行投票,因为我没有 jira 帐户。

As far as I figured out there seems to be a problem with the configuration file ~/.m2/archiva.xml .据我所知,配置文件~/.m2/archiva.xml似乎有问题。 The Proxy is set without port information.代理设置没有端口信息。

Hopefully this bug will be fixed as soon as possible.希望这个bug能尽快修复。

Extending João Ferreira's reply, to access repositories with https URLs (such as Maven Central), you will also need:扩展 João Ferreira 的回复,要访问带有 https URL 的存储库(例如 Maven Central),您还需要:

-Dhttps.proxyHost=[your_proxy_host]
-Dhttps.proxyPort=[your_proxy_port]

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM