• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.

Problem to create with RPC API

R

RPerez

Guest
Hello,

When sending the package the following error occurs:

error
Code: 2204
Unable to update hosting preferences. system user update is failed: Some fields are empty or contain an improper value. ('login' = 'testtotest') Incorrect fields: "login".


I am using the scenario below:
- Plesk Panel 8.4 for Linux
- RPC Protocol 1.5.2.1

XML Package

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.5.2.1">
<domain>
<add>
<gen_setup>
<name>totest.com</name>
<htype>vrt_hst</htype>
<ip_address>10.10.10.0</ip_address>
<status>0</status>
</gen_setup>
<hosting>
<vrt_hst>
<property>
<name>ftp_login</name>
<value>testtotest</value>
</property>
<property>
<name>ftp_password</name>
<value>ader4Esd</value>
</property>
<ip_address>10.10.10.0</ip_address>
</vrt_hst>
</hosting>
<user>
<enabled>true</enabled>
<password>ader4EsdX</password>
<cname>Company Test</cname>
<pname>My Name</pname>
<phone>01 45 5555555</phone>
<fax/>
<email>mytest@mydomain.com</email>
<address>My Address, 10</address>
<city>my City</city>
<state/>
<pcode/>
<country>BR</country>
<multiply_login>false</multiply_login>
<perms>
<permission>
<name>manage_phosting</name>
<value>true</value>
</permission>
<permission>
<name>manage_quota</name>
<value>true</value>
</permission>
<permission>
<name>manage_subdomains</name>
<value>true</value>
</permission>
<permission>
<name>manage_dns</name>
<value>true</value>
</permission>
<permission>
<name>manage_crontab</name>
<value>true</value>
</permission>
<permission>
<name>manage_webapps</name>
<value>true</value>
</permission>
<permission>
<name>make_dumps</name>
<value>true</value>
</permission>
<permission>
<name>manage_drweb</name>
<value>true</value>
</permission>
<permission>
<name>manage_ftp_password</name>
<value>true</value>
</permission>
<permission>
<name>manage_domain_aliases</name>
<value>true</value>
</permission>
</perms>
</user>
</add>
</domain>
</packet>


Please help me, the same package works in Plesk 8.4 for Windows.
 
says you're using an invalid element right there, with "login". That might need to be something else, like client maybe? I havent touched the RPC stuff in a while so I dont know for sure, have you looked at the RPC API docs on swdn.swsoft.com for linux?
 
Yes already looked at swdn.swsoft.com and is correct.
I do not know this because he presents such a mistake, I followed all the steps indicated.
 
I´m Use the RPC API with a valid login client.
It creates the field on the control panel as the template but fails to define the settings for hosting.
I use the XML similar in Plesk 8.4 for Windows and works perfectly.
 
This is what I used for a 1000 domain insert using the API - its a little less complex then yours is but hopefully it will help

PHP:
            sb.Append("<packet version=\"1.4.2.0\">");
            sb.Append("<domain>");
            sb.Append("<add>");
            sb.Append("   <gen_setup>");
            sb.AppendFormat("      <name>{0}</name>", _Domain);
            sb.AppendFormat("      <client_id>{0}</client_id>", _ClientID);
            sb.Append("      <htype>vrt_hst</htype>");
            sb.AppendFormat("      <ip_address>{0}</ip_address>", _ClientIP);
            sb.Append("      <status>0</status>");
            sb.Append("   </gen_setup>");
            sb.Append("                 <hosting>");
            sb.Append("                    <vrt_hst>");
            sb.AppendFormat("                        <ftp_login>{0}</ftp_login>", FTPUser);
            sb.AppendFormat("                        <ftp_password>{0}</ftp_password>", FTPPassword);
            sb.Append("                       <php>true</php>");
            sb.Append("                        <php_safe_mode>true</php_safe_mode>");
            sb.AppendFormat("                         <ip_address>{0}</ip_address>", _ClientIP );
            sb.Append("                     </vrt_hst>");
            sb.Append("                  </hosting>");
            sb.Append("</add>");
            sb.Append("</domain>");
            sb.Append("</packet>");

My guess would be the ftp_login / ftp_password nodes are missing but I could be wrong.
 
