Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

使用 ./ezdown -D 无法下载镜像 #1408

Closed
huningfei opened this issue Sep 14, 2024 · 14 comments
Closed

使用 ./ezdown -D 无法下载镜像 #1408

huningfei opened this issue Sep 14, 2024 · 14 comments
Labels

Comments

@huningfei
Copy link

What happened? 发生了什么问题?

image

What did you expect to happen? 期望的结果是什么?

期望执行 ./ezdown -D 可以正常下载

How can we reproduce it (as minimally and precisely as possible)? 尽可能最小化、精确地描述如何复现问题

export release=3.5.0
wget https://github.com/easzlab/kubeasz/releases/download/${release}/ezdown
chmod +x ./ezdown
./ezdown -D

即可复现

Anything else we need to know? 其他需要说明的情况

No response

Kubernetes version k8s 版本

1.26

Kubeasz version

3.5.0

OS version 操作系统版本

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

[root@k8s-master1 k8s]# cat /etc/redhat-release
Rocky Linux release 9.2 (Blue Onyx)

Related plugins (CNI, CSI, ...) and versions (if applicable) 其他网络插件等需要说明的情况

@etcxy
Copy link

etcxy commented Sep 18, 2024

mirror可能要随时调整,可以试试这个,群友提供的:

cat > /etc/docker/daemon.json << "EOF"
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "registry-mirrors": [
    "https://docker.registry.cyou",
    "https://docker-cf.registry.cyou",
    "https://dockercf.jsdelivr.fyi",
    "https://docker.jsdelivr.fyi",
    "https://dockertest.jsdelivr.fyi",
    "https://mirror.aliyuncs.com",
    "https://dockerproxy.com",
    "https://mirror.baidubce.com",
    "https://docker.m.daocloud.io",
    "https://docker.nju.edu.cn",
    "https://docker.mirrors.sjtug.sjtu.edu.cn",
    "https://docker.mirrors.ustc.edu.cn",
    "https://mirror.iscas.ac.cn",
    "https://docker.rainbond.cc"
  ],
  "insecure-registries": ["http://easzlab.io.local:5000"],
  "max-concurrent-downloads": 10,
  "log-driver": "json-file",
  "log-level": "warn",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
    },
  "data-root": "/var/lib/docker"
}
EOF

@linorwang
Copy link

目前大陆已经放开docker仓库的限制!!!可以拉取镜像。

@huningfei
Copy link
Author

目前大陆已经放开docker仓库的限制!!!可以拉取镜像。

我目前测试的不行,开了一个香港地区的服务器,下载没有任何问题

@huningfei
Copy link
Author

mirror可能要随时调整,可以试试这个,群友提供的:

cat > /etc/docker/daemon.json << "EOF"
{
  "exec-opts": ["native.cgroupdriver=systemd"],
  "registry-mirrors": [
    "https://docker.registry.cyou",
    "https://docker-cf.registry.cyou",
    "https://dockercf.jsdelivr.fyi",
    "https://docker.jsdelivr.fyi",
    "https://dockertest.jsdelivr.fyi",
    "https://mirror.aliyuncs.com",
    "https://dockerproxy.com",
    "https://mirror.baidubce.com",
    "https://docker.m.daocloud.io",
    "https://docker.nju.edu.cn",
    "https://docker.mirrors.sjtug.sjtu.edu.cn",
    "https://docker.mirrors.ustc.edu.cn",
    "https://mirror.iscas.ac.cn",
    "https://docker.rainbond.cc"
  ],
  "insecure-registries": ["http://easzlab.io.local:5000"],
  "max-concurrent-downloads": 10,
  "log-driver": "json-file",
  "log-level": "warn",
  "log-opts": {
    "max-size": "10m",
    "max-file": "3"
    },
  "data-root": "/var/lib/docker"
}
EOF

试了一下上面的daemon.json,,还是提示上面的错误,看来都已经不能用了

@opser-gavin
Copy link

是的,还是不行啊

@huningfei
Copy link
Author

cat > /etc/docker/daemon.json << "EOF"
{
"exec-opts": ["native.cgroupdriver=systemd"],
"registry-mirrors": [
"https://docker.registry.cyou",
"https://docker-cf.registry.cyou",
"https://dockercf.jsdelivr.fyi",
"https://docker.jsdelivr.fyi",
"https://dockertest.jsdelivr.fyi",
"https://mirror.aliyuncs.com",
"https://dockerproxy.com",
"https://mirror.baidubce.com",
"https://docker.m.daocloud.io",
"https://docker.nju.edu.cn",
"https://docker.mirrors.sjtug.sjtu.edu.cn",
"https://docker.mirrors.ustc.edu.cn",
"https://mirror.iscas.ac.cn",
"https://docker.rainbond.cc"
],
"insecure-registries": ["http://easzlab.io.local:5000"],
"max-concurrent-downloads": 10,
"log-driver": "json-file",
"log-level": "warn",
"log-opts": {
"max-size": "10m",
"max-file": "3"
},
"data-root": "/var/lib/docker"
}
EOF

今天又重新开了个新机器,居然又可以下载了,赞!!!

@sujingclg
Copy link

目前大陆已经放开docker仓库的限制!!!可以拉取镜像。

刚试了下并不行,北京,教育网 & 中国移动

@Mia-Dan
Copy link

