How to change the IP address for domains/clients/resellers in Plesk for Linux?

Follow

Comments

8 comments

  • Avatar
    Farid Bestenli

    I already have the new ip address registered in plesk but i can't delete it. So what's the solution?

    Error: Cannot remove the IP address 192.168.x.x because it is used by an active session. Cannot remove the IP address 192.168.x.x because it is the primary IP address of a network interface.

    0
    Comment actions Permalink
  • Avatar
    Farid Bestenli

    Update: I managed to delete the ip address using the commands:

    # plesk db

    # delete from IP_Addresses where ip_address='192.168.x.x';
    0
    Comment actions Permalink
  • Avatar
    Ivan Postnikov

    Hello @Farid, thank you for sharing your user experience.

    The recommended way is to, at first, change the interface primary IP.

    Please, check this article for the reference.

    0
    Comment actions Permalink
  • Avatar
    John Bertin

    I get the following error; 

    sh: 2: Syntax error: newline unexpected

    1
    Comment actions Permalink
  • Avatar
    Alexandr Bashurov

    @John Bertin

    Please, try running this command instead:

    for i in $(plesk bin subscription -l); do plesk bin subscription -u "$i" -ip <ip_address>; done
    0
    Comment actions Permalink
  • Avatar
    JP Kelly

    When I try this it hangs after updating one subscription. If I 'command C' out of the loop and try again it does the next subscription but this is very tedious. Any ideas?

    0
    Comment actions Permalink
  • Avatar
    Maxim Krasikov

    Hi @JP Kelly,

    Please make sure that the command was fully copied:

    for i in $(plesk bin subscription -l); do plesk bin subscription -u $i -ip <ip_address>; done

    If it is not helpful, try executing an alternative command:

    MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysql -Ns -uadmin -D psa -e 'select name from domains' | awk '{print "/usr/local/psa/bin/domain --update " $1 " -ip <ip_address> "}' | sh

     

    Alternatively, submit a ticket to Plesk support in order to check if there is a misconfiguration from the server side:
    https://support.plesk.com/hc/en-us/requests/new

     

    0
    Comment actions Permalink
  • Avatar
    Ehud Ziegelman

    This article does NOT work well

    Please test it and fix the steps to be taken.

     

    0
    Comment actions Permalink

Please sign in to leave a comment.

Have more questions? Submit a request