• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Add Domain Alias => Error: DNS record already exists. Part #1

M

M_From_H

Guest
After upgrading from Plesk 8.4 to Plesk 9.3 (on openSUSE 10.0), I am not able to add domain aliases anymore. When I try to do so, the error message mentioned above occurs. Adding domains is no problem.

I turned on MySQL-logging and found
100303 9:13:31 11 Connect admin@localhost on
11 Init DB psa
11 Query SHOW VARIABLES LIKE 'version'
11 Query select param, val from misc
11 Query SET NAMES utf8
11 Init DB psa
11 Query SHOW VARIABLES LIKE 'version'
11 Query SET NAMES utf8
11 Query SHOW VARIABLES LIKE 'version'
11 Query SELECT * FROM misc
WHERE param = 'mysql41_compatible'
AND val <> RTRIM(TRIM('\0' FROM val))
11 Query set foreign_key_checks=0
11 Query SELECT login, type, ip_address FROM sessions WHERE sess_id="9677c5e09b8320a7645c1b0467ec531a"
11 Query select * from sessions where sess_id="9677c5e09b8320a7645c1b0467ec531a" and click_time >= NOW() - INTERVAL 1800 SECOND
11 Query update sessions set click_time=NOW() where sess_id='9677c5e09b8320a7645c1b0467ec531a'
11 Query select `id`,`name`,`displayName`,`cr_date`,`status`,`dns_zone_id`,`htype`,`cl_id`,`limits_id`,`params_id`,`cert_rep_id`,`real_size`,`guid`,`overuse` from domains where `id`=3
11 Query SELECT * FROM clients WHERE type = 'admin'
11 Query SELECT `sb_client_login`, `sb_reseller_id` FROM `SBResellers` WHERE `client_id` =1
11 Query select `id`,`name`,`place` from Skins where `id`=18
11 Query SELECT `key`, `uid` FROM PersistentCache WHERE `expire` < '2010-03-03 09:13:31'
11 Query select `id`,`limit_name`,`value` from Limits where `id`=2
11 Query SELECT `param`, `val` FROM dom_param WHERE dom_id = 3
11 Query select `id`,`parent_id`,`type`,`cr_date`,`cname`,`pname`,`login`,`account_id`,`status`,`phone`,`fax`,`email`,`address`,`city`,`state`,`pcode`,`country`,`locale`,`limits_id`,`params_id`,`perm_id`,`pool_id`,`logo_id`,`tmpl_id`,`sapp_pool_id`,`guid`,`overuse` from clients where `id`=3
11 Query SELECT `sb_client_login`, `sb_reseller_id` FROM `SBResellers` WHERE `client_id` =3
11 Query select `id`,`type`,`password` from accounts where `id`=2
11 Query SELECT `param`, `val` FROM cl_param WHERE cl_id = 3
11 Query SELECT `param`, `val` FROM cl_param WHERE cl_id = 1
11 Query select id as `id`, displayName as `name`, cl_id as `parent_id` from domains where id in (3)
11 Query select id as `id`, displayName as `name`, cl_id as `parent_id` from domains where id in (3)
11 Query select id as `id`, login as `name`, NULL as `parent_id` from clients where id in (3)
11 Query select `id`,`name`,`type`,`uri` from DashboardPreset where `id`=5
11 Query SELECT `id`, `ord`, `uri`, `parent_id`, `enabled`, `type`, `title`, `description` FROM `DashboardPresetConfig` WHERE `preset_id`=5 ORDER BY `parent_id`, `ord` DESC
11 Query SELECT COUNT(*) AS n FROM PersistentCache WHERE `key` = 'plesk/client@3/domain@3/domain-alias@new/properties-domains#formPageCache' AND `uid` = '1-0'
11 Query select count(*) from DashboardPresetConfig where id=439
11 Query update DashboardPresetConfig SET `preset_id`=5, `ord`=119, `uri`="/plesk/client@3/domain@3/domain-alias@new/properties/", `parent_id`=419, `enabled`="true", `type`="shortcut", `title`= "Neuen Domain-Alias für mydomain.tld erstellen", `description`= "Neuen Domain-Alias für Domain mydomain.tld erstellen" where `id`=439
11 Quit
100303 9:13:32 12 Connect admin@localhost on
12 Init DB psa
12 Query SHOW VARIABLES LIKE 'version'
12 Query select param, val from misc
12 Query SET NAMES utf8
12 Init DB psa
12 Query SHOW VARIABLES LIKE 'version'
12 Query SET NAMES utf8
12 Query SHOW VARIABLES LIKE 'version'
12 Query SELECT * FROM misc
WHERE param = 'mysql41_compatible'
AND val <> RTRIM(TRIM('\0' FROM val))
12 Query set foreign_key_checks=0
12 Query select `id`,`name`,`place` from Skins where `id`=18
12 Quit
100303 9:13:56 13 Connect admin@localhost on
13 Init DB psa
13 Query SHOW VARIABLES LIKE 'version'
13 Query select param, val from misc
13 Query SET NAMES utf8
13 Init DB psa
13 Query SHOW VARIABLES LIKE 'version'
13 Query SET NAMES utf8
13 Query SHOW VARIABLES LIKE 'version'
13 Query SELECT * FROM misc
WHERE param = 'mysql41_compatible'
AND val <> RTRIM(TRIM('\0' FROM val))
13 Query set foreign_key_checks=0
13 Query SELECT login, type, ip_address FROM sessions WHERE sess_id="9677c5e09b8320a7645c1b0467ec531a"
13 Query select * from sessions where sess_id="9677c5e09b8320a7645c1b0467ec531a" and click_time >= NOW() - INTERVAL 1800 SECOND
13 Query update sessions set click_time=NOW() where sess_id='9677c5e09b8320a7645c1b0467ec531a'
13 Query select `id`,`name`,`displayName`,`cr_date`,`status`,`dns_zone_id`,`htype`,`cl_id`,`limits_id`,`params_id`,`cert_rep_id`,`real_size`,`guid`,`overuse` from domains where `id`=3
13 Query SELECT * FROM clients WHERE type = 'admin'
13 Query SELECT `sb_client_login`, `sb_reseller_id` FROM `SBResellers` WHERE `client_id` =1
13 Query select `id`,`name`,`place` from Skins where `id`=18
13 Query SELECT `key`, `uid` FROM PersistentCache WHERE `expire` < '2010-03-03 09:13:56'
13 Query SELECT `key`, `uid` FROM PersistentCache WHERE `events` LIKE '%ui_update%'
13 Query DELETE FROM PersistentCache WHERE `events` LIKE '%ui_update%'
13 Query select `id`,`limit_name`,`value` from Limits where `id`=2
13 Query SELECT `param`, `val` FROM dom_param WHERE dom_id = 3
13 Query select `id`,`parent_id`,`type`,`cr_date`,`cname`,`pname`,`login`,`account_id`,`status`,`phone`,`fax`,`email`,`address`,`city`,`state`,`pcode`,`country`,`locale`,`limits_id`,`params_id`,`perm_id`,`pool_id`,`logo_id`,`tmpl_id`,`sapp_pool_id`,`guid`,`overuse` from clients where `id`=3
13 Query SELECT `sb_client_login`, `sb_reseller_id` FROM `SBResellers` WHERE `client_id` =3
13 Query select `id`,`type`,`password` from accounts where `id`=2
13 Query SELECT `param`, `val` FROM cl_param WHERE cl_id = 3
13 Query SELECT `param`, `val` FROM cl_param WHERE cl_id = 1
13 Query SELECT count(*) FROM domainaliases WHERE name ="newalias.tld" AND id !="0"
13 Query SELECT id FROM domains WHERE name = "newalias.tld"
13 Query SELECT count(*) FROM subdomains sd, domains d WHERE d.id = sd.dom_id AND CONCAT(sd.name, ".", d.name)="newalias.tld" AND sd.id !="0"
13 Query SELECT COUNT(*) FROM dns_recs WHERE type in ("CNAME", "A", "MX", "NS", "TXT") AND host="newalias.tld."
13 Query SELECT id, name, descr, enabled FROM actions
13 Query select `id`,`name`,`displayName`,`email`,`status`,`type`,`ttl`,`ttl_unit`,`refresh`,`refresh_unit`,`retry`,`retry_unit`,`expire`,`expire_unit`,`minimum`,`minimum_unit`,`serial`,`serial_format` from dns_zone where `id`=4
13 Query SELECT id FROM dns_recs WHERE dns_zone_id="0"
13 Query SELECT id FROM dns_recs WHERE dns_zone_id="4"
13 Query select `id`,`dns_zone_id`,`type`,`displayHost`,`host`,`displayVal`,`val`,`opt`,`time_stamp` from dns_recs where `id`=477

