1. Please take a little time for this simple survey! Thank you for participating!
    Dismiss Notice
  2. Dear Pleskians, please read this carefully! New attachments and other rules Thank you!
    Dismiss Notice
  3. Dear Pleskians, I really hope that you will share your opinion in this Special topic for chatter about Plesk in the Clouds. Thank you!
    Dismiss Notice

Problem to create with RPC API

Discussion in 'Plesk for Linux - 8.x and Older' started by RPerez, Sep 11, 2008.

  1. RPerez

    RPerez Guest

    0
     
    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.
     
  2. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    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?
     
  3. RPerez

    RPerez Guest

    0
     
    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.
     
  4. atomicturtle

    atomicturtle Golden Pleskian

    29
     
    Joined:
    Nov 20, 2002
    Messages:
    2,110
    Likes Received:
    7
    Location:
    Washington, DC
    ah wait, is the login testtotest valid?
     
  5. RPerez

    RPerez Guest

    0
     
    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.
     
  6. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    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.
     
  7. dbushea

    dbushea Guest

    0
     
    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>
    
     
  8. Amin Taheri

    Amin Taheri Golden Pleskian Plesk Certified Professional

    33
     
    Joined:
    Jul 5, 2007
    Messages:
    1,398
    Likes Received:
    1
    Location:
    Seattle Area
    Isnt the pname field required?
     
  9. dbushea

    dbushea Guest

    0
     
    It ended up being the fact that fp_username was not all lower-case.
     
Loading...