Operating System - HP-UX
1833461 Members
3170 Online
110052 Solutions
New Discussion

Re: Problem with configuring DNS

 
chyaroslav
Occasional Advisor

Problem with configuring DNS

Hellow! I have a problem with initial configuring of DNS with hosts_to_named command. For example:
hosts_to_named -d new.zone -n my_network -b /etc/named.conf

produce error:

/usr/sbin/hosts_to_named: line 2298: unexpected EOF while looking for matching ``'
/usr/sbin/hosts_to_named: line 2324: syntax error: unexpected end of file
8 REPLIES 8
Steven E. Protter
Exalted Contributor

Re: Problem with configuring DNS

Shalom,

It appears to be a script error in the script hosts_to_named

I think its been modified. I'd see about copying it in from another system or reinstalling it.

You can look at lines 2298 and see if there is an obvious syntax errror. I often get this when I forget to close double quotes.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
chyaroslav
Occasional Advisor

Re: Problem with configuring DNS

for DOM in $DOMAINS $DEFAULT_DOMAIN
do
"str 2298" SUBDOM=`subdomain $DOM`
if test -f spcl.$SUBDOM
then
echo '$INCLUDE\tspcl.'$SUBDOM >> db.$SUBDOM
fi
done

I don`t sea an error in string 2298
Ivan Krastev
Honored Contributor

Re: Problem with configuring DNS

Maybe script cannot parse hosts file due to error in file. Can you post your /etc/hosts file ?


regards,
ivan
chyaroslav
Occasional Advisor

Re: Problem with configuring DNS

this command failed on different systems. Also i have implement simple host file(with one string) by -H option. Result is the same.
Ivan Krastev
Honored Contributor

Re: Problem with configuring DNS

From http://docs.hp.com/en/5991-0757/ch02s03.html -

TXT records with unbalanced quotes, like â host TXT "fooâ , were not treated as errors in previous versions of BIND. If the zone files contain such records, then error messages like "unexpected end of file"will be displayed because BIND 9.2.0 will interpret everything up to the next quote character as a literal string.




regards,
ivan
chyaroslav
Occasional Advisor

Re: Problem with configuring DNS

This is my hosts file:
10.62.224.196 test test.hpium.dpc.usi.ru

hosts_to_named -H ./hosts.1 -d hpium.dpc.usi.ru -n 10.62.224.128 -b /etc/named.conf
/usr/sbin/hosts_to_named: line 2298: unexpected EOF while looking for matching ``'
/usr/sbin/hosts_to_named: line 2324: syntax error: unexpected end of file
chyaroslav
Occasional Advisor

Re: Problem with configuring DNS

Thanks for attention. Problem was solved when I run script from sh shell. In the first time a run it from bash shell.
chyaroslav
Occasional Advisor

Re: Problem with configuring DNS

the error is in the first string of hosts_to_named script:
##!/usr/bin/sh
extra symbol # exists on all my HP-UX servers in script hosts_to_named. I have HP-UX 11.11. Who tell me if this mistake exists on other HP-UX?