ee

最近系统升级到22.04LTS之后,chrome总是提示连接中断,一开始以为是系统升级的原因,坐等chrome修复。

等了一段时间,chrome更新了好几次,问题依然存在,估计不是软件问题了。

1 先试着清理浏览器DNS缓存:

chrome://net-internals/#dns

2 还不行再清理操作系统的DNS缓存

Windows系统:

CMD(以管理员身份运行):ipconfig /flushdns

Ubuntu系统:

systemd-resolved.service用于运行DNS查询和维护DNS缓存

Flush the DNS settings

  • 检查服务状态:sudo systemctl status systemd-resolved
  • 检查DNS缓存统计信息:sudo systemd-resolve --statistics

报错systemd-resolve: command not found

解决方式一:

 Ubuntu 22.04 

suggestion that "resolvectl" can be used instead of "systemd-resolve"

Creating a symbolic link like below

ln -s /usr/bin/resolvectl /usr/bin/systemd-resolve

解决方式二

# 我用的是方式一

apt install systemd

  • 清除上的DNS缓存:sudo systemd-resolve --flush-caches
  • 清除所有缓存统计信息:sudo systemctl restart systemd-resolved

补充:

经本人亲测,然而以上并没有任何作用

一次偶然的机会,发现这跟计算机的代理设置有关系,ubuntu系统不知道什么时候把web代理关闭了,将代理改为“自动代理”,问题解决。

Ubuntu如下:

Win10如下:

Logo

有“AI”的1024 = 2048,欢迎大家加入2048 AI社区

更多推荐