... same line for ~180 other subdomains ...

For rest of posting see Part #2 ...
 
Add Domain Alias => Error: DNS record already exists. Part #2

13 Query SELECT id FROM dns_recs WHERE dns_zone_id="0"
13 Query SELECT id FROM dns_recs WHERE dns_zone_id="0" AND (`type` IN ("CNAME")) AND (`host` IN ("newalias.tld."))
13 Query SELECT id FROM dns_recs WHERE dns_zone_id="0" AND (`type` IN ("NS")) AND (`host` IN ("newalias.tld.")) AND (`val` IN ("ns.newalias.tld."))
13 Query SELECT id FROM dns_recs WHERE dns_zone_id="0" AND (`type` IN ("CNAME")) AND (`host` IN ("ns.newalias.tld."))

... same lines for ~180 other subdomains ...

13 Query select id as `id`, displayName as `name`, cl_id as `parent_id` from domains where id in (3)
13 Query select id as `id`, displayName as `name`, cl_id as `parent_id` from domains where id in (3)
13 Query select id as `id`, login as `name`, NULL as `parent_id` from clients where id in (3)
13 Query select `id`,`name`,`type`,`uri` from DashboardPreset where `id`=5
13 Query SELECT `id`, `ord`, `uri`, `parent_id`, `enabled`, `type`, `title`, `description` FROM `DashboardPresetConfig` WHERE `preset_id`=5 ORDER BY `parent_id`, `ord` DESC
100303 9:13:57 13 Query SELECT COUNT(*) AS n FROM PersistentCache WHERE `key` = 'plesk/client@3/domain@3/domain-alias@new/properties-domains#formPageCache' AND `uid` = '1-0'
13 Query SELECT cb.id FROM custom_buttons cb WHERE cb.place = "navigation" AND (cb.level >= 1 OR (cb.level < 1 AND ( (cb.options & 128) <> 0 ))) AND cb.level = 1 GROUP BY cb.id ORDER BY cb.level ASC, cb.sort_key ASC, cb.text ASC
13 Query SELECT `param_value` FROM `SBConfig` WHERE `param_name` ='url'
13 Query SELECT `param_value` FROM `SBConfig` WHERE `param_name` ='login'
13 Query SELECT `param_value` FROM `SBConfig` WHERE `param_name` ='password'
13 Query SELECT `param_value` FROM `SBConfig` WHERE `param_name` ='version'
13 Query SELECT `param_value` FROM `SBConfig` WHERE `param_name` ='plan'
13 Query select id as `id`, login as `name`, NULL as `parent_id` from clients where (type <> "client") and id in (1)
13 Query SELECT c.id as id, c.pname as name FROM clients c LEFT JOIN clients o ON o.id = c.parent_id WHERE c.id <> 3 AND c.id <> 1 AND c.type = 'client' AND o.id = 1 AND 1=1
13 Query SELECT d.id as id, d.displayName as name FROM domains d WHERE d.cl_id= 3 AND d.id <> 3
13 Query select count(*) from DashboardPresetConfig where id=439
13 Query update DashboardPresetConfig SET `preset_id`=5, `ord`=120, `uri`="/plesk/client@3/domain@3/domain-alias@new/properties/", `parent_id`=419, `enabled`="true", `type`="shortcut", `title`= "Neuen Domain-Alias für mydomain.tld erstellen", `description`= "Neuen Domain-Alias für Domain mydomain.tld erstellen" where `id`=439
13 Query DELETE FROM PersistentCache WHERE `key` = 'plesk/client@3/domain@3/domain-alias@new/properties-domains#formPageCache' AND `uid` = '1-0'
13 Query INSERT INTO PersistentCache (`key`, `uid`, `expire`, `events`) VALUES ('plesk/client@3/domain@3/domain-alias@new/properties-domains#formPageCache','1-0','2010-03-04 09:13:57','ui_update,api_update')
13 Quit
14 Connect admin@localhost on
14 Init DB psa
14 Query SHOW VARIABLES LIKE 'version'
14 Query select param, val from misc
14 Query SET NAMES utf8
14 Init DB psa
14 Query SHOW VARIABLES LIKE 'version'
14 Query SET NAMES utf8
14 Query SHOW VARIABLES LIKE 'version'
14 Query SELECT * FROM misc
WHERE param = 'mysql41_compatible'
AND val <> RTRIM(TRIM('\0' FROM val))
14 Query set foreign_key_checks=0
14 Query select `id`,`name`,`place` from Skins where `id`=18
14 Quit
[/QUOTE]
I executed update / delete and insert at tne mysql-console and received these results
select count(*) from DashboardPresetConfig where id=439;
+----------+
| count(*) |
+----------+
| 1 |
+----------+
1 row in set (0.00 sec)

