AliyunContainerService/image-syncer

同步到本地harbor失败

Closed this issue · 7 comments

klj890 commented

同步到本地harbor时,显示StatusCode: 404。
我的harbor版本是:版本 v2.7.4-8693b25a
api地址显示是: Base URL: reg.tonyw.io/api/v2.0
命令:./image-syncer --images untitled.yaml --auth auth.yaml --force
日志:

DEPL.... Now 52/54 tasks have been processed.
INFO[2023-12-14 10:30:57] Executing synchronizing blob sha256:4c9fba3093ab06fc1092f3f1b1c567b97fc6a6eba2bb0ef0911acece214a5a93(212.3kB) from docker.io/moby/buildkit:buildx-stable-1 to reg.tonyw.io/moby/buildkit:buildx-stable-1...
INFO[2023-12-14 10:30:57] Executing synchronizing blob sha256:0fc31778cbbc78ade01297a36482bf4530ebcec433ab58de5ff254fd66a824f4(315B) from docker.io/moby/buildkit:buildx-stable-1 to reg.tonyw.io/moby/buildkit:buildx-stable-1...
ERRO[2023-12-14 10:30:57] Failed to executed synchronizing blob sha256:0fc31778cbbc78ade01297a36482bf4530ebcec433ab58de5ff254fd66a824f4(315B) from docker.io/moby/buildkit:buildx-stable-1 to reg.tonyw.io/moby/buildkit:buildx-stable-1: failed to check blob sha256:0fc31778cbbc78ade01297a36482bf4530ebcec433ab58de5ff254fd66a824f4(315) exist: pinging container registry reg.tonyw.io: StatusCode: 404, The deployment could not be found on Vercel.

DEPL.... Now 54/54 tasks have been processed.
ERRO[2023-12-14 10:30:57] Failed to executed synchronizing blob sha256:4c9fba3093ab06fc1092f3f1b1c567b97fc6a6eba2bb0ef0911acece214a5a93(212.3kB) from docker.io/moby/buildkit:buildx-stable-1 to reg.tonyw.io/moby/buildkit:buildx-stable-1: failed to check blob sha256:4c9fba3093ab06fc1092f3f1b1c567b97fc6a6eba2bb0ef0911acece214a5a93(212290) exist: pinging container registry reg.tonyw.io: StatusCode: 404, The deployment could not be found on Vercel.

DEPL.... Now 53/54 tasks have been processed.
INFO[2023-12-14 10:30:57] Finished, 54 tasks failed, cost 21.043128917s.
failed tasks exist

我使用skopeo时也遇到了这个问题,是我的harbor版本太高了?

应该是 registry 配置的问题,可以在当前运行 image-syncer 的机器上 docker push 下相同镜像到相同路径看看能不能 push 上去。

klj890 commented

应该是 registry 配置的问题,可以在当前运行 image-syncer 的机器上 docker push 下相同镜像到相同路径看看能不能 push 上去。

这个试过了,昨天还通过docker buildx push过镜像。。。

klj890 commented
➜  ~ docker pull reg.tonyw.io/wordpress/wordpress@sha256:6b13d47e2d67a274b57c315322a968dbe7bc9aafab050b164e1e81cd03c30566
reg.tonyw.io/wordpress/wordpress@sha256:6b13d47e2d67a274b57c315322a968dbe7bc9aafab050b164e1e81cd03c30566: Pulling from wordpress/wordpress
no matching manifest for linux/arm64/v8 in the manifest list entries
➜  ~ docker images
REPOSITORY      TAG               IMAGE ID       CREATED        SIZE
moby/buildkit   buildx-stable-1   5e52d49c7aeb   12 days ago    168MB
busybox         latest            fc9db2894f4e   4 months ago   4.04MB
➜  ~ docker tag busybox:latest reg.tonyw.io/library/busybox-arm64:latest
➜  ~ docker push reg.tonyw.io/library/busybox-arm64:latest
The push refers to repository [reg.tonyw.io/library/busybox-arm64]
3694737149b1: Pushed
latest: digest: sha256:1fa89c01cd0473cedbd1a470abb8c139eeb80920edf1bc55de87851bfb63ea11 size: 528

看起来是 Vercel 的报错,可以看下对于 reg.tonyw.io/v2/ 的 Get 请求会被路由到哪里去

klj890 commented

看起来是 Vercel 的报错,可以看下对于 reg.tonyw.io/v2/ 的 Get 请求会被路由到哪里去

➜  ~ curl -kv https://reg.tonyw.io/v2/
* Uses proxy env variable https_proxy == 'http://127.0.0.1:1087'
*   Trying 127.0.0.1:1087...
* Connected to 127.0.0.1 (127.0.0.1) port 1087 (#0)
* CONNECT tunnel: HTTP/1.1 negotiated
* allocate connect buffer
* Establish HTTP proxy tunnel to reg.tonyw.io:443
> CONNECT reg.tonyw.io:443 HTTP/1.1
> Host: reg.tonyw.io:443
> User-Agent: curl/8.1.2
> Proxy-Connection: Keep-Alive
>
< HTTP/1.1 200 Connection established
<
* CONNECT phase completed
* CONNECT tunnel established, response 200
* ALPN: offers h2,http/1.1
* (304) (OUT), TLS handshake, Client hello (1):
* LibreSSL/3.3.6: error:1404B42E:SSL routines:ST_CONNECT:tlsv1 alert protocol version
* Closing connection 0
curl: (35) LibreSSL/3.3.6: error:1404B42E:SSL routines:ST_CONNECT:tlsv1 alert protocol version
klj890 commented

我看到了。。。这个请求走了我的代理。。。

klj890 commented

@hhyasdf 多谢