Documentation
Program Cannot Start
Fix DNS resolution issues when RustMinerSystem fails to fetch server config during startup with dns error or failed to lookup address information.
Program Cannot Start
If RustMinerSystem imports the configuration file successfully but then fails while fetching the server configuration, and the log contains dns error or failed to lookup address information, the server DNS configuration is usually not being read correctly by the program.
Symptoms
Startup logs may look like:
2026-06-11T04:19:04.752316Z INFO 开始 -- 导入配置文件
2026-06-11T04:19:04.754894Z INFO 结束 -- 导入配置文件
2026-06-11T04:19:14.764676Z ERROR msg="[Service] Get Server Config Failed reqwest::Error { kind: Request, url: \"https://api.rustpool.pro/4.6.7/config/121\", source: hyper_util::client::legacy::Error(Connect, ConnectError(\"dns error\", Custom { kind: Uncategorized, error: \"failed to lookup address information: Try again\" })) }"
Error: "[Service] Get Server Config Failed reqwest::Error { kind: Request, url: \"https://api.rustpool.pro/4.6.7/config/121\", source: hyper_util::client::legacy::Error(Connect, ConnectError(\"dns error\", Custom { kind: Uncategorized, error: \"failed to lookup address information: Try again\" })) }"
Cause
This is a DNS resolution issue. When RustMinerSystem uses the Rust networking stack to resolve DNS, it reads the resolver configuration from /etc/resolv.conf and does not continue looking up DNS through an upstream temporary resolver configuration.
Because /etc/resolv.conf is often a temporary DNS configuration file, the program may still fail to resolve api.rustpool.pro even after DNS has been configured correctly on the system, unless /etc/resolv.conf points to the effective resolver configuration.
Recovery
After confirming that DNS is configured correctly on the server, point /etc/resolv.conf to the active systemd-resolved resolver configuration:
sudo rm /etc/resolv.conf
sudo ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
Restart RustMinerSystem and check whether Get Server Config Failed and dns error still appear in the startup log.