mysql> update DashboardPresetConfig SET `preset_id`=5, `ord`=120, `uri`="/plesk/client@3/domain@3/domain-alias@new/properties/", `parent_id`=419, `enabled`="true", `type`="shortcut", `title`= "Neuen Domain-Alias für mydomain.tld erstellen", `description`= "Neuen Domain-Alias für Domain mydomain.tld erstellen" where `id`=439
-> ;
Query OK, 1 row affected (0.08 sec)
Rows matched: 1 Changed: 1 Warnings: 0

mysql> DELETE FROM PersistentCache WHERE `key` = 'plesk/client@3/domain@3/domain-alias@new/properties-domains#formPageCache' AND `uid` = '1-0';
Query OK, 1 row affected (0.07 sec)

mysql> INSERT INTO PersistentCache (`key`, `uid`, `expire`, `events`) VALUES ('plesk/client@3/domain@3/domain-alias@new/properties-domains#formPageCache','1-0','2010-03-04 09:13:57','ui_update,api_update');
Query OK, 1 row affected (0.08 sec)

mysql> SELECT * FROM misc
-> WHERE param = 'mysql41_compatible'
-> AND val <> RTRIM(TRIM('\0' FROM val));
Empty set (0.00 sec)
From my point of view, everything looks pretty, but Plesk still says "Error: DNS record already exists".

