容器部署脚本申请ssl证书,直接报错了

Please fill out the fields below so we can help you better. Note: you must provide your domain name to get help. Domain names for issued certificates are all made public in Certificate Transparency logs (e.g. crt.sh | example.com), so withholding your domain name here does not increase secrecy, but only makes it harder for us to provide help.

My domain is:cgi.dev-rs.cicc.com

I ran this command:certonly --manual --preferred-challenges http -d cgi.dev-rs.cicc.com

It produced this output:
An unexpected error occurred:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='acme-v02.api.letsencrypt.org', port=443): Max retries exceeded with url: /directory (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f410a830580>: Failedto establish a new connection: [Errno -3] Temporary failure in name resolution'))
Ask for help or search for solutions at https://community.letsencrypt.org. See the logfile /var/log/letsencrypt/letsencrypt.log or re-run Certbot with -v for more details.

My web server is (include version):

The operating system my web server runs on is (include version):

My hosting provider, if applicable, is:

I can login to a root shell on my machine (yes or no, or I don't know):

I'm using a control panel to manage my site (no, or provide the name and version of the control panel):

The version of my client is (e.g. output of certbot --version or certbot-auto --version if you're using Certbot):

Hi @Xiaokai, and welcome to the LE community forum :slight_smile:

Please show:
nslookup acme-v02.api.letsencrypt.org
cat /etc/resolv.conf

3 Likes

nslookup acme-v02.api.letsencrypt.org

Server: 10.96.0.10
Address: 10.96.0.10#53

** server can't find acme-v02.api.letsencrypt.org: SERVFAIL

cat /etc/resolv.conf

nameserver 10.96.0.10
search rs-basedmz-dev.svc.cluster.local svc.cluster.local cluster.local bjdev.qcloud.cicc.com.cn
options ndots:5

Try using another DNS server [not 10.96.0.10]
Like:
nslookup acme-v02.api.letsencrypt.org 114.114.114.114
nslookup acme-v02.api.letsencrypt.org 8.8.8.8
nslookup acme-v02.api.letsencrypt.org 9.9.9.9
nslookup acme-v02.api.letsencrypt.org 1.1.1.1

5 Likes

Great FireWall of China possibly?

1 Like

按照你的操作我修改了dns服务器,重新配置了一下,但是还是无法解析到,您看我这么配置对吗?
#nameserver 10.96.0.10
nameserver 8.8.8.8
nameserver 114.114.114.114
search rs-basedmz-dev.svc.cluster.local svc.cluster.local cluster.local bjdev.qcloud.cicc.com.cn
options ndots:5

中国长城是啥啊~~~

Does this server have outgoing Internet connectivity in general? (Can it reach Internet services outside of the LAN or data center?)

Apparently in Chinese it is normally called 防火长城 and refers to systems that implement government policies to restrict connections between the Chinese Internet and the rest of the world's Internet. This can sometimes cause unpredictable errors for Internet users in China.

In the past, users in China have been able to get Let's Encrypt certificates successfully, so I don't think this is a very likely explanation for this problem. (The government policy that caused the most trouble is the ICP license, where the Chinese government also requires people to have a license in order to operate public Internet services, and hosting companies may prevent incoming connections to servers that have not demonstrated that they are in possession of this license. However, that would cause a very different error if it were the problem in this case.)

4 Likes

Please show the output of these tests:

3 Likes

20230209-085734

1 Like

另外两个得报错和上面是一样得

这个是公司得k8s集群当中得pod去访问得,虽然集群属于是测试环境,但是也应该是有传出得能力

So your machine does not have connectivity to 9.9.9.9 nor 1.1.1.1, likely a firewall issue.

1 Like

有什么命令方法可以查看嘛

You have no access to DNS.
You must fix this basic problem before continuing.

2 Likes

在容器中加一个代理服务器应该可以吧
您知道怎么在容器中添加嘛? :sob:

You should look for such help in the correct forum.

3 Likes

那谢谢您的帮助,有问题再和您沟通,晚安!

2 Likes

I agree with the diagnosis that perhaps the k8s instance does not have any outgoing Internet connectivity, which would need to be configured before it can use the Let's Encrypt API.

As @rg305 said, we are mostly not experts on k8s here since this forum is more specialized for Let's Encrypt questions. Some people may know about it but most questions relate much more to other environments (usually people running on a VPS or even a bare-metal server instead of k8s).

You might also want to look at the host command (for performing DNS queries from the command line) and ping for testing IP connectivity on the command line. Good luck!

4 Likes

谢谢,有机会来中国玩

1 Like