简体   繁体   English

Nexus OSS无法通过Lucene REST API SHA1搜索找到某些工件

[英]Nexus OSS can't find some artifacts with lucene REST API SHA1 search

I am trying to use the restful lucene search feature on nexus oss 2.8.0-05 to find jars in our local repository. 我正在尝试使用nexus oss 2.8.0-05上的静态Lucene搜索功能在我们的本地存储库中查找jar。 It works fine for everything hosted within our repository but seems to have problems searching for artifacts by SHA1 when they are hosted on the central repo and proxied. 它对于我们存储库中托管的所有内容都可以正常工作,但是当它们被托管在中央仓库中并被代理时,似乎无法通过SHA1搜索工件。 I have access to another Nexus server and it works fine one that one so I don't know what is wrong. 我可以访问另一台Nexus服务器,并且可以正常运行,因此我不知道出了什么问题。

On our server the following URL returns totalCount=0: 在我们的服务器上,以下URL返回totalCount = 0:

http://myserver/nexus/service/local/lucene/search?sha1=51d28a27d919ce8690a40f4f335b9d591ceb16e9

But searching for the same artifact but not using sha1 returns results: 但是搜索相同的工件但不使用sha1会返回结果:

http://myserver/nexus/service/local/lucene/search?g=org.sonatype.plexus&a=plexus-cipher&v=1.4

Download Remote Indexes is set to True but I think there is something wrong with the index. “下载远程索引”设置为True,但是我认为索引有问题。

Things I have tried: 我尝试过的事情:

  1. Switching Download Remote Index to false then back to true. 将“下载远程索引”切换为“假”,然后再切换为“真”。 I noticed that before I performed this there was no .index file in the central folder but now there is. 我注意到在执行此操作之前,中央文件夹中没有.index文件,但现在有。
  2. Updating the index 更新索引
  3. Repairing the index 修复索引
  4. Restarting nexus 重新启动连结
  5. Checking the connection to the internet and testing with a http proxy (cntlm) to confirm it is not an issue with our ISA proxy. 检查与Internet的连接并使用http代理(cntlm)进行测试,以确认这不是我们的ISA代理的问题。
  6. Upgrading from 2.7 to 2.8 and repeating all of the above. 从2.7升级到2.8,然后重复上述所有操作。
  7. Running the scheduled tasks Download Indexes and Rebuild Maven Metadata Files. 运行计划的任务下载索引并重建Maven元数据文件。 Both ran in a fraction of a second suggesting they did nothing. 两者都只花了不到一秒钟的时间,暗示他们什么也没做。

When I repair or update the index it shows the following log message: 当我修复或更新索引时,它显示以下日志消息:

2014-05-08 05:07:31 INFO [pxpool-1-thread-7] admin org.sonatype.nexus.index.NexusScanningListener - Scanning of repositoryID="central" finished: scanned=1121, added=0, updated=0, removed=0, scanningDuration=0:00:42.979 2014-05-08 05:07:31信息[pxpool-1-thread-7] admin org.sonatype.nexus.index.NexusScanningListener-扫描存储库ID =“中央”已完成:已扫描= 1121,已添加= 0,已更新= 0,已移除= 0,scanningDuration = 0:00:42.979

1121 records scanned seems too few for the whole of maven central so I assume it's not updating everything. 对于整个Maven Central,扫描的1121条记录似乎太少了,因此我认为它并没有更新所有内容。

Also if I look at System Feeds -> Recent file storage changes in all Nexus repositories then only files in hosted repositories are listed. 另外,如果我查看所有Nexus信息库中的系统Feed->最近文件存储更改,则仅列出托管信息库中的文件。

I have found someone with a similar problem to me but no solution: http://maven.40175.n5.nabble.com/Checksum-search-fails-although-artifact-is-still-there-td5773587.html 我发现有人遇到与我类似的问题,但没有解决办法: http : //maven.40175.n5.nabble.com/Checksum-search-fails-although-artifact-is-still-there-td5773587.html

It sounds like a communication issue. 听起来像是沟通问题。 The index files on central are gzipped binaries, it isn't uncommon for firewalls to block these. 中央的索引文件是压缩的二进制文件,防火墙阻止这些文件并不少见。

Have you tried looking in the nexus.log file after running "repair index" against the central proxy? 针对中央代理服务器运行“修复索引”后,您是否尝试过在nexus.log文件中查找? There should be messages about this failure. 应该有关于此失败的消息。

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

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