When RDS Custom instances are configured with dual network interface cards (eth0 and eth1), automatic operating system updates might cause network exceptions. This topic describes methods to handle and prevent such issues.
Handling method
If you have encountered this issue, you can execute the /etc/rds_custom_init.sh script to initialize the network. This initialization process will not restart the instance.
Connect to the RDS Custom instance.
Log on to the RDS Management Console, click RDS Custom > Instances in the navigation pane on the left, and then select a region at the top.
Click the instance ID to go to the instance details page.
Click Remote Connection in the upper-right corner, and then click Log On on the page that appears.

On the VNC page, log on to the RDS Custom instance as the root user with the password.
Execute the
sudo /etc/rds_custom_init.shscript to initialize the network.
Prevention methods
Ubuntu operating system
In RDS Custom instances with Ubuntu operating system, when the instance is configured with dual network interface cards (eth0 and eth1), the Advanced Package Tool (APT) will trigger an automatic system restart when systemd is automatically upgraded. This restart might cause the network service to restart, resulting in route loss and network exceptions.
You can effectively prevent system restarts caused by automatic updates and avoid network exceptions by disabling automatic system updates. Take Ubuntu 24.04 64-bit operating system as an example:
Connect to the RDS Custom instance.
Log on to the RDS Management Console, click RDS Custom > Instances in the navigation pane on the left, and then select a region at the top.
Click the instance ID to go to the instance details page.
Click Remote Connection in the upper-right corner, and then click Log On on the page that appears.

On the VNC page, log on to the RDS Custom instance as the root user with the password.
Disable the
unattended-upgradesservice.#Stop the currently running unattended-upgrades service sudo systemctl stop unattended-upgrades #Disable automatic startup sudo systemctl disable unattended-upgradesModify the automatic update configuration file.
Edit the automatic update configuration file
/etc/apt/apt.conf.d/20auto-upgrades.vi /etc/apt/apt.conf.d/20auto-upgradesModify the configuration file to the following content to disable all automatic update functions.
APT::Periodic::Update-Package-Lists "0"; APT::Periodic::Unattended-Upgrade "0";
Disable systemd scheduled tasks.
List all APT-related systemd timers.
systemctl list-timers | grep apt # or systemctl list-unit-files | grep aptReturn result:
apt-daily-upgrade.service static - apt-daily.service static - apt-news.service static - apt-daily-upgrade.timer enabled enabled apt-daily.timer enabled enabledDisable and stop the related timers. For example:
sudo systemctl stop apt-daily.timer sudo systemctl disable apt-daily.timer sudo systemctl stop apt-daily-upgrade.timer sudo systemctl disable apt-daily-upgrade.timerExecute the following commands to confirm that the related timers have been stopped and disabled.
systemctl status apt-daily.timer systemctl status apt-daily-upgrade.timer
Disable cron scheduled tasks.
Execute the following commands to check cron scheduled tasks.
sudo cat /etc/cron.daily/apt sudo cat /etc/cron.weekly/apt.updateIf cron scheduled tasks exist, comment out the relevant entries to disable the task. For example:
# #!/bin/sh # apt-get -y update # apt-get -y upgrade
Other operating systems
Take CentOS 7.8 as an example. For other operating systems, make corresponding adjustments according to their versions.
Connect to the RDS Custom instance.
Log on to the RDS Management Console, click RDS Custom > Instances in the navigation pane on the left, and then select a region at the top.
Click the instance ID to go to the instance details page.
Click Remote Connection in the upper-right corner, and then click Log On on the page that appears.

On the VNC page, log on to the RDS Custom instance as the root user with the password.
Execute the following command to check whether the yum-cron service is enabled.
sudo systemctl status yum-cronIf it is enabled, execute the following commands to stop the currently running yum-cron service.
# Stop the currently running yum-cron service sudo systemctl stop yum-cron # Disable automatic startup sudo systemctl disable yum-cronCheck and close the cron service.
grep yum /etc/crontab /etc/cron.d/*If cron tasks exist, comment out the relevant entries to disable the task. For example:
# 0 */4 * * * root /usr/sbin/yum-cron