certbot 获取数字证书失效问题
title: certbot 获取数字证书失效问题
author: Narule
date: 2021-02-18 10:45:00 +0800
categories: [Technology^技术, Tools&Programs^程序工具]
tags: [writing, docker, certbot, ssl]
certbot 获取数字证书失效问题
数字证书
数字证书就是一个网站域名在通信时使用了安全加密的证明
数字证书为网站数据交互提供加密,用于保障通信保密安全,数字证书不是随意创建的,一般需要比较有公信力的组织或团队提供数字证书才会被认可。
个人创建一个证书,及时技术厉害别人也要花较多时间成本去了解你才相信你,类似阿里巴巴公司(较公众的团队)提供的数字证书,还是会有比较多的人容易信任认可的。
certbot
certbot是一个网站https免费证书工具,可以申请获取自己域名的证书,保证客户端与网站的通信安全
certbot 获取数字证书失效
certbot --nginx 获取证书失败
[root@ip-172-31-36-22 ~]# certbot --nginx
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Plugins selected: Authenticator nginx, Installer nginx
Which names would you like to activate HTTPS for?
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
2: narule.net
3: www.narule.net
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Select the appropriate numbers separated by commas and/or spaces, or leave input
blank to select all options shown (Enter 'c' to cancel): 2
Requesting a certificate for narule.net
Performing the following challenges:
http-01 challenge for narule.net
Waiting for verification...
Challenge failed for domain narule.net
http-01 challenge for narule.net
Cleaning up challenges
Some challenges have failed.
IMPORTANT NOTES:
- The following errors were reported by the server:
Domain: narule.net
Type: connection
Detail: Fetching
http://narule.net/.well-known/acme-challenge/ghMvWhw-3tOEmI7d5zNZGuQ:
Connection refused
To fix these errors, please make sure that your domain name was
entered correctly and the DNS A/AAAA record(s) for that domain
contain(s) the right IP address. Additionally, please check that
your computer has a publicly routable IP address and that no
firewalls are preventing the server from communicating with the
client. If you're using the webroot plugin, you should also verify
that you are serving files from the webroot path you provided.
这个问题很棘手,一开始还以为是nginx需要关闭,以前数字证书自动续签没有成功是因为nginx没有关闭,关闭就能成功,但是这次怎么都不行,最后通过日志发现,80端口从外网根本不能进去,只能内网访问,是80端口出了问题。
原因
最后思考,近期学习使用docker容器的时候,停止过nginx,使用docker占用了nginx的80端口。虽然docker我已经没运行了,80端口也被闲置,但是linux-centos7的环境没什么变化,推测很有可能与安装了docker有关,也许是安装docker占用了什么资源
解决方法
卸载docker
sudo yum remove docker-ce docker-ce-cli containerd.io
sudo rm -rf /var/lib/docker
certbot --nginx
按照上面两步卸载完docker后,在尝试运行certbot --nginx 获取数字证书成功!
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Congratulations! You have successfully enabled https://narule.net
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
IMPORTANT NOTES:
- Congratulations! Your certificate and chain have been saved at:
/etc/letsencrypt/live/narule.net/fullchain.pem
Your key file has been saved at:
/etc/letsencrypt/live/narule.net/privkey.pem
Your certificate will expire on 2021-05-19. To obtain a new or
tweaked version of this certificate in the future, simply run
certbot again with the "certonly" option. To non-interactively
renew *all* of your certificates, run "certbot renew"
- If you like Certbot, please consider supporting our work by:
Donating to ISRG / Let's Encrypt: https://letsencrypt.org/donate
Donating to EFF: https://eff.org/donate-le
certbot 获取数字证书失效问题的更多相关文章
- C#获取数字证书
string Thumbprint = "C2489D912F247C187AA14B1291A6fB612281225D"; X509Store store = new X509 ...
- android利用数字证书对程序签名
签名的必要性 1. 防止你已安装的应用被恶意的第三方覆盖或替换掉. 2. 开发者的身份标识,签名可以防止抵赖等事件的发生. 开发Android的人这么多,完全有可能大家都把类名,包名起成了一个同 ...
- 转: 在.NET中操作数字证书
作者:玄魂出处:博客2010-06-23 12:05 http://winsystem.ctocio.com.cn/19/9492019.shtml .NET为我们提供了操作数字证书的两个主要的类,分 ...
- android 利用数字证书对程序签名
签名的必要性 1. 防止你已安装的应用被恶意的第三方覆盖或替换掉. 2. 开发者的身份标识,签名可以防止抵赖等事件的发生. 开发Android的人这么多,完全有可能大家都把类名,包名起成了一个同样 ...
- 数字证书简介及Java编码实现
1.数字证书简介 数字证书具备常规加密解密必要的信息,包含签名算法,可用于网络数据加密解密交互,标识网络用户(计算机)身份.数字证书为发布公钥提供了一种简便的途径,其数字证书则成为加密算法以及公钥的载 ...
- 【转】Android数字证书
Android数字证书的作用是非常重要的.Android操作系统每一个应用程序的安装都需要经过这一数字证书的签名. Android手机操作系统作为一款比较流行的开源系统在手机领域占据着举足轻重的地位. ...
- 数字签名、数字证书的原理以及证书的获得java版
数字签名原理简介(附数字证书) 首先要了解什么叫对称加密和非对称加密,消息摘要这些知识. 1. 非对称加密 在通信双方,如果使用非对称加密,一般遵从这样的原则:公钥加密,私钥解密.同时,一般一个密钥加 ...
- 在.NET中操作数字证书(新手教程)
.NET为我们提供了操作数字证书的两个主要的类,分为为: System.Security.Cryptography.X509Certificates.X509Certificate2类, 每个这个类的 ...
- 【上】安全HTTPS-全面具体解释对称加密,非对称加密,数字签名,数字证书和HTTPS
一,对称加密 所谓对称加密.就是它们在编码时使用的密钥e和解码时一样d(e=d),我们就将其统称为密钥k. 对称加解密的步骤例如以下: 发送端和接收端首先要共享同样的密钥k(即通信前两方都须要知道相应 ...
随机推荐
- MongoDB 总结
目录 1. 逻辑结构 2. 安装部署 2.1 系统准备 2.2 mongodb安装 2.2.1 创建所需用户和组 2.2.2 创建mongodb所需目录结构 2.2.3 上传并解压软件到指定位置 2. ...
- IPC图像处理项目流程图
网络摄像机IPC图像处理项目流程图:
- 每月一更的《HelloGitHub》第 58 期,来啦!
HelloGitHub 分享 GitHub 上有趣.入门级的开源项目.欢迎大家: 贡献代码 宣传你觉得优秀的项目 Star 项目️ 本月刊是每月 28 号更新,再见月刊就是年后了.在这里提前祝大家:新 ...
- ADB 基本命令
ADB很强大,记住一些ADB命令有助于提高工作效率. 获取序列号: adb get-serialno 查看连接计算机的设备: adb devices 重启机器: adb reboot 重启到bootl ...
- Web信息收集之搜索引擎-GoogleHacking
Web信息收集之搜索引擎-GoogleHacking 一.信息收集概述 二.Google Hacking 2.1 site 2.2 filetype 2.3 inurl 2.4 intitle 2.5 ...
- Linux命令之Crontab定时任务,利用Crontab定时执行spark任务
Linux命令之Crontab定时任务,利用Crontab定时执行spark任务 一.Linux命令之Crontab定时任务 1.1 常见Crontab任务 1.1.1 安装crontab 1.1.2 ...
- shell(shell函数、shell正则表达式)
本章内容 shell函数 shell正则表达式 1.shell函数 linux shell 可以用户定义函数,然后在shell脚本中可以随便调用. 格式: funname () { CMD #函数体 ...
- f5 http和tcp_80 monitor
f5上的http和tcp_80 monitor是有区别的.假如使用http为monitor,即使80端口是通的,但是有的情况f5也会根据http的访问返回值情况判断站点不可用. 如, telnet I ...
- 当 .NET 5 遇上OpenTelemetry,会碰撞出怎样的火花?
OpenTelemetry 介绍 我在之前的几篇文章都介绍了 OpenTelemetry, 你可以在这里找到 OpenTelemetry - 云原生下可观测性的新标准 深入研究 .NET 5 的开放式 ...
- 【机制】js的闭包、执行上下文、作用域链
1.从闭包说起 什么是闭包 一个函数和对其周围状态(词法环境)的引用捆绑在一起,这样的组合就是闭包. 也就是说,闭包让你可以在一个内层函数中访问到其外层函数的作用域. 在 JavaScript 中,每 ...