Plesk

Unable to create a customer: Call to a member function getIpAddressStruct() on null (IpAddressesSelector.php:169)

Symptoms

Cause

Database inconsistency.

Resolution

  1. Log into the server via SSH.
  2. Create a backup of Plesk database:

    # MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump psa -uadmin > psa_current.sql

  3. Use the following command to find the inconsistency:

    # plesk repair db -n -verbose

    The output as following might be seen:

    Inconsistency in the table 'ip_pool' for the column ip_address_id:
    No rows in the table 'IP_Addresses' with = 1 (5 broken references) [WARNING]
    Broken references in table 'ip_pool':
    *************************** 1. row ***************************
    id: 1
    ip_address_id: 1
    type: shared
    Inconsistency in the table 'IpAddressesCollections' for the column
    ipAddressId: No rows in the table 'IP_Addresses' with = 1 ........ [WARNING]
    Broken references in table 'IpAddressesCollections':
    *************************** 1. row ***************************
    ipCollectionId: 673
    ipAddressId: 1

  4. Run plesk repair utility:

    # plesk repair db -y -verbose