Unable to parse zone: Invalid DNS record: Invalid name provided

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
I've run into this problem even though the zone file in question was not editted recently.

It also happens if I just open the zone file and save it without making any edits to the zone file

Is there a way to trackdown the invalid name a bit more because the zone file has a few hundred lines.

I'm running cPanel 11.25.0-C40255 - WHM 11.25.0 - X 3.9
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
It is possible that certain entries in the exiting DNS zone are interfering; please try using the "named-checkzone" tool to manually check the DNS zone.

The following example command could be used via root SSH access; before entering, replace "domain.tld" with the domain name of the zone involved (i.e., the same domain as seen when selecting the zone to edit via WHM):
Code:
# named-checkzone -d domain.tld /var/named/domain.tld.db
 

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
Hi cpaneldon,

I ran the command and it returned
loading domain.tld from /var/named/domain.tld.db class "IN"
/var/named/domain.tld.db:18 ignoring out of zone data (site)
zone domain.tld/IN: loaded serial xxxxxxxxxx
OK

Line 18 on the zone is
site. 14400 IN A ipaddress

I removed the dot, re-ran the command and it seems to run ok but I still get the invalid name error when I try and edit the zone through whm

If I manually edit the zone file the new records are listed when I open the zone in whm but I still get the invalid name
 
Last edited:

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
When encountering the issue via WHM, is there logged detail in the cPanel error_log?
Code:
/usr/local/cpanel/logs/error_log
Are any other DNS zones able to be edited successfully (even if just re-saved without changes) via WHM?

There could be a more subtle (maybe non-fatal) syntax error in the affected DNS zone that could be causing the issue; if you submit a ticket we can take a look to help investigate further.
 

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
For internal networking reasons there is only 1 zone file, I will open a ticket and take it from there
 

battisti

Member
Nov 7, 2009
15
0
51
i'm have a similar problem the message

Invalid DNS record: Invalid name provided.

cPanel is send of my application, i using the XmlApi to add a recodr of my DNS zone

https: //xxx.x.xx.xxx:2087/xml-api/addzonerecord?zone=mysite.com&name=forum&address=xxx.x.xx.xxz&type=A

My server running the cPanel 11.25

if i put in the name like "forum.teste" its works, some idea?
 

mobcdi

Well-Known Member
Jul 13, 2009
109
0
66
cPanel support were able to track it down to an incorrectly entered mx record that was added when I had to merge enteries from a zone into the upper zone.

It did take a while to track down the exact entry that was causing the problem but thanks have to go to cPanel support for finding it
 

cPanelDon

cPanel Quality Assurance Analyst
Staff member
Nov 5, 2008
2,545
12
268
Houston, Texas, U.S.A.
cPanel Access Level
DataCenter Provider
Twitter
cPanel is send of my application, i using the XmlApi to add a recodr of my DNS zone

https: //xxx.x.xx.xxx:2087/xml-api/addzonerecord?zone=mysite.com&name=forum&address=xxx.x.xx.xxz&type=A
Please try using a name variable in the following format, based upon your provided example:
forum.mysite.com.
Code:
/xml-api/addzonerecord?zone=mysite.com&name=forum.mysite.com.&address=1.2.3.4&type=A
 

battisti

Member
Nov 7, 2009
15
0
51
Please try using a name variable in the following format, based upon your provided example:
forum.mysite.com.
Code:
/xml-api/addzonerecord?zone=mysite.com&name=forum.mysite.com.&address=1.2.3.4&type=A
Using the full name works, i'm enter in conctact with cPanel suport and exist a mistake in the documentation!

Using the full name works for me thk for help and cPanel equipe suporte is greate!