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

使用docker-compose部署后,并使用acme来更新证书,查看log后发现提示更新的请求过多,导致无法获取证书 #1084

Closed
Miaozz1996 opened this issue May 15, 2024 · 3 comments

Comments

@Miaozz1996
Copy link

描述问题
使用docker-compose部署后,并使用acme来更新证书,查看log后发现提示更新的请求过多,导致无法获取证书

预期行为
docker-compose部署后,应该可以正常更新证书

日志
hysteria | 2024-05-15T09:05:32Z ERROR obtain could not get certificate from issuer {"identifier": "xxx.xxxx.org", "issuer": "acme-v02.api.letsencrypt.org-directory", "error": "HTTP 429 urn:ietf:params:acme:error:rateLimited - Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/failed-validation-limit/"}
hysteria | 2024-05-15T09:05:32Z INFO obtain releasing lock {"identifier": "xxx.xxxx.org"}
hysteria | 2024-05-15T09:05:32Z FATAL failed to load server config {"error": "invalid config: acme.domains: xxx.xxxx.org: obtaining certificate: [xxx.xxxx.org] Obtain: xxx.xxxx.org] creating new order: attempt 1: https://acme-v02.api.letsencrypt.org/acme/new-order: HTTP 429 urn:ietf:params:acme:error:rateLimited - Error creating new order :: too many failed authorizations recently: see https://letsencrypt.org/docs/failed-validation-limit/ (ca=https://acme-v02.api.letsencrypt.org/directory)"}

设备和操作系统
ubuntu20.23

额外信息
其他你认为有助于解决问题的信息。

@Miaozz1996 Miaozz1996 added the bug Something isn't working label May 15, 2024
@haruue
Copy link
Collaborator

haruue commented May 15, 2024

您好。

如果您使用 docker-compose 运行 Hysteria, 请确保在 docker-compose.yaml 正确地设置 network_mode: "host" , 或者正确地配置主机上的 TCP 80 端口到容器内 TCP 80 的转发。

请在修复上述配置错误后, 等待一小时, 然后重新进行 ACME 验证。 更换另一个子域名或许能立即重新开始验证, 此限制取决于 Let's Encrypt。

此外, 如果你不熟悉 docker, 通常都没有必要使用 docker 或者 docker-compose 运行 Hysteria。 Hysteria 的运行不依赖环境中的其它应用程序, 在容器内运行不会带来好处。

@haruue haruue closed this as completed May 16, 2024
@haruue haruue removed the bug Something isn't working label May 16, 2024
@Miaozz1996
Copy link
Author

您好。

如果您使用 docker-compose 运行 Hysteria, 请确保在 docker-compose.yaml 正确地设置 network_mode: "host" , 或者正确地配置主机上的 TCP 80 端口到容器内 TCP 80 的转发。

请在修复上述配置错误后, 等待一小时, 然后重新进行 ACME 验证。 更换另一个子域名或许能立即重新开始验证, 此限制取决于 Let's Encrypt。

此外, 如果你不熟悉 docker, 通常都没有必要使用 docker 或者 docker-compose 运行 Hysteria。 Hysteria 的运行不依赖环境中的其它应用程序, 在容器内运行不会带来好处。

我现在不适用acme来获取证书了,使用自签证书,但是发现docker跑起来后,容器内部只是启动了443的udp端口,这个是什么情况呢?

@haruue
Copy link
Collaborator

haruue commented May 16, 2024

容器内部只是启动了443的udp端口

如果没有配置 masquerade.listenHTTP 或者 masquerade.listenHTTPS, 那么只有在进行证书申请/更新时, Hysteria 才会监听 TCP 80/443 端口, 用于完成 ACME 所需的 http challenge 或者 tls alpn challenge。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants