sonatype-nexus-community / nexus-repository-apk

Eclipse Public License 1.0
42 stars 24 forks source link

Problem when the remote repository is not accessible #27

Open samiamoura opened 3 years ago

samiamoura commented 3 years ago

Thanks for creating an issue! Please fill out this form so we can be sure to have all the information we need, and to minimize back and forth.

--> message error : ARNING: Ignoring APKINDEX.cd4226d9.tar.gz: No such file or directory This message appear only when the remote repository is not reachable

cc @DarthHater @bhamail

dungnt081191 commented 2 years ago

in the same issue , any update @samiamoura

bhamail commented 2 years ago

which version of the plugin and which version of Nexus Repository Manager are being used?

riddle418 commented 2 years ago

Same problem.

Nexus Repository Manager: 3.38.0-01 Plugin: nexus-repository-apk-0.0.25 apk-tools 2.6.9, compiled for x86_64

Steps:

$ apk update fetch http://.../x86_64/APKINDEX.tar.gz v3.4.6-316-g63ea6d0 [http://.../] OK: 5244 distinct packages available

file x86_64/APKINDEX.tar.gz appears in nexus and work fine.

$ ls /var/cache/apk/ APKINDEX.7cb567f1.tar.gz


- If I disable the network, I can still install packages from proxy apk

$ apk add libpng-dev (1/5) Installing pkgconf (0.9.12-r0) ... (5/5) Installing libpng-dev (1.6.21-r0) Executing busybox-1.24.2-r14.trigger OK: 18 MiB in 31 packages


- But after `rm /var/cache/apk/*`

$ apk update fetch http://.../x86_64/APKINDEX.tar.gz ERROR: http://.../: remote server returned error (try 'apk update') WARNING: Ignoring APKINDEX.7cb567f1.tar.gz: No such file or directory 1 errors; 31 distinct packages available


Message from nexus:

WARN [qtp1968695392-86] *UNKNOWN org.sonatype.nexus.plugins.apk.orient.internal.ApkProxyFacetImpl - Exception java.net.UnknownHostException: dl-cdn.alpinelinux.org: Name or service not known checking remote for update, proxy repo apk-proxy-v3.4-main failed to fetch x86_64/APKINDEX.tar.gz, content not in cache.


but the x86_64/APKINDEX.tar.gz file still exists in the nexus.