我有一个小型 EC2 Ubuntu 实例,它运行良好已超过 10 年,并且没有任何传入连接和传出连接问题。突然间简单的命令 sudo apt...
我有一个小型 EC2 Ubuntu 实例,它运行良好已超过 10 年,并且没有任何传入连接和传出问题。
突然间,一个简单的命令 sudo apt update
开始无法连接到存储库,如下所示:
无法启动与 eu-west-1.ec2.archive.ubuntu.com:80 (2a05:d018:fd:f302:55ec:6d1c:c751:1067) 的连接。- 连接 (101: 网络不可访问)
它是相当旧的 16 版本,因此使用最新的 Ubuntu 24 创建了新的 EC2 实例。最初一切都运行良好,但是在我安装了 Docker 之后,问题又出现了,现在我甚至无法从外面获取任何东西,它只是卡住直到超时:
wget http://google.com/ 正在解析 google.com (google.com)... 172.253.116.113, 172.253.116.138, 172.253.116.139, ...正在连接到 google.com (google.com)|172.253.116.113|:80... ^C
适当更新:
无法获取 https://download.docker.com/linux/ubuntu/dists/noble/InRelease 无法启动与 download.docker.com:443 (2600:9000:265e:0:3:db06:4200:93a1) 的连接。- 连接(101:网络不可达)
传入连接,例如 SSH 工作 w/p
AWS 控制台中的安全出站规则允许一切:
全部 全部 0.0.0.0/0
网络设置也很好,但问题再次出现在安装 Docker 之后(至少看起来是这样)
我也有本地的 Ubuntu 20 服务器,上面有 docker,它运行完美,尽管我做的和我在 EC2 实例上做的一模一样
我怀疑路由表存在一些混乱,但我没有 netstat 或其他网络工具,无法安装它们。
我设法收集的一些信息
sudo iptables -L -v -n
Chain INPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain FORWARD (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 DOCKER-USER 0 -- * * 0.0.0.0/0 0.0.0.0/0
0 0 DOCKER-ISOLATION-STAGE-1 0 -- * * 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- * docker0 0.0.0.0/0 0.0.0.0/0 ctstate RELATED,ESTABLISHED
0 0 DOCKER 0 -- * docker0 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- docker0 !docker0 0.0.0.0/0 0.0.0.0/0
0 0 ACCEPT 0 -- docker0 docker0 0.0.0.0/0 0.0.0.0/0
Chain OUTPUT (policy ACCEPT 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
Chain DOCKER (1 references)
pkts bytes target prot opt in out source destination
Chain DOCKER-ISOLATION-STAGE-1 (1 references)
pkts bytes target prot opt in out source destination
0 0 DOCKER-ISOLATION-STAGE-2 0 -- docker0 !docker0 0.0.0.0/0 0.0.0.0/0
0 0 RETURN 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain DOCKER-ISOLATION-STAGE-2 (1 references)
pkts bytes target prot opt in out source destination
0 0 DROP 0 -- * docker0 0.0.0.0/0 0.0.0.0/0
0 0 RETURN 0 -- * * 0.0.0.0/0 0.0.0.0/0
Chain DOCKER-USER (1 references)
pkts bytes target prot opt in out source destination
0 0 RETURN 0 -- * * 0.0.0.0/0 0.0.0.0/0
ip route
default via 172.31.32.1 dev enX0 proto dhcp src 172.31.35.63 metric 100
172.31.0.2 via 172.31.32.1 dev enX0 proto dhcp src 172.31.35.63 metric 100
172.31.32.0/20 dev enX0 proto kernel scope link src 172.31.35.63 metric 100
172.31.32.1 dev enX0 proto dhcp scope link src 172.31.35.63 metric 100
192.168.1.0/24 dev docker0 proto kernel scope link src 192.168.1.1 linkdown
curl -v http://google.com
* Host google.com:80 was resolved.
* IPv6: 2a00:1450:400b:c02::65, 2a00:1450:400b:c02::8b, 2a00:1450:400b:c02::8a, 2a00:1450:400b:c02::71
* IPv4: 209.85.203.139, 209.85.203.100, 209.85.203.102, 209.85.203.101, 209.85.203.138, 209.85.203.113
* Trying 209.85.203.139:80...
* Trying [2a00:1450:400b:c02::65]:80...
* Immediate connect fail for 2a00:1450:400b:c02::65: Network is unreachable
* Trying [2a00:1450:400b:c02::8b]:80...
* Immediate connect fail for 2a00:1450:400b:c02::8b: Network is unreachable
总结:10 年来,即使在安装 docker 后的新实例上,连接也没有问题——问题
如能提供任何关于如何解决问题的建议,我们将不胜感激
我正在尝试在 wsl2 中安装 burpsuite(我正在使用 xrdp 作为 gui),但是当我运行 burpsuite_pro_linux_v2024_5_5.sh 文件时出现此错误。我得到输出 Unpacking JRE ...Starting Installer ......
我正在尝试在 wsl2 中安装 burpsuite(我正在使用 xrdp 作为 gui),但是当我运行 burpsuite_pro_linux_v2024_5_5.sh 文件时出现此错误。我得到了输出
Unpacking JRE ...
Starting Installer ...
An error occurred:
java.lang.NoClassDefFoundError: Could not initialize class java.awt.GraphicsEnvironment$LocalGE
Error log: /tmp/install4jError10602838895390342344.log
java.lang.NoClassDefFoundError: Could not initialize class java.awt.GraphicsEnvironment$LocalGE
at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:106)
at java.desktop/sun.awt.X11.XToolkit.<clinit>(XToolkit.java:225)
at java.desktop/sun.awt.PlatformGraphicsInfo.createToolkit(PlatformGraphicsInfo.java:41)
at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:595)
at java.desktop/java.awt.Toolkit.getEventQueue(Toolkit.java:1489)
at java.desktop/java.awt.EventQueue.isDispatchThread(EventQueue.java:1089)
at com.install4j.runtime.installer.frontend.GUIHelper.invokeOnEDT(GUIHelper.java:436)
at com.install4j.runtime.installer.frontend.headless.AbstractHeadlessScreenExecutor.init(AbstractHeadlessScreenExecutor.java:83)
at com.install4j.runtime.installer.frontend.headless.ConsoleScreenExecutor.<init>(ConsoleScreenExecutor.java:25)
at com.install4j.runtime.installer.frontend.headless.InstallerConsoleScreenExecutor.<init>(InstallerConsoleScreenExecutor.java:6)
at com.install4j.runtime.installer.Installer.getScreenExecutor(Installer.java:97)
at com.install4j.runtime.installer.Installer.runInProcess(Installer.java:73)
at com.install4j.runtime.installer.Installer.main(Installer.java:50)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:84)
at com.install4j.runtime.launcher.UnixLauncher.start(UnixLauncher.java:71)
at install4j.Installer2990604421.main(Unknown Source)
Caused by: java.lang.ExceptionInInitializerError: Exception java.awt.AWTError: Can't connect to X11 window server using '192.168.1.100:3390' as the value of the DISPLAY variable. [in thread "main"]
at java.desktop/sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
at java.desktop/sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:105)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:319)
at java.desktop/sun.awt.X11GraphicsEnvironment.initStatic(X11GraphicsEnvironment.java:64)
at java.desktop/sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:59)
at java.desktop/sun.awt.PlatformGraphicsInfo.createGE(PlatformGraphicsInfo.java:37)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:93)
at java.desktop/java.awt.GraphicsEnvironment$LocalGE.<clinit>(GraphicsEnvironment.java:84)
at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:106)
at java.desktop/java.awt.Window.initGC(Window.java:492)
at java.desktop/java.awt.Window.init(Window.java:512)
at java.desktop/java.awt.Window.<init>(Window.java:554)
at java.desktop/java.awt.Frame.<init>(Frame.java:428)
at java.desktop/java.awt.Frame.<init>(Frame.java:393)
at com.install4j.runtime.installer.helper.InstallerUtil.initHeadless(InstallerUtil.java:598)
at com.install4j.runtime.installer.helper.InstallerUtil.isHeadless(InstallerUtil.java:588)
at com.install4j.runtime.installer.helper.InstallerUtil.getExecutionMode(InstallerUtil.java:553)
at com.install4j.runtime.installer.Installer.getScreenExecutor(Installer.java:86)
... 7 more
我尝试在谷歌上搜索错误,但没有看到有人尝试在 wsl2 中安装它