1

我已经检查了这篇文章。但是即使我尝试了这种方法,它也不起作用,所以我打开了一个新问题。

我使用 AWS EC2 服务器并使用 aws 管道进行部署。所以当我推送到 github 存储库时,它会自动构建并部署到生产服务器。

起初它工作正常,并且控制台中没有错误。

但是有一天,错误开始发生。因此,当我检查控制台时,出现如下错误。

[控制台中的错误消息]

set greenlockOptions.notify to override the default logger
certificate_order (more info available: account subject altnames challengeTypes)
Error cert_issue:
[acme-v2.js] authorizations were not fetched for 'mydomain.com':
{"type":"urn:ietf:params:acme:error:rateLimited","detail":"Error creating new order :: too many certificates already issued for exact set of domains: mydomain.com: see https://letsencrypt.org/docs/rate-limits/","status":429,"_identifiers":[{"type":"dns","value":"mydomain.com"}]}
Error: [acme-v2.js] authorizations were not fetched for 'mydomain.com':
{"type":"urn:ietf:params:acme:error:rateLimited","detail":"Error creating new order :: too many certificates already issued for exact set of domains: mydomain.com: see https://letsencrypt.org/docs/rate-limits/","status":429,"_identifiers":[{"type":"dns","value":"mydomain.com"}]}
    at Object.E.NO_AUTHORIZATIONS (/home/project/build/node_modules/@root/acme/errors.js:75:9)
    at /home/project/build/node_modules/@root/acme/acme.js:1198:11
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
Error cert_issue:
[acme-v2.js] authorizations were not fetched for 'mydomain.com':

在我看来,我认为每次推送代码时重新颁发证书的过程都有一个限制,但即使我检查代码我也不知道问题出在哪里。

我的代码结构如下所示,并使用 Express 开发。

[服务器.js]

"use strict";

const app = require("./app.js");

require("greenlock-express")
    .init({
        packageRoot: __dirname,
        configDir: "./greenlock.d",

        // contact for security and critical bug notices
        maintainerEmail: process.env.EMAIL,

        // whether or not to run at cloudscale
        cluster: false
    })
    // Serves on 80 and 443
    // Get's SSL certificates magically!
    .serve(app);

[greenlock.d/config.json]

{ "sites": [{ "subject": "mydomain.com", "altnames": ["mydomain.com"] }] }

[.greenlockrc]

{"configDir":"./greenlock.d"}

[package.json (scripts.start 行)]

 "scripts": {
    "start": "node server.js"
  },

我知道 Let's Encrypt 的 7 天限制。所以我想找到解决这个问题的方法。

4

1 回答 1

0

在我的快递文件夹中,我做

sudo chmod 775 ./greenlock.d

然后我删除 greenlock.d(one time) 和 npm start

从那以后我没有问题

于 2022-02-10T08:33:46.647 回答