Mia-Dan commented Sep 27, 2024

遇到同样的问题。
猜测可能与 ./ezdown参数读取失败有关。能帮忙看下为什么这些会失败吗?

root@hostname:~# ./ezdown -m "CN"
2024-09-27 12:20:38 ERROR illegal option
Usage: ezdown [options] [args]
  option:
    -C         stop&clean all local containers
    -D         download default binaries/images into "/etc/kubeasz"
    -P <OS>    download system packages of the OS (ubuntu_22,debian_11,...)
    -R         download Registry(harbor) offline installer
    -S         start kubeasz in a container
    -X <opt>   download extra images
    -d <ver>   set docker-ce version, default "24.0.5"
    -e <ver>   set kubeasz-ext-bin version, default "1.8.0"
    -k <ver>   set kubeasz-k8s-bin version, default "v1.28.1"
    -m <str>   set docker registry mirrors, default "CN"(used in Mainland,China)
    -z <ver>   set kubeasz version, default "3.6.2"
root@hostname:~# ./ezdown -d "24.0.5"
2024-09-27 12:20:55 ERROR illegal option
Usage: ezdown [options] [args]
  option:
    -C         stop&clean all local containers
    -D         download default binaries/images into "/etc/kubeasz"
    -P <OS>    download system packages of the OS (ubuntu_22,debian_11,...)
    -R         download Registry(harbor) offline installer
    -S         start kubeasz in a container
    -X <opt>   download extra images
    -d <ver>   set docker-ce version, default "24.0.5"
    -e <ver>   set kubeasz-ext-bin version, default "1.8.0"
    -k <ver>   set kubeasz-k8s-bin version, default "v1.28.1"
    -m <str>   set docker registry mirrors, default "CN"(used in Mainland,China)
    -z <ver>   set kubeasz version, default "3.6.2"

@huningfei
Copy link
Author

遇到同样的问题。 猜测可能与 ./ezdown参数读取失败有关。能帮忙看下为什么这些会失败吗?

root@hostname:~# ./ezdown -m "CN"
2024-09-27 12:20:38 ERROR illegal option
Usage: ezdown [options] [args]
  option:
    -C         stop&clean all local containers
    -D         download default binaries/images into "/etc/kubeasz"
    -P <OS>    download system packages of the OS (ubuntu_22,debian_11,...)
    -R         download Registry(harbor) offline installer
    -S         start kubeasz in a container
    -X <opt>   download extra images
    -d <ver>   set docker-ce version, default "24.0.5"
    -e <ver>   set kubeasz-ext-bin version, default "1.8.0"
    -k <ver>   set kubeasz-k8s-bin version, default "v1.28.1"
    -m <str>   set docker registry mirrors, default "CN"(used in Mainland,China)
    -z <ver>   set kubeasz version, default "3.6.2"
root@hostname:~# ./ezdown -d "24.0.5"
2024-09-27 12:20:55 ERROR illegal option
Usage: ezdown [options] [args]
  option:
    -C         stop&clean all local containers
    -D         download default binaries/images into "/etc/kubeasz"
    -P <OS>    download system packages of the OS (ubuntu_22,debian_11,...)
    -R         download Registry(harbor) offline installer
    -S         start kubeasz in a container
    -X <opt>   download extra images
    -d <ver>   set docker-ce version, default "24.0.5"
    -e <ver>   set kubeasz-ext-bin version, default "1.8.0"
    -k <ver>   set kubeasz-k8s-bin version, default "v1.28.1"
    -m <str>   set docker registry mirrors, default "CN"(used in Mainland,China)
    -z <ver>   set kubeasz version, default "3.6.2"

-D 试过吗,你的这两个参数我还从来没用过

@Mia-Dan
Copy link

Mia-Dan commented Sep 28, 2024

遇到同样的问题。 猜测可能与 ./ezdown参数读取失败有关。能帮忙看下为什么这些会失败吗?

-D 试过吗,你的这两个参数我还从来没用过

-D的报错和您的完全一致

@huningfei
Copy link
Author

遇到同样的问题。 猜测可能与 ./ezdown参数读取失败有关。能帮忙看下为什么这些会失败吗?

-D 试过吗,你的这两个参数我还从来没用过

-D的报错和您的完全一致

-D 报错,
第一更改ezdown文件内容wget处 :
wget --header="User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" --no-check-certificate "$DOCKER_URL" || { logger error "downloading docker failed"; exit 1; }

第二 就是使用上面的daemon.json文件内容,然后就可以正常下载了

@Mia-Dan
Copy link

Mia-Dan commented Sep 28, 2024

遇到同样的问题。 猜测可能与 ./ezdown参数读取失败有关。能帮忙看下为什么这些会失败吗?

-D 试过吗,你的这两个参数我还从来没用过

-D的报错和您的完全一致

-D 报错, 第一更改ezdown文件内容wget处 : wget --header="User-Agent:Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/126.0.0.0 Safari/537.36" --no-check-certificate "$DOCKER_URL" || { logger error "downloading docker failed"; exit 1; }

第二 就是使用上面的daemon.json文件内容,然后就可以正常下载了

非常感谢您!

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Oct 28, 2024
Copy link

github-actions bot commented Nov 5, 2024

This issue was closed because it has been inactive for 14 days since being marked as stale.

@github-actions github-actions bot closed this as completed Nov 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants