• 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.

Domain Already exists error

MansiG

New Pleskian
Hi,

While creating domain with packet structure as follows :

<packet version="1.6.5.0">
<site-alias>
<create>
<status>0</status>
<pref>
<web>1</web>
<mail>0</mail>
<tomcat>0</tomcat>
<seo-redirect>false</seo-redirect>
</pref>
<manage-dns>0</manage-dns>
<site-id>siteid</site-id>
<name>domainnm</name>
</create>
</site-alias>
</packet>

I get the following error,

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.5.0">
<site-alias>
<create>
<result>
<status>error</status>
<errcode>1007</errcode>
<errtext>A domain alias with such name already exists.</errtext>
</result>
</create>
</site-alias>
</packet>


I am pretty sure that domain name which I give everytime, is not existing.

NOTE: This error comes for every domain alias creation with packet structure.

Thank you for your help.
 
Last edited:
I already followed this article and when I execute the query given in this article, it return 0 rows. So there is no record for the given domain name. IT HAPPENS WITH ANY DOMAIN NAME.
 
I can't reproduce it. Look, I have following php script for sending API RPC request:

<?php

$host="10.58.103.100";
$login="admin";
$passwd="setup";
$port=8443;

$data = <<<EOF
<packet version="1.6.5.0">
<site-alias>
<create>
<status>0</status>
<pref>
<web>1</web>
<mail>0</mail>
<tomcat>0</tomcat>
<seo-redirect>false</seo-redirect>
</pref>
<manage-dns>0</manage-dns>
<site-id>4</site-id>
<name>domain.nm</name>
</create>
</site-alias>
</packet>
EOF;

function write_callback($ch, $data) {
echo $data;
return strlen($data);
}

function sendCommand($data, $login, $passwd, $host, $port=8443) {
$script = "enterprise/control/agent.php";
$url = "https://$host:$port/$script";
$headers = array(
"HTTP_AUTH_LOGIN: $login",
"HTTP_AUTH_PASSWD: $passwd",
"HTTP_PRETTY_PRINT: TRUE",
"Content-Type: text/xml",
);
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_HTTPHEADER, &$headers);
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_WRITEFUNCTION, write_callback);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_VERBOSE, 1);
$result = curl_exec($ch);
if (!$result) {
echo "\n\n-------------------------\ncURL error number:".curl_errno($ch);
echo "\n\ncURL error:".curl_error($ch);
}
curl_close($ch);
return;
}
sendCommand($data, $login, $passwd, $host, $port);

?>

I have just run it:

# php api.php
* About to connect() to 10.58.103.100 port 8443 (#0)
* Trying 10.58.103.100... * connected
* Connected to 10.58.103.100 (10.58.103.100) port 8443 (#0)
* Initializing NSS with certpath: sql:/etc/pki/nssdb
* skipping SSL peer certificate verification
* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA
* Server certificate:
* subject: [email protected],CN=Parallels Panel,OU=Parallels Panel,O=Parallels,L=Herndon,ST=Virginia,C=US
* start date: Sep 28 01:03:39 2011 GMT
* expire date: Sep 27 01:03:39 2012 GMT
* common name: Parallels Panel
* issuer: [email protected],CN=Parallels Panel,OU=Parallels Panel,O=Parallels,L=Herndon,ST=Virginia,C=US
> POST /enterprise/control/agent.php HTTP/1.1
Host: 10.58.103.100:8443
Accept: */*
HTTP_AUTH_LOGIN: admin
HTTP_AUTH_PASSWD: setup
HTTP_PRETTY_PRINT: TRUE
Content-Type: text/xml
Content-Length: 269

< HTTP/1.1 200 OK
< Server: sw-cp-server
< Date: Tue, 31 Dec 2013 07:25:58 GMT
< Content-Type: text/xml
< Transfer-Encoding: chunked
< Connection: keep-alive
< P3P: CP="NON COR CURa ADMa OUR NOR UNI COM NAV STA"
< Last-Modified: Tue, 31 Dec 2013 07:25:51 GMT
< Expires: Thu, 19 Nov 1981 08:52:00 GMT
< Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0
< Pragma: no-cache
< Set-Cookie: PHPSESSID=3a7100ca72c9e862ef0ee4760b87ceee; path=/; secure; httponly
< Set-Cookie: locale=en-US; expires=Wed, 31-Dec-2014 07:25:51 GMT; path=/
<
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.5.0">
<site-alias>
<create>
<result>
<status>ok</status>
<id>1</id>
</result>
</create>
</site-alias>
</packet>
* Connection #0 to host 10.58.103.100 left intact
* Closing connection #0

And on target server I see:

mysql> select * from domain_aliases;
+----+--------+-------------+--------+-----------+-------------+-------+-------+------+--------+-------------+
| id | dom_id | dns_zone_id | status | name | displayName | dns | mail | web | tomcat | seoRedirect |
+----+--------+-------------+--------+-----------+-------------+-------+-------+------+--------+-------------+
| 1 | 4 | 12 | 0 | domain.nm | domain.nm | false | false | true | false | false |
+----+--------+-------------+--------+-----------+-------------+-------+-------+------+--------+-------------+
1 row in set (0.00 sec)
 
Please check the given url
http://apps.bizidrops.com/appscript/alias.php?alias=ANYALIASNAME
In some computer during process, it give server error. Unable to connect server. And if I run same by refreshing again in that pc, it works and give message that domain already exists. It means alias is being created at first attempt when it gives error and second time it works and give message of already created. What shall be the issue behind it?
 
Please check the given url for check the issue.
http://apps.bizidrops.com/appscript/alias.php?alias=ANYALIASNAME
In some computer during process, it give server error. Unable to connect server. And if I run same by refreshing again in that pc, it works and give message that domain already exists. It means alias is being created at first attempt when it gives error and second time it works and give message of already created. What shall be the issue behind it?

For code, please check the given urls
http://apps.bizidrops.com/appscript/alias.txt
http://apps.bizidrops.com/appscript/PleskApiClient.txt

NOTE : Issue of duplicate is occurring in all pc but it stops and give error of server connect in some computer.

Thank you for your help.
 
Back
Top