Symptoms
- The following error occurs on attempt to create a customer via Customers > Create a customer
Call to a member function getIpAddressStruct() on null (IpAddressesSelector.php:169)
- In
following records might be found:
/usr/local/psa/admin/logs/panel.log
PHP Fatal error: Call to a member function getIpAddressStruct() on null in /usr/local/psa/admin/plib/CommonPanel/Form/IpAddressesSelector.php on line 169
ERR [1] ERROR: Call to a member function getIpAddressStruct() on null (IpAddressesSelector.php:169)
Cause
Database inconsistency.
Resolution
- Log into the server via SSH.
- Create a backup of Plesk database:
# MYSQL_PWD=`cat /etc/psa/.psa.shadow` mysqldump psa -uadmin > psa_current.sql
- 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 - Run plesk repair utility:
# plesk repair db -y -verbose