Symptoms
- Unable to create a server-wide or configurations-only backup at Tools & Settings > Backup Manager. One of the following errors is shown:
ERROR: () Unable to check the amount of free disk space: Argument 2 passed to PleskOsUnix::relativePath() must be of the type string, null given, called in /opt/psa/admin/plib/backup/Agent/ContentLocator/Unix.php on line 123
Warning: Domain "example.com"
Unable to back up website. Error: Argument 2 passed to PleskOsUnix::relativePath() must be of the type string, null given, called in /usr/local/psa/admin/plib/backup/Agent/Dumper/HostingInfo.php on line 112'
- It's not possible to access Domains > example.com > Hosting Settings with the following error:
Server Error
500 PleskFatalException
Full path is undefined
Cause
Database inconsistency - there are no records for the example.com domain in the psa.hosting
table:
# mysql > select * from hosting where dom_id in (select id from domains where name ="example.com");
Empty set (0.000 sec)
Resolution
Apply one of the following solutions:
Remove the domain from Plesk
1. Log into Plesk
2. Navigate to the Domains list
3. Select the example.com domain and click Remove
Recreate the database record manually
1. Connect to the Plesk server via SSH
2. Back up the Plesk database:
# plesk db dump > backup.sql
3. Access the Plesk database:
# plesk db
4. Identify the domain's ID from the domains
table:
# MariaDB [psa]> select id from domains where name="example.com";
+------+
| id |
+------+
| 11 |
+------+
1 row in set (0.12 sec)
5. Identify the domain's system user ID from the sys_users
table:
# MariaDB [psa]> select id from sys_users where login="example-user";
+------+
| id |
+------+
| 22 |
+------+
1 row in set (0.12 sec)
6. Recreate the record in the hosting
table using the data collected earlier:
# MariaDB [psa]> insert into hosting(dom_id,sys_user_id,www_root) values(11,22,"/var/www/vhosts/example.com/httpdocs");
Note: /var/www/vhosts/example.com/httpdocs
is the default document root path in Plesk. It can be changed to a custom one if necessary
7. Run the following command to repair the document root structure:
# plesk bin repair --update-vhosts-structure
8. Navigate to Domains > example.com > Hosting Settings and set all the required options in order not to leave them empty