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(即通信前两方都须要知道相应 ...
随机推荐
- ubuntu更新下载软件卡住0% [Connecting to archive.ubuntu.com (2001:67c:1360:8001::23)]
一台ubuntu系统,查看硬件和配置环境的时候发现下载卡住了 根据提示就是有ipv6地址,系统也是配置了ipv6地址的.海外机器,而且可以ping通域名 最佳解决方案 我想出了如何让apt-get再次 ...
- Optimal asymmetric encryption padding 最优非对称加密填充(OAEP)
SubtleCrypto.decrypt() - Web APIs | MDN https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypt ...
- C++ Primer Plus读书笔记(一)开始学习C++
1.using namespace std; 注意一下命名空间的概念,不编译这句话,可能就要用 std::cout << std::endl 这种写作方式了. 这句话放在函数内部,只对该 ...
- JavaScript代码是怎么执行的?
前言 众所周知,JavaScript是单线程语言.所以JavaScript是按顺序执行的! 先编译再执行 变量提升 请看下面的例子: console.log(cat) catName("Ch ...
- 误删eth1或者 eth0
不小心把机房,eth1删除了,过2天还演示,折腾一下午.... 首先eth1存在地方是2块./etc/sysconfig/network-scripts/下 /et/sysconfig/network ...
- Openstack (keystone 身份认证)
keystone简介 keystone 是OpenStack的组件之一,用于为OpenStack家族中的其它组件成员提供统一的认证服务,包括身份验证.令牌的发放和校验.服务列表.用户权限的定义等等.云 ...
- Flink-v1.12官方网站翻译-P013-Timely Stream Processing
及时的流处理 介绍 及时流处理是有状态流处理的一种扩展,其中时间在计算中起着一定的作用.其中,当你做时间序列分析时,当做基于某些时间段(通常称为窗口)的聚合时,或者当你做事件处理时,事件发生的时间很重 ...
- Jenkins开启丢弃旧的构建?你可要小心啊!
玩Devops的小伙伴应该对Jenkins都有了解. Github上16.8k的Star的项目,1500+的构建.发布等自动化插件可供选择,事实上的业界CICD标准领导者. JFrog.Coding等 ...
- 《进击吧!Blazor!》第一章 4.数据交互
<进击吧!Blazor!>是本人与张善友老师合作的Blazor零基础入门系列视频,此系列能让一个从未接触过Blazor的程序员掌握开发Blazor应用的能力. 视频地址:https://s ...
- TDH社区版搭建总结
在安装之前需要对docker分区进行格式化处理: Redhat/CentOS 在Redhat/CentOS上,docker分区必须采用XFS格式,实现的步骤如下: 1. 创建目录/var/lib/do ...