天使漫步IT工作室天使漫步IT工作室

利用./certbot-auto --nginx renew --quiet --no-self-upgrade 更新报错

证书过期

站点用的是letsencry来作为证书,今天过期所以使用命令手动更新,我用的是ubutun系统。
命令如下:

cd  /root/certbot
 ./certbot-auto --nginx renew --quiet --no-self-upgrade

因为使用的是auto模式,所以会自动的安装一些依赖(certbot-auto 和 certbot 本质上是完全一样的;不同之处在于运行 certbot-auto 会自动安装它自己所需要的一些依赖,并且自动更新客户端工具。因此在你使用 certbot-auto 情况下,只需运行在当前目录执行即可),在执行的过程中报错了,报错信息如下:

Error while running nginx -c /etc/nginx/nginx.conf -t.

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: [alert] mmap(MAP_ANON|MAP_SHARED, 524288000) failed (12: Cannot allocate memory)
nginx: configuration file /etc/nginx/nginx.conf test failed

Attempting to renew cert from /etc/letsencrypt/renewal/huawenzixun.com.conf produced an unexpected error: The nginx plugin is not working; there may be problems with your existing configuration.
The error was: MisconfigurationError('Error while running nginx -c /etc/nginx/nginx.conf -t.\n\nnginx: the configuration file /etc/nginx/nginx.conf syntax is ok\nnginx: [alert] mmap(MAP_ANON|MAP_SHARED, 524288000) failed (12: Cannot allocate memory)\nnginx: configuration file /etc/nginx/nginx.conf test failed\n',). Skipping.

All renewal attempts failed. The following certs could not be renewed:
  /etc/letsencrypt/live/huawenzixun.com/fullchain.pem (failure)
1 renew failure(s), 0 parse failure(s)

报错的关键信息:Cannot allocate memory,上面也提高使用auto命令过程中会更新一些东西,所以需要耗费内存。当使用top命令后发现内存确实不足。当停止mysql等大进程后再执行命令就搞定了。

本站原创,欢迎转载,转载敬请标明出处:天使漫步IT工作室 » 利用./certbot-auto --nginx renew --quiet --no-self-upgrade 更新报错
添加新评论