
curl cip.cc
检查终端是否处于代理状态info:Git走代理的方法:传送门
直接在终端运行下面的内容。
#走HTTP代理,用这个
export http_proxy="http://localhost:port"
export https_proxy="http://localhost:port"
#走socket5协议,用这个
export http_proxy="socks5://127.0.0.1:1080"
export https_proxy="socks5://127.0.0.1:1080"
#或者直接All in
export ALL_PROXY="socks5://127.0.0.1:1080"
info:如果嫌每次都需要执行命令麻烦,可以添加到
.bashrc
或.zshrc
文件中,使用source
命令刷新下配置文件就可以生效了。- 官方中国源:https://registry.docker-cn.com
- 网易源:http://hub-mirror.c.163.com
- 中科大源:https://docker.mirrors.ustc.edu.cn
- 阿里云(登陆,选择镜像加速):https://cr.console.aliyun.com/
修改方法
编辑/etc/docker/daemon.json
文件,如果有多个参数用,
隔开
{
"registry-mirrors": ["http://hub-mirror.c.163.com"]
}

#重启docker服务
systemctl restart docker.service
今天更新NanoPi neo2 软件包的时候,突然提示GPG error
没有公钥,无法验证签名。具体报错如下:

Reading package lists... Done
W: GPG error: http://mirrors.ustc.edu.cn xenial InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://mirrors.ustc.edu.cn xenial-backports InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://mirrors.ustc.edu.cn xenial-proposed InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://mirrors.ustc.edu.cn xenial-security InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
W: GPG error: http://mirrors.ustc.edu.cn xenial-updates InRelease: The following signatures couldn't be verified because the public key is not available: NO_PUBKEY 40976EAF437D05B5 NO_PUBKEY 3B4FE6ACC0B21F32
翻译过来就是GPG
错误,没有公钥,无法验证签名。
Hockeypuck OpenPGP keyserver,这个网站可以获取缺失的公钥。
命令如下(后面的40976EAF437D05B5
是你具体报错时提示缺失公钥的部分):
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 40976EAF437D05B5


在上一篇文章中,我们在debug模式下完整的跟踪程序走了一遍,对Tomcat start启动阶段所做的操作有了大概的了解。
这回,我们一起看看,Tomcat服务器接受到一个请求到处理这个请求之间经历了怎样的过程。

Servlet请求处理链路分析
- 一个servlet如何被tomcat处理的?
- servlet请求 -> 可以处理当前servlet请求的servlet实例 -> servlet.service()

在上一篇文章中我们知道Acceptor线程主要负责监听Socket嵌套字请求,并将其转给sekector(选择器)。
而poller线程,则负责检查sekector(选择器)中是否有数据到来的channel,如果有就进行处理。

所以Servlet请求处理链路中最重要的就是poller线程
,他负责控制这一系列的操作。