Applicable to:
- Plesk for Linux
Symptoms
- Even if a specific IP address has been set as the main one, it reverts to the previous one after a server reboot.
- The main IP address was added to the server through Plesk, and its config is in
/etc/netplan/10-plesk.yaml
.
Cause
This is caused by race conditions at server boot. The main IP address hasn't been assigned to the network interface when Plesk looks for it, so it can't find it.
Resolution
To fix the issue, the system should be configured to assign the IP address first, so Plesk can detect it in time. One possible way to do this is to set the IP address in the main configuration file, instead of /etc/netplan/10-plesk.yaml
Note: The following instructions are for a server running netplan
. Exact steps, network interfaces, and configuration files may differ. Contact a network administrator for help if unsure.
-
Turn the desired IP address into the main one once again: How to change the main (primary) IP address in Plesk for Linux
-
Get the contents from
/etc/netplan/10-plesk.yaml
and note down the IP address' interface (in this case,ens5
)# cat /etc/netplan/00-installer-config.yaml
ethernets:
ens5:
addresses:
- 203.0.113.2/32 -
Edit the main configuration file (in this example,
00-installer-config.yaml
)# vi /etc/netplan/00-installer-config.yaml
-
Enter the IP address in the appropriate interface. For example:
network:
ethernets:
ens5:
dhcp4: true
dhcp6: true
match:
macaddress: 02:39:9e:56:d2:09
set-name: ens5
addresses:
- 203.0.113.2/32
version: 2 -
Move
/etc/netplan/10-plesk.yaml
to some other location on the server as a backup# mv /etc/netplan/10-plesk.yaml /root/
Comments
0 comments
Please sign in to leave a comment.