22 05 2012

I cannot add a new domain because of existing DNS records

bigCat Posted in Linux, DataBase - Comment.isBlank

http://kb.parallels.com/en/1364\r\n\r\n\r\nAPPLIES TO:\r\nParallels Plesk Panel\r\nSymptoms\r\nAn attempt at new domain creation fails, and the following error is shown:\r\n\r\nDNS records for domain with such name already exist\r\n\r\nor\r\n\r\nThe subdomain with such name already exists\r\n\r\n\r\nCause\r\nA DNS record for the domain you are trying to add already exists in the Parallels Plesk Panel (PP) database, so a new domain with the same name cannot be added.\r\n\r\nResolution\r\nTry to find a record with a similar name in the DNS settings of the existing domains.\r\n\r\nIf it is difficult to find it manually, you may follow these steps:\r\n\r\n1. Open the "psa" database:\r\nLinux:\r\n# mysql -uadmin -p`cat /etc/psa/.psa.shadow` -Dpsa\r\n\r\nWindows:\r\nRefer to this article: 3472 [How To] How to access Parallels Plesk Panel database\r\n2. Run the following query to find the DNS record preventing new domain creation (replace YOUR-DOMAIN with the real name of the domain you are trying to create):\r\nLinux:\r\n> select z.name, r.host, r.type, r.val from dns_zone z, dns_recs r where z.id=r.dns_zone_id and r.host like '%YOUR-DOMAIN%';\r\n\r\nWindows:\r\nFor MSSQL and MySQL DB provider:\r\n> select z.name, r.host, r.type, r.val from dns_zone z, dns_recs r where z.id=r.dns_zone_id and r.host like '%YOUR-DOMAIN%';\r\n\r\nFor MS Access DB provider:\r\n> select z.name, r.host, r.type, r.val from dns_zone z, dns_recs r where z.id=r.dns_zone_id and r.host like '*YOUR-DOMAIN*';\r\n\r\nExample:\r\n\r\nYou try to create a domain called "support.mydomain.com," but the above error appears. The above shell command returns the following output:\r\nmysql> select z.name, r.host, r.type, r.val from dns_zone z, dns_recs r where z.id=r.dns_zone_id and r.host like '%support.mydomain.com%';\r\n\r\n+-------------+-----------------------+------+----------------+\r\n| name | host | type | val |\r\n+-------------+-----------------------+------+----------------+\r\n| mydomain.com| support.mydomain.com. | A | 192.168.45.200 |\r\n+-------------+-----------------------+------+----------------+\r\n\r\nYou need to open the corresponding domain (mydomain.com in our example) in the PP Web Interface and examine its DNS zone for the records that contain name of the domain you tried to add. If you want to create the "support.mydomain.com" domain as a separate domain in PP, then the existing record with a similar name has to be removed from the "mydomain.com" DNS zone.\r\n\r\n\r\nAnother possible case:\r\n\r\nA DNS record may exist in the dns_recs table, but have no PP domain associated with it. This may be because of a failed domain removal in the past. You can remove such records directly from the dns_recs table using the below query.\r\n\r\nNote: Make sure you back up the "psa" database modifying it.\r\nLinux:\r\n> DELETE FROM `dns_recs` WHERE DisplayHost LIKE '%domain.com%';\r\n\r\nWindows:\r\nFor MSSQL and MySQL DB provider:\r\n> DELETE FROM `dns_recs` WHERE DisplayHost LIKE '%domain.com%';\r\n\r\nFor MS Access DB provider:\r\n> DELETE FROM `dns_recs` WHERE DisplayHost LIKE '*domain.com*';\r\n

Host: (miao) | Word: Press | Code: HTML5