I am having this same problem, with 8.6.0 for linux. The same packet to our windows platform does not produce an issue.

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.4.2.0">
<domain>
<add>
<result>
<status>error</status>
<errcode>2204</errcode>
<errtext>Unable to update hosting preferences. system user update is failed: Some fields are empty or contain an improper value. ('login' = 'EntAbc24') Incorrect fields: "login".</errtext>
</result>
</add>
</domain>
</packet>


Request:

Code:
<?xml version="1.0" encoding="utf-16"?>
<packet version="1.4.2.0">
  <domain>
    <add>
      <gen_setup>
        <name>EnterpriseLin21.gov</name>
        <client_id>2</client_id>
        <htype>vrt_hst</htype>
        <ip_address>***.***.***.***</ip_address>
        <status>0</status>
      </gen_setup>
      <hosting>
        <vrt_hst>
          <ftp_login>EntAbc21</ftp_login>
          <ftp_password>pass27</ftp_password>
          <ftp_quota>21474836480</ftp_quota>
          <ssl>false</ssl>
          <shell />
          <php>true</php>
          <php_isapi>false</php_isapi>
          <ssi>true</ssi>
          <ssi_html>true</ssi_html>
          <cgi>true</cgi>
          <mod_perl>true</mod_perl>
          <mod_python>true</mod_python>
          <asp>true</asp>
          <asp_dot_net>false</asp_dot_net>
          <managed_runtime_version>2.0</managed_runtime_version>
          <webstat>awstats</webstat>
          <webstat_protected>true</webstat_protected>
          <errdocs>true</errdocs>
          <wuscripts>true</wuscripts>
          <at_domains>true</at_domains>
          <sb_publishing>false</sb_publishing>
          <php_safe_mode>false</php_safe_mode>
          <iis-app-pool>true</iis-app-pool>
          <fastcgi>true</fastcgi>
          <php-version>5</php-version>
          <create-sb-subdomains>false</create-sb-subdomains>
          <ip_address>6***.***.***.***</ip_address>
        </vrt_hst>
      </hosting>
      <limits>
        <max_webapps>-1</max_webapps>
        <max_maillists>-1</max_maillists>
        <max_resp>-1</max_resp>
        <max_mg>-1</max_mg>
        <max_redir>-1</max_redir>
        <mbox_quota>-1</mbox_quota>
        <max_box>-1</max_box>
        <max_db>-1</max_db>
        <max_wu>-1</max_wu>
        <max_traffic>536870912000</max_traffic>
        <disk_space>21474836480</disk_space>
        <max_subdom>-1</max_subdom>
        <expiration>-1</expiration>
        <max_dom_aliases>-1</max_dom_aliases>
      </limits>
      <prefs>
        <www>true</www>
        <stat_ttl>36</stat_ttl>
      </prefs>
      <user>
        <enabled>true</enabled>
        <password>pass27</password>
        <cname />
        <pname />
        <phone />
        <fax />
        <email>test@123.com</email>
        <address />
        <city />
        <state />
        <pcode />
        <country>US</country>
        <multiply_login>true</multiply_login>
        <perms>
          <manage_phosting>false</manage_phosting>
          <manage_quota>false</manage_quota>
          <manage_subdomains>true</manage_subdomains>
          <manage_not_chroot_shell>false</manage_not_chroot_shell>
          <manage_dns>true</manage_dns>
          <manage_log>true</manage_log>
          <manage_crontab>true</manage_crontab>
          <manage_anonftp>true</manage_anonftp>
          <manage_webapps>false</manage_webapps>
          <manage_sh_access>false</manage_sh_access>
          <manage_maillists>true</manage_maillists>
          <manage_drweb>false</manage_drweb>
          <make_dumps>true</make_dumps>
          <site_builder>false</site_builder>
          <manage_performance>false</manage_performance>
          <manage_domain_aliases>true</manage_domain_aliases>
          <manage_iis_app_pool>false</manage_iis_app_pool>
          <dashboard>true</dashboard>
          <stdgui>true</stdgui>
          <manage_dashboard>true</manage_dashboard>
          <manage_subftp>true</manage_subftp>
          <manage_spamfilter>true</manage_spamfilter>
          <allow_local_backups>false</allow_local_backups>
          <allow_ftp_backups>false</allow_ftp_backups>
        </perms>
      </user>
    </add>
  </domain>
</packet>
 
It ended up being the fact that fp_username was not all lower-case.
 
Back
Top