• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Resolved API RPC - Creating Subscription Error

J8643

New Pleskian
Hi,

I'm having trouble creating a new subscription on the plesk api. Below is the packet format I'm sending:

<packet version="1.6.5.0">
<webspace>
<add>
<gen_setup>
<name>example.co.uk</name>
<owner-id>{ownerid}</owner-id>
<owner-login>{owner}</owner-login>
<ip_address>{iphere}</ip_address>
<status>0</status>
</gen_setup>
</add>
</webspace>
</packet>

The error code I'm receiving is 1023 with the message "Operation in POA failed: [no error code] Unable to find the webspace with ID 0."

I'm not sure why it's trying to find a webspace when I'm trying to add one? I'm logged in on an admin account and am trying to assign the subscription to that admin.
 
Most probably

<hosting>
...
</hosting>

should be specified.
 
Hi Igor,

I've added the following below the gen_setup node but am still getting the same result:

<hosting>
<vrt_hst>
<property>
<name>ftp_login</name>
<value>{login}</value>
</property>
<property>
<name>ftp_password</name>
<value>{password}</value>
</property>
<ip_address>{ip_address}</ip_address>
</vrt_hst>
</hosting>
 
Hi Igor,

An update on this, it turns out even when it returns the "Operation in POA failed: [no error code] Unable to find the webspace with ID 0." error, it is still creating the website in plesk, it just isn't associating any hosting with it (despite me specifying hosting now).
 
I assume that it may be related to some kind of database inconsistency. Therefore I'd suggest you try to run

plesk repair db

and check if it helps.
 
Hi IgorG,

I tried running

Code:
plesk repiar db

and

Code:
plesk db repair

But it doesn't look like those commands work with the plesk automation management node.

Error message below.

Code:
[root@ppa ~]# plesk repiar db
Usage: plesk db [command|sql]

Execute database specific command.
Open MySQL console if no particular command was supplied.
Run an SQL query if 'sql' is provided instead of command.

Additional commands:
  tables - Show the list of existing database tables
  dump [databases] - Show a dump of the specified Plesk database(s)
                     (the psa database dump is shown by default)
  desc <table> - Show a structure of the specified database table
  show <table> - Show content of the specified database table

The above then pointed me to running
Code:
 plesk db repair
which returned the below.

Code:
[root@ppa ~]# plesk db repair
ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
 
Hi J8643,

pls. note, that the correct typo will definetly lead to some success:

The "Plesk repair utility" is called with the command:

plesk repair

... where you have several options ( pls. read the Plesk documentation at "https://docs.plesk.com/en-US/12.5/a...sk-administration/plesk-repair-utility.74649/" ).
Consider as well to use the "--help" string in your commands, which will list possible command options.

plesk repair --help

Please note as well, that the "Plesk repair utility" is a Plesk 12.0 and above feature.




The command "plesk db" will just connect you to your MySQL - Database and additional command strings must be a correct SQL syntax... "repair" is not a SQL - syntax, which you could see, when you use for example the command "plesk db help"
 
Back
Top