The directory tracking database is synchronized with Plesk using the Plesk XML-RPC API. Under certain circumstances, this API may produce errors that Patchman can't resolve or work around, and require manual action to solve within Plesk. If you think that directory synchronization isn’t working correctly, check the relevant logging in /var/log/patchman/patchman.log for more information.

This article lists some known error messages and resolutions. If you are encountering an error that is not listed here, please contact us and include the messages themselves.

API access is blocked

ERROR: Plesk returned error code 1006 in checkup phase
ERROR: Plesk response: '<?xml version="1.0"?>
	<packet version="1.6.6.0">
		<system>
			<status>error</status>
			<errcode>1006</errcode>
			<errtext>Access to API is disabled for 127.0.0.1</errtext>
		</system>	</packet>'
CODE

In this case, Plesk has been configured to not allow access to the Plesk API from localhost (127.0.0.1). This address is considered the default API availability and thus is what Patchman will try. There are two possible resolutions for this problem:

  1. Change the Plesk API ACL to allow requests from 127.0.0.1. In the Plesk interface, this can be found under Tools & Settings > IP Access Restriction Management > IP allow/deny list.

  2. Change the address Patchman uses to access the API. This approach is only useful if the API is made available on an external interface instead of an internal one - it won’t work if you made the API completely unavailable. To achieve this, add the following to /etc/patchman/patchman.ini (create the file if it doesn’t exist yet):

    [plesk]
    api_address=<IP>
    CODE

    Afterwards, reload the settings in Patchman using service patchman reload.

Timeout

ERROR: Could not query Plesk, Timeout was reached
CODE

The Plesk API is not responding fast enough. It is strongly recommended to check if Plesk is working correctly; the default timeout for Patchman is 15 minutes, so if the API is indeed slower than that, it is probably having performance problems. Also note that the longer such interaction takes, the more it will delay other routine tasks like scans and definition updates.

If you really want to increase the timeout, add the following to /etc/patchman/patchman.ini (create the file if it does not exist yet):

[plesk]
api_timeout=<timeout in seconds>
CODE

Afterwards, reload the settings in Patchman using service patchman reload.

Domain.php errors

ERROR: Call to a member function isDefault() on null (Domain.php:748)
CODE

This problem is caused by database inconsistency in the Plesk database, particularly in PHP setting configuration. You can fix this problem by manually running the following command (as root), executing a fixing query on the Plesk backend database:

plesk db "insert into PhpSettings (id, noteId) (select value, 0 from SubscriptionProperties where name = 'phpSettingsId' and value not in (select id from PhpSettings));"
CODE

In older versions of patchman-client, this error was incorrectly ignored and various directories and users may not have been synchronized to the Patchman directory tracking database. Starting with version 1.5.0, this error produces failure warnings in the Patchman logfile (/var/log/patchman/patchman.log) for the directory synchronization task.

API version is too old

ERROR: Plesk returned error code 1005 in checkup phase
ERROR: Plesk response: '<?xml version="1.0"?>
	<packet version="1.6.6.0">
		<system>
			<status>error</status>
			<errcode>1005</errcode>
			<errtext>Protocol version '1.6.6.0' is not supported. Current protocol version is '1.6.3.5'</errtext>
		</system>	</packet>'
CODE

Your version of Plesk is too old for Patchman integration. Please refer to What are the minimal requirements for running Patchman?