Add Cloud Assistant endpoint IP addresses to the hosts file to restore DNS resolution when custom DNS settings break it.
Use cases
Cloud Assistant requires access to its service endpoints to run commands on ECS instances. The default DNS nameserver on ECS instances resolves these endpoints without additional configuration.
If you overwrite the default DNS nameserver settings, endpoint resolution may fail or slow down, making Cloud Assistant unavailable. In this case, manually configure DNS resolution to restore Cloud Assistant.
Run the following command for your OS to check the current DNS nameserver. If the output shows non-default settings, configure DNS resolution for Cloud Assistant.
Linux instance
Run the cat /etc/resolv.conf command to view the DNS nameserver settings.

Windows instance
Run the nslookup command in Windows PowerShell to view the DNS nameserver settings.

Procedure
Linux instance
-
Obtain the IP addresses that correspond to Cloud Assistant endpoints.
Cloud Assistant uses the following endpoints:
-
Command execution:
<region-id>.axt.aliyun.com -
Plug-in and update packages:
aliyun-client-assist-<region-id>.oss-<region-id>-internal.aliyuncs.comNoteReplace <region-id> with your region ID. See Regions and zones.
For example, to obtain the endpoint IP addresses for the China (Beijing) region, run the following commands:
ping -c 4 cn-beijing.axt.aliyun.com ping -c 4 aliyun-client-assist-cn-beijing.oss-cn-beijing-internal.aliyuncs.com
-
-
Modify the hosts file.
echo "100.100.XX.XX cn-beijing.axt.aliyun.com" >> /etc/hosts && \ echo "100.118.XX.XX aliyun-client-assist-cn-beijing.oss-cn-beijing-internal.aliyuncs.com" >> /etc/hostsNoteReplace
100.100.XX.XXand100.118.XX.XXwith the IP addresses that you obtained in Step 2. -
Verify the hosts file update.
cat /etc/hostsThe output shows the updated hosts file entries.
The instance now resolves Cloud Assistant endpoints using the IP addresses in the hosts file.
Windows instance
-
Obtain the Cloud Assistant endpoint IP addresses.
Cloud Assistant uses the following endpoints:
-
Command execution:
<region-id>.axt.aliyun.com -
Plug-in and update packages:
aliyun-client-assist-<region-id>.oss-<region-id>-internal.aliyuncs.comNoteReplace <region-id> with your region ID. See Regions and zones.
For example, to obtain the endpoint IP addresses for the China (Beijing) region, run the following commands in Windows PowerShell:
ping cn-beijing.axt.aliyun.com ping aliyun-client-assist-cn-beijing.oss-cn-beijing-internal.aliyuncs.com
-
-
Run the following commands in Windows PowerShell to modify the hosts file:
"100.100.XX.XX cn-beijing.axt.aliyun.com" | Add-Content C:\Windows\System32\drivers\etc\hosts "100.118.XX.XX aliyun-client-assist-cn-beijing.oss-cn-beijing-internal.aliyuncs.com" | Add-Content C:\Windows\System32\drivers\etc\hostsNoteReplace
100.100.XX.XXand100.118.XX.XXwith the IP addresses that you obtained in Step 2. -
Verify the hosts file update.
cat C:\Windows\System32\drivers\etc\hostsThe output shows the updated hosts file entries.

The instance now resolves Cloud Assistant endpoints using the IP addresses in the hosts file.
