我刚刚将我们的Artifactory的OSS实例从5.4.5迁移到5.8.3(独立,使用Derby)
我按照https://www.jfrog.com/confluence/display/RTF/Upgrading+Artifactory中的建议进行操作,基本上做了:
两者都运行良好,服务器恢复运行平稳.
但是,我现在logs/artifactory.log在实例启动时发出警告
2018-01-24 16:12:07,633 [art-exec-4] [WARN](oasjmpRepoPathChecksumMigrationJobDelegate:110) - 路径校验和计算作业(对于现有工件)已被禁用且无法运行,仍有5348个无路径的工件数据库中的校验和值.未来版本的Artifactory可以强制执行此转换作为升级的先决条件.
我发现这个警告没有更实质性的解释.
我认为这与文件系统上的工件布局有关(参见https://www.jfrog.com/confluence/display/RTF/Checksum-Based+Storage#Checksum-BasedStorage-Overview).工件仍按照SHA-1checksums而不是SHA-256校验和进行布局.
我的假设是否正确?我如何"修复"此警告......
编辑:@Ariel要求的更多测试:
echo "artifactory.sha2.migration.job.enabled=true" >> etc/artifactory.system.properties
查看与此迁移相关的日志,似乎迁移作业认为已迁移所有内容,并且启动检查发现应迁移的2,000个工件.
$ ARTIFACTORY_HOME /日志/ sha256_migration.log
2018-01-24 14:39:53,982 [art-exec-3] [INFO ] (o.a.s.j.m.s.Sha256MigrationJob:284) - artifactory.Sha256MigrationJob#83253c93-33ec-4c52-bc61-d2d33942dc28: all nodes reached minimal version '5.5.0-m001', continuing execution
2018-01-24 16:12:07,576 [art-exec-3] [INFO ] (o.a.s.j.m.s.Sha256MigrationJob:284) - artifactory.Sha256MigrationJob#6f5c6739-c365-4be2-80a4-d32063a75f8f: all nodes reached minimal version '5.5.0-m001', continuing execution
2018-01-24 16:12:07,651 [art-exec-3] [INFO ] (o.a.s.j.m.s.Sha256MigrationJob:186) - 3319 artifacts and 3292 binary entries are …Run Code Online (Sandbox Code Playgroud) 在测试柯南时,我不得不"install安装"它.
当我在完全脱机的环境中工作时,我的期望是我可以简单地
安装柯南
PIP3安装--index HTTP:// MYSERVER/artifactory的/ API/PyPI中/ myrepo的Python /简单柯南
这适用于某些包,然后对patch == 1.16的依赖失败
[...]
Collecting patch==1.16 (from conan)
Could not find a version that satisfies the requirement patch==1.16 (from conan) (from versions: )
No matching distribution found for patch==1.16 (from conan)
Run Code Online (Sandbox Code Playgroud)
查看Artifactory日志,这表明即使我手动将patch-1.16.zip(从https://pypi.org/project/patch/1.16/#files)部署到存储库中,它也不会出现在索引中. ..
有谁知道为什么patch-1.16.zip没有被Artifactory索引?
这是关于Artifactory 5.8.4.
目前,我唯一的解决方法是将所有依赖项收集到本地路径中并指向它的pip3
scp conan-1.4.4.tar.gz installserver:/tmp/pip_cache
[...]
scp patch-1.16.zip installserver:/tmp/pip_cache
[...]
scp pyparsing-2.2.0-py2.py3-none-any.whl installserver:/tmp/pip_cache
ssh installserver
installserver$ pip3 install --no-index --find-links="/tmp/pip_cache" conan
Run Code Online (Sandbox Code Playgroud) 我正在尝试阅读XML文件中的注释.使用DOM解析后无法获取注释节点.
码:
DocumentBuilderFactory docBldrFactry = DocumentBuilderFactory.newInstance();
docBldrFactry.setIgnoringComments(false);
DocumentBuilder docBuilder = docBldrFactry.newDocumentBuilder();
Document document = docBuilder.parse(new File("C:\\webser.xml"));
Element rootElement = document.getDocumentElement();
NodeList list = rootElement.getElementsByTagName("Bean");
Run Code Online (Sandbox Code Playgroud)
评论在Bean元素下.当我循环遍历Bean元素的子节点时,我没有得到注释节点.
这是XML
<Beans>
<Bean>
<!-- Testing Comments -->
<API name ="xyz" />
</Bean>
</Beans>
Run Code Online (Sandbox Code Playgroud) 我正在使用 Artifactory 版本 5.2,将 maven2 存储库配置为http://repo1.maven.org 的智能存储库 因此,maven 或 gradle 启动的任何构建都将请求 Artifactory 服务器上的依赖项,并且如果工件有如果尚未缓存,智能仓库将首先从http://repo1.maven.org下载该文件,然后将内容提供给 maven / gradle 脚本。这按预期工作,我不能在这里抱怨。
但是,我还需要直接使用 jfrogcli 下载依赖项,命令如下
jfrog rt dl maven2/com/google/guava/guava-parent/10.0.1/guava-parent-10.0.1.pom
Run Code Online (Sandbox Code Playgroud)
据我所知,这在智能存储库上不起作用。
[Info] Searching items to download...
[Info] Downloaded 0 artifacts.
Run Code Online (Sandbox Code Playgroud)
我发现的唯一解决方法是首先使用直接下载从 maven2 存储库请求工件,然后使用 jfrog cli 从 maven2-cache 存储库下载它
curl -H ... -X GET <server>/artifactory/maven2/com/google/guava/guava-parent/10.0.1/guava-parent-10.0.1.pom
jfrog rt dl maven2-cache/com/google/guava/guava-parent/10.0.1/guava-parent-10.0.1.pom
Run Code Online (Sandbox Code Playgroud)
我相当确定我错过了一些简单的事情。智能存储库和 jfrog cli,但我找不到简单的答案。欢迎任何反馈。