我目前正在Windows Server 2008 R2上运行Artifactory Professional 4.0.2 rev 40009的实例。
我已将https://mirror.aarnet.edu.au配置为Artifactory中的远程Yum存储库。
我在linux服务器上配置了yum以指向这个神器实例。
当我运行命令时:
yum install -y epel-release
我得到404错误:
epel/7/x86_64/updateinfo FAILED
http://<Artifactory Server Instance>/artifactory/mirror.aarnet.edu.au/pub/epel/7/x86_64/repodata/0dd9044655fe1722d6579c768395f719a74f9954cf78e80d0b757a313be4f7e2-updateinfo.xml.bz2: [Errno 14] HTTP Error 404 - Not Found| 0 B --:--:-- ETA Trying other mirror.
如果我直接浏览网址,我会收到类似的404错误:
{
"errors" : [ {
"status" : 404,
"message" : "Not Found"
} ]
}
Artifactory中的远程百胜回购配置:
<remoteRepository>
<key>mirror.aarnet.edu.au</key>
<type>yum</type>
<description>Mirror of Yum packages hosted by mirror.aarnet.edu.au</description>
<includesPattern>pub/centos/**,epel/**,pub/epel/**,pub/elrepo/**,pub/el6-dom0/**,pub/fedora/**,pub/fedora-secondary/**,</includesPattern>
<repoLayoutRef>simple-default</repoLayoutRef>
<dockerApiVersion>V1</dockerApiVersion>
<forceDockerAuthentication>false</forceDockerAuthentication>
<blackedOut>false</blackedOut>
<handleReleases>true</handleReleases>
<handleSnapshots>true</handleSnapshots>
<maxUniqueSnapshots>0</maxUniqueSnapshots>
<suppressPomConsistencyChecks>true</suppressPomConsistencyChecks>
<propertySets>
<propertySetRef>artifactory</propertySetRef>
</propertySets>
<archiveBrowsingEnabled>false</archiveBrowsingEnabled>
<url>https://mirror.aarnet.edu.au</url>
<offline>false</offline>
<hardFail>false</hardFail>
<storeArtifactsLocally>true</storeArtifactsLocally>
<fetchJarsEagerly>false</fetchJarsEagerly>
<fetchSourcesEagerly>false</fetchSourcesEagerly>
<retrievalCachePeriodSecs>0</retrievalCachePeriodSecs>
<assumedOfflinePeriodSecs>300</assumedOfflinePeriodSecs>
<missedRetrievalCachePeriodSecs>7200</missedRetrievalCachePeriodSecs>
<remoteRepoChecksumPolicyType>generate-if-absent</remoteRepoChecksumPolicyType>
<unusedArtifactsCleanupPeriodHours>24</unusedArtifactsCleanupPeriodHours>
<shareConfiguration>false</shareConfiguration>
<synchronizeProperties>false</synchronizeProperties>
<listRemoteFolderItems>true</listRemoteFolderItems>
<rejectInvalidJars>false</rejectInvalidJars>
<allowAnyHostAuth>false</allowAnyHostAuth>
<socketTimeoutMillis>15000</socketTimeoutMillis>
<enableCookieManagement>false</enableCookieManagement>
<enableTokenAuthentication>false</enableTokenAuthentication>
<proxyRef>Developer-Proxy</proxyRef>
</remoteRepository>
百胜回购配置:
[epel]
name=Extra Packages for Enterprise Linux 7 - $basearch
baseurl=http://<artifactory server instance>/artifactory/mirror.aarnet.edu.au/pub/epel/$releasever/$basearch/
failovermethod=priority
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
[epel-debuginfo]
name=Extra Packages for Enterprise Linux 7 - $basearch - Debug
baseurl=http://<artifactory server instance>/artifactory/mirror.aarnet.edu.au/pub/epel/$releasever/$basearch/debug
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
[epel-source]
name=Extra Packages for Enterprise Linux 7 - $basearch - Source
baseurl=http://<artifactory server instance>/artifactory/mirror.aarnet.edu.au/pub/epel/$releasever/SRPMS
failovermethod=priority
enabled=0
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-EPEL-7
gpgcheck=1
切换缓存并删除Artifactory中远程存储库的内容可以解决问题,但它会不断重复,我们正在寻找永久修复。
如何解决此问题?
输出失败的二进制网址?跟踪:
Request ID: 11bb6581
Repo Path ID: mirror.aarnet.edu.au:pub/centos/7/updates/x86_64/repodata/1d3ddc7dc7e6b67102e2dec1e43813582e2de2d1c813007350586aee0e32eb2e-primary.sqlite.bz2:
Method Name: GET
User: <UserName>
Time: 2016-02-02T13:56:45.565+11:00
Thread: http-nio-8082-exec-28
Steps:
2016-02-02T13:56:45.565+11:00 Received request
2016-02-02T13:56:45.565+11:00 Request source = 10.62.58.23, Last modified = 01-01-70 09:59:59 +10:00, If modified since = -1, Thread name = http-nio-8082-exec-28
2016-02-02T13:56:45.565+11:00 Executing any BeforeDownloadRequest user plugins that may exist
2016-02-02T13:56:45.565+11:00 Exiting download process - intercepted by addon manager
答案 0 :(得分:0)
升级到v5.1.4后重新出现此问题。缓存保留期减少到10秒,希望它会增加索引文件正确更新的可能性,但它没有任何效果,我们必须删除repodata文件夹的内容并将缓存作为解决方法。
我可以看到http://mirror.centos.org/centos/6/os/x86_64/repodata/repomd.xml上的repomd.xml的哈希值(最后修改时间:2017年3月29日18:05)与Artifactory中相同文件的哈希值不匹配(最后修改时间:29- 2017年3月05:05)。文件大小也没有对齐。
由于过时的索引文件 -
导致某些yum安装失败yum update -y && yum clean all
---> Running in e154e2b58ab1
Loaded plugins: fastestmirror, ovl
Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package binutils.x86_64 0:2.20.51.0.2-5.44.el6 will be updated
---> Package binutils.x86_64 0:2.20.51.0.2-5.47.el6_9.1 will be an update
---> Package curl.x86_64 0:7.19.7-52.el6 will be updated
---> Package curl.x86_64 0:7.19.7-53.el6_9 will be an update
---> Package glibc.x86_64 0:2.12-1.192.el6 will be updated
---> Package glibc.x86_64 0:2.12-1.209.el6_9.1 will be an update
---> Package glibc-common.x86_64 0:2.12-1.192.el6 will be updated
---> Package glibc-common.x86_64 0:2.12-1.209.el6_9.1 will be an update
---> Package libcurl.x86_64 0:7.19.7-52.el6 will be updated
---> Package libcurl.x86_64 0:7.19.7-53.el6_9 will be an update
---> Package nss.x86_64 0:3.21.0-8.el6 will be updated
---> Package nss.x86_64 0:3.28.3-3.el6_9 will be an update
--> Processing Dependency: nspr >= 4.13.0 for package: nss-3.28.3-3.el6_9.x86_64
---> Package nss-sysinit.x86_64 0:3.21.0-8.el6 will be updated
---> Package nss-sysinit.x86_64 0:3.28.3-3.el6_9 will be an update
---> Package nss-tools.x86_64 0:3.21.0-8.el6 will be updated
---> Package nss-tools.x86_64 0:3.28.3-3.el6_9 will be an update
---> Package nss-util.x86_64 0:3.21.0-2.el6 will be updated
---> Package nss-util.x86_64 0:3.28.3-1.el6_9 will be an update
--> Processing Dependency: nspr >= 4.13.0-1 for package: nss-util-3.28.3-1.el6_9.x86_64
---> Package tzdata.noarch 0:2016f-1.el6 will be updated
---> Package tzdata.noarch 0:2017b-1.el6 will be an update
--> Finished Dependency Resolution
Error: Package: nss-3.28.3-3.el6_9.x86_64 (updates)
Requires: nspr >= 4.13.0
Installed: nspr-4.11.0-1.el6.x86_64 (@CentOS/6.8)
nspr = 4.11.0-1.el6
Error: Package: nss-util-3.28.3-1.el6_9.x86_64 (updates)
Requires: nspr >= 4.13.0-1
Installed: nspr-4.11.0-1.el6.x86_64 (@CentOS/6.8)
nspr = 4.11.0-1.el6
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
跟踪输出HTTP GET到http:///org.centos.mirror/6/os/x86_64/repodata/repomd.xml?trace
Request ID: 848754bb
Repo Path ID: org.centos.mirror:6/os/x86_64/repodata/repomd.xml
Method Name: GET
User: anonymous
Time: 2017-04-20T10:17:28.591+10:00
Thread: http-nio-9081-exec-130
Steps:
2017-04-20T10:17:28.591+10:00 Received request
2017-04-20T10:17:28.591+10:00 Request source = x.x.x.x, Last modified = 01-01-70 09:59:59 +10:00, If modified since = -1, Thread name = http-nio-9081-exec-130
2017-04-20T10:17:28.591+10:00 Executing any BeforeDownloadRequest user plugins that may exist
2017-04-20T10:17:28.591+10:00 Retrieving info from {} repository '{}' type
2017-04-20T10:17:28.623+10:00 Found the resource in the cache - checking for expiry
2017-04-20T10:17:28.623+10:00 Returning resource as expired
2017-04-20T10:17:28.623+10:00 Executing any AltRemotePath user plugins that may exist
2017-04-20T10:17:28.623+10:00 Appending matrix params to remote request URL
2017-04-20T10:17:28.623+10:00 Using remote request URL - http://mirror.centos.org/centos/6/os/x86_64/repodata/repomd.xml
2017-04-20T10:17:28.623+10:00 Executing HEAD request to http://mirror.centos.org/centos/6/os/x86_64/repodata/repomd.xml
2017-04-20T10:17:28.654+10:00 Found remote resource with last modified time - Wed Mar 29 05:05:42 AEDT 2017
2017-04-20T10:17:28.654+10:00 Found remote resource with ETag - "ea5-54bce4edce980"
2017-04-20T10:17:28.654+10:00 Found remote resource with content length - 3749
2017-04-20T10:17:28.654+10:00 Returning found remote resource info
2017-04-20T10:17:28.654+10:00 Requested resource is found = true
2017-04-20T10:17:28.654+10:00 Request is HEAD = false
2017-04-20T10:17:28.654+10:00 Request is for a checksum = false
2017-04-20T10:17:28.654+10:00 Target repository is not remote or doesn't store locally = false
2017-04-20T10:17:28.654+10:00 Requested resource was not modified = false
2017-04-20T10:17:28.654+10:00 Responding with found resource
2017-04-20T10:17:28.654+10:00 Executing any AltResponse user plugins that may exist
2017-04-20T10:17:28.654+10:00 Alternative response status is set to -1 and message to 'null'
2017-04-20T10:17:28.654+10:00 Found no alternative content handles
2017-04-20T10:17:28.654+10:00 Retrieving a content handle from target repo
2017-04-20T10:17:28.654+10:00 The requested resource isn't pre-resolved
2017-04-20T10:17:28.654+10:00 Target repository isn't virtual - verifying that downloading is allowed
2017-04-20T10:17:28.654+10:00 Creating a resource handle from 'org.centos.mirror'
2017-04-20T10:17:28.654+10:00 Target repository is configured to retain artifacts locally - resource will be stored and the streamed to the user
2017-04-20T10:17:28.654+10:00 Remote repository is online
2017-04-20T10:17:28.685+10:00 Found the resource in the cache - checking for expiry
2017-04-20T10:17:28.685+10:00 Returning resource as expired
2017-04-20T10:17:28.685+10:00 Found expired cached resource but remote is newer = false. Cached resource: 1490724342000, Remote resource: 1490724342000
2017-04-20T10:17:28.685+10:00 Force expiration on the cached resource = false
2017-04-20T10:17:28.685+10:00 Resource isn't cached and isn't expired = false
2017-04-20T10:17:28.685+10:00 Found expired cached resource and is newer than remote = true
2017-04-20T10:17:28.685+10:00 Executing any AltRemotePath user plugins that may exist
2017-04-20T10:17:28.716+10:00 Found the resource in the cache - checking for expiry
2017-04-20T10:17:28.716+10:00 Found request parameter {}=artifactory.forceDownloadIfNewer
2017-04-20T10:17:28.716+10:00 Returning resource as expired
2017-04-20T10:17:28.716+10:00 Using remote request URL - http://mirror.centos.org/centos/6/os/x86_64/repodata/repomd.xml:properties
2017-04-20T10:17:28.716+10:00 Executing HEAD request to http://mirror.centos.org/centos/6/os/x86_64/repodata/repomd.xml:properties
2017-04-20T10:17:28.732+10:00 Received status 404 (message: Not Found) on remote info request - returning unfound resource
2017-04-20T10:17:28.732+10:00 Found no remote properties
2017-04-20T10:17:28.763+10:00 Un-expiring cached resource if needed
2017-04-20T10:17:28.763+10:00 Is resource metadata = false
2017-04-20T10:17:28.763+10:00 Un-expiring the resource
2017-04-20T10:17:28.810+10:00 Found the resource in the cache - checking for expiry
2017-04-20T10:17:28.810+10:00 Found request parameter {}=artifactory.forceDownloadIfNewer
2017-04-20T10:17:28.810+10:00 Returning cached resource
2017-04-20T10:17:28.810+10:00 Removing the resource from all failed caches
2017-04-20T10:17:28.810+10:00 Returning the cached resource
2017-04-20T10:17:28.810+10:00 Creating a resource handle from 'org.centos.mirror-cache:6/os/x86_64/repodata/repomd.xml'
2017-04-20T10:17:28.825+10:00 Identified requested resource as a file
2017-04-20T10:17:28.825+10:00 Requested resource is an ordinary artifact - using normal content handle with length '3751'
2017-04-20T10:17:28.825+10:00 Executing any BeforeDownload user plugins that may exist
2017-04-20T10:17:28.825+10:00 Responding with selected content handle
2017-04-20T10:17:28.825+10:00 Request succeeded
编辑:我注意到在存储库上配置了同步属性。禁用该选项后,跟踪输出现在如下所示。看起来像缓存的repomd文件的时间戳,并且遥控器是相同的,但文件内容是不同的(mirror.centos.org中的版本号是1463896289,但Artifactory中的版本号显示为1490724196)。
Request ID: a4f6fc65
Repo Path ID: org.centos.mirror:6/os/x86_64/repodata/repomd.xml
Method Name: GET
User: fowliena
Time: 2017-04-20T10:56:03.880+10:00
Thread: http-nio-9081-exec-133
Steps:
2017-04-20T10:56:03.880+10:00 Received request
2017-04-20T10:56:03.880+10:00 Request source = x.x.x.x, Last modified = 01-01-70 09:59:59 +10:00, If modified since = -1, Thread name = http-nio-9081-exec-133
2017-04-20T10:56:03.880+10:00 Executing any BeforeDownloadRequest user plugins that may exist
2017-04-20T10:56:03.880+10:00 Retrieving info from {} repository '{}' type
2017-04-20T10:56:03.912+10:00 Found the resource in the cache - checking for expiry
2017-04-20T10:56:03.912+10:00 Returning resource as expired
2017-04-20T10:56:03.912+10:00 Executing any AltRemotePath user plugins that may exist
2017-04-20T10:56:03.912+10:00 Appending matrix params to remote request URL
2017-04-20T10:56:03.912+10:00 Using remote request URL - http://mirror.centos.org/centos/6/os/x86_64/repodata/repomd.xml
2017-04-20T10:56:03.912+10:00 Executing HEAD request to http://mirror.centos.org/centos/6/os/x86_64/repodata/repomd.xml
2017-04-20T10:56:03.943+10:00 Found remote resource with last modified time - Wed Mar 29 05:05:42 AEDT 2017
2017-04-20T10:56:03.943+10:00 Found remote resource with ETag - "ea5-54bce4edce980"
2017-04-20T10:56:03.943+10:00 Found remote resource with content length - 3749
2017-04-20T10:56:03.943+10:00 Returning found remote resource info
2017-04-20T10:56:03.943+10:00 Requested resource is found = true
2017-04-20T10:56:03.943+10:00 Request is HEAD = false
2017-04-20T10:56:03.943+10:00 Request is for a checksum = false
2017-04-20T10:56:03.943+10:00 Target repository is not remote or doesn't store locally = false
2017-04-20T10:56:03.943+10:00 Requested resource was not modified = false
2017-04-20T10:56:03.943+10:00 Responding with found resource
2017-04-20T10:56:03.943+10:00 Executing any AltResponse user plugins that may exist
2017-04-20T10:56:03.943+10:00 Alternative response status is set to -1 and message to 'null'
2017-04-20T10:56:03.943+10:00 Found no alternative content handles
2017-04-20T10:56:03.943+10:00 Retrieving a content handle from target repo
2017-04-20T10:56:03.943+10:00 The requested resource isn't pre-resolved
2017-04-20T10:56:03.943+10:00 Target repository isn't virtual - verifying that downloading is allowed
2017-04-20T10:56:03.943+10:00 Creating a resource handle from 'org.centos.mirror'
2017-04-20T10:56:03.943+10:00 Target repository is configured to retain artifacts locally - resource will be stored and the streamed to the user
2017-04-20T10:56:03.943+10:00 Remote repository is online
2017-04-20T10:56:03.974+10:00 Found the resource in the cache - checking for expiry
2017-04-20T10:56:03.974+10:00 Returning resource as expired
2017-04-20T10:56:03.974+10:00 Found expired cached resource but remote is newer = false. Cached resource: 1490724342000, Remote resource: 1490724342000
2017-04-20T10:56:03.974+10:00 Force expiration on the cached resource = false
2017-04-20T10:56:03.974+10:00 Resource isn't cached and isn't expired = false
2017-04-20T10:56:03.974+10:00 Found expired cached resource and is newer than remote = true
2017-04-20T10:56:03.974+10:00 Remote property synchronization is disabled - expired resource property synchronization not attempted
2017-04-20T10:56:03.974+10:00 Un-expiring cached resource if needed
2017-04-20T10:56:03.974+10:00 Is resource metadata = false
2017-04-20T10:56:03.974+10:00 Un-expiring the resource
2017-04-20T10:56:04.005+10:00 Found the resource in the cache - checking for expiry
2017-04-20T10:56:04.005+10:00 Found request parameter {}=artifactory.forceDownloadIfNewer
2017-04-20T10:56:04.005+10:00 Returning cached resource
2017-04-20T10:56:04.021+10:00 Removing the resource from all failed caches
2017-04-20T10:56:04.021+10:00 Returning the cached resource
2017-04-20T10:56:04.021+10:00 Creating a resource handle from 'org.centos.mirror-cache:6/os/x86_64/repodata/repomd.xml'
2017-04-20T10:56:04.021+10:00 Identified requested resource as a file
2017-04-20T10:56:04.021+10:00 Requested resource is an ordinary artifact - using normal content handle with length '3751'
2017-04-20T10:56:04.021+10:00 Executing any BeforeDownload user plugins that may exist
2017-04-20T10:56:04.021+10:00 Responding with selected content handle
2017-04-20T10:56:04.021+10:00 Request succeeded