• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Question How to change main IP ?

Alexander Grein

New Pleskian
I have updated a plesk system from 12.5 to 17.5 on a clone of my main system, to make sure everything work fine after it.

This cloned system has an other main ip than the original system, so I need to change the main IP address inside plesk to be able to do my tests.

My first step was to open the IP-Address-Settings inside plesk and pressing the "reread IP-Address" buttons.
Because of a missing function to change the IP-Address of all webhostings to the new IP, I start a google search and found an article about doing this over the command line.

After starting /usr/local/psa/bin/reconfigurator.pl ip_map.txt and editing the generated ip_map.txt I get this error:
xxx.xx.xxx.xx: address is already used by Plesk
ip_map.txt: 1 conflicts found

After an other google search, I found an article, which means I do have to delete this new IP first, to get I running, if I already added it inside plesk (like I did).
So I used my database management tool and deleted the corresponding entry in the IP_Addresses table of the psa database.
After this step, I started /usr/local/psa/bin/reconfigurator.pl ip_map.txt again, and now I get this error:
xxx.xx.xxx.xx: cannot delete main IP on interface
/opt/psa/admin/bin/ifmng --del 185.21.101.80: exited with non-zero code 256

Any ideas, how I can solve this problem?
 
The ip adressess you change to with reconfigurator.pl should not be on the server. the script adds them to your server.

you need to add the ip back to the table where you deleted it.
make sure you only have the old ip adressess at the plesk ip address list, remove the new from the server via ssh if needed and re-read in plesk.

then generate a new ip_map.txt, add the new ip addresses and run reconfigurator.pl again. Please notice that on czentos, the newly added ip addresses are not configured to start at boot, you need that to configure yourself after.

Tip:
I always give the ip map the name aaaaip.txt, that way it sits at the top of the map when navigating the server with something like mc to edit it.

more here

How to replace IP addresses in Plesk for Linux

Make sure that the new IP addresses are not registered in Plesk on the Plesk > Tools & Settings > IP Addresses page. If they are, remove them before proceeding further.

Regards
Jan
 
I aleady readed such kind of instructions, but they doesn't work for me (or I missunderstand something).

One think I do not know is, how and where exactly I have to delete which IPs.

Meanwhile I changed the main IP direct in the IP_Addresses table and it seams to work for my tests.

Next time I will start the pl-script first.
 
Last edited:
Back
Top