Can anybody help?

Thanks in advance.
--
BFN
Michael
 
Try following select:

SELECT * FROM dns_recs WHERE type in ("CNAME", "A", "MX", "NS", "TXT") AND host like '%part of name your alias%';

Delete record if you find it. And try to add alias with

/usr/local/psa/bin/domalias -c alias.tld -domain domain.tld -dns true
 
mysql> SELECT * FROM dns_recs WHERE type in ("CNAME", "A", "MX", "NS", "TXT") AND host like '%newalias.tld%';
Empty set (0.00 sec)

# /usr/local/psa/bin/domalias -c newalias.tld -domain mydomain.tld -dns true
DNS record already exists.
Any other suggestions, Igor?
 
I'm absolutely sure that there is some record in database. You can try to create dump of database with

mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` psa > /root/psa.dump

And then try to find something like alias name in this dump.
 
I'm absolutely sure that there is some record in database.
You can be absolutely sure, that the alias, I try to add, does not exist in database. I can add any name like parallels.com, mickey-mouse.com or xxx.yyy. The result is always the same.
 
We have some tickets with the same problem and symptoms from customers and reason of all these issues is extra record in database.
Therefore I can suggest you contact Plesk support team if you can't find it by yourself.
 
Igor, tell me any domain name you want, and I will try to add it as an alias. Plesk will tell me "DNS record already exists", though the record does *not* exist in database.
 
> Try to check zones in /var/named/run-root/var/
-bash: cd: /var/named/run-root/var/: No such file or directory

# find / -name 'run-root'
(no matches)
 
# grep ROOTDIR /etc/sysconfig/named
#

# cat /etc/sysconfig/named
NAMED_RUN_CHROOTED="yes"
NAMED_ARGS=""
NAMED_CONF_INCLUDE_FILES=""
NAMED_INITIALIZE_SCRIPTS="createNamedConfInclude"
#
 
Well. Seems zone files located in /var/lib/named on Suse systems. I have not any Suse system for testing. Try to find it.
 
Same Issue

Igor, I can confirm the same issue. I've gone through the DB and there are no entries for the aliases I'm adding, and no zonefiles on disk for it either. And Just like the above poster, adding "mywetdog.com" or any other name would result in "Error: DNS record already exists."

This is for Plesk 9.3 on 64 bit CentOS 5.4.
 
Yes, there are no zonefiles for said alias. As mentioned by M from H, you can add 'whack.com' as a domain alias and you'll still get the error "DNS record already exists."
 
Igor, just to confirm on this, at least with my server, this is only happening on 1 domain, I CAN add aliases to other domains just fine. The domain I'm having a problem with, we had aliases on it and a tech tried to rename the domain without removing the aliases first.
 
Hi, I had the same issue. couldn't find the domain in any other table. So I tried adding the alias to another domain which worked.
I deleted it and then tried to add it back to the original domain, still got the error. After looking in the DNS Settings of the main domain I tried removing this dodgy looking CNAME googleffffffffc5bad6c1.proclo.co.nz.proclo.co.nz.
After that I added alias back and it worked fine.
 
Back
Top