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(即通信前两方都须要知道相应 ...
 
随机推荐
- PWN_ret2text,ret2syscall,ret2shellcode
			
首先了解下Linux中的保护机制(具体的绕过等后续再说) 1.canary(栈保护) 在函数开始时就随机产生一个值,将这个值CANARY放到栈上紧挨ebp的上一个位置,当攻击者想通过缓冲区溢出覆盖eb ...
 - JavaScript中函数的this指向!
			
JavaScript的this的指向问题! 这是我自己敲的, 报错! <button>点击查看绑定事件的this指向!</button> <script> // 函 ...
 - 自定义Decoder继承ByteToMessageDecoder实现解码的小案例
			
ByteToMessageDecoder是一种ChannelInboundHandler,可以称为解码器,负责将byte字节流(ByteBuf)转换成一种Message,Message是应用可以自己定 ...
 - 用xmind设计用例:
			
注意一个原则:清晰明了,简单高效 注意不要写成需求分析,从测试的角度对场景进行分类管理 注意点: 1.思维导图重要的是逻辑清晰归类,注意有不要太多具体的操作步骤 举个例子(来源:https://www ...
 - luoguP2657 [SCOI2009] windy 数
			
目录 luoguP2657 [SCOI2009] windy 数 简述题意: Solution: luoguP2657 [SCOI2009] windy 数 简述题意: 不含前导零且相邻两个数字之差至 ...
 - (十五)整合 Drools规则引擎,实现高效的业务规则
			
整合 Drools规则引擎,实现高效的业务规则 1.Drools引擎简介 1.1 规则语法 2.SpringBoot整合Drools 2.1 项目结构 2.2 核心依赖 2.3 配置文件 3.演示案例 ...
 - 编程排序的一个excel-据说玩的好的,年薪50万了。只是你没在对的地方
			
是一个excel 下面是百度网盘分享地址; http://pan.baidu.com/s/1kTwqRfL
 - python2.7.5 +eric4.4.2+PyQt4-4.10.3
			
1.安装python 双击运行就可以了 当安装好了Pyhon,记得要配置环境变量,把C:\Python27添加到PATH中 2.安装pyqt默认安装就可以 3.把eric4.4.2拷贝到C:\目录下 ...
 - f5 http和tcp_80 monitor
			
f5上的http和tcp_80 monitor是有区别的.假如使用http为monitor,即使80端口是通的,但是有的情况f5也会根据http的访问返回值情况判断站点不可用. 如, telnet I ...
 - Java复习整理 day01
			
练习代码: 1 //这条语句说明这个Java文件在demo的包下 2 package demo1; 3 /** 4 * 5 * @author 王兴平 6 * 这个是第一个hello world 案例 ...