Bind/DNS record write problem

evolver

Verified User
Joined
Mar 11, 2006
Messages
44
Hello all,

When I was edit or add new record to DNS(Bind) I got this error;

Error Writing Records
Details: Unable to save dns zone: named-zonecheck returned:


Where is the problem ? I try this but not fixed.
/usr/local/directadmin/scripts/set_permissions.sh all

Thanks.
 
Hello,

That means that named-checkzone returned a non-zero value.

There are a few ways to debug it, but since the output is blank, we'll want to see what the issue is with the zone itself and run the named-checkzone manually.

1) Shut off the named-checkzone in the directadmin.conf. Add:
Code:
named_checkzone=0
and restart DA. This will bypass the check so the zone can be written. Note that it will be written in a manner that the check doesn't like, so there may be an issue with it... keep your eye on /var/log/messages for clues with named.

2) Once you re-save your zone (whatever you did to generate that error), bypassing the check, we'll then check the zone by hand:
Code:
ls -la /usr/sbin/named-checkzone
/usr/sbin/named-checkzone -d '[b]domain.com[/b]' /var/named/[b]domain.com[/b].db
and see what the gives us.

One possibility is if the named-checkzone binary is totally empty, that would explain the zero-result output, and non-zero exit status.

Note that it's not a permission issue, but an issue with the named-checkzone returning an error with the saved zone file (something in the zone is likely bad)

John
 
Thank you John.

I can't try it yet because of a lot of other problems too with my DirectAdmin system.for example now DA,Exim not running and crond service stoped working...

Best Regards,
 
Hello John,

I was submit help request from https://www.directadmin.com/clients/safesubmit.php .

I have a big problems with Apache and DNS Administration. All of my zone files in /var/named directory but I don't see in DirectAdmin->DNS Administration page.

Other problem is Apache not started :( , Always I got path errors.for example;

Warning: DocumentRoot [/domains/BBBBBB.com/public_html] does not exist
Warning: DocumentRoot [/domains/AAAAA.com/public_html] does not exist
Warning: DocumentRoot [/domains/YYYYY.com/public_html] does not exist
Warning: DocumentRoot [/domains/XXXXX.com/public_html] does not exist


The users already on server but I think httpd service not perceive directory paths...

Thank you for your help...
 
Hello,

1) Named:

The list is taken from the /etc/named.conf (path varies depending on OS).
Make sure the domains/zones are listed in the named.conf.
Also, the format of the line should look like this:
Code:
zone "domain.com" { type master; file "/var/named/domain.com.db"; };
where the "file" path must start with a slash / else, DA will ignore that line and it won't show up in the DNS Admin.

2) Apache:

If apache isn't running at all, run the the following from ssh as root:
Code:
/etc/init.d/httpd start
We're looking for errors. The mentioned output about missing DocumentRoot values are just "warnings" (not "errors") and will not affect apcahe running.

Check /var/log/httpd/error_log for further clues/errors.
I'll watch for any safesubmit requests if you send one.

John
 
Hello John,

Apache still running, But not resolve my web sites.I got path error for all users when I was try to restart.for example

Warning: DocumentRoot [/domains/BBBBBB.com/public_html] does not exist
Warning: DocumentRoot [/domains/AAAAA.com/public_html] does not exist
Warning: DocumentRoot [/domains/YYYYY.com/public_html] does not exist
Warning: DocumentRoot [/domains/XXXXX.com/public_html] does not exist

I checked httpd.conf and I see this;

It is:
DocumentRoot / domains / domain.com / public_html
ScriptAlias ​​/ cgi-bin / domains / domain.com / public_html / cgi-bin /


As it should be:
DocumentRoot / home / user / domains / domain.com / public_html
ScriptAlias ​​/ cgi-bin / domains / domain / public_html / cgi-bin /


Thank you.

Regards,
 
I got your email and have sent you a reply.
As a followup, there Users are all missing from the /etc/passwd and /etc/group files, so need to be re-added, eg:
Code:
/usr/sbin/groupadd -g [b]123[/b] [b]testuser[/b]
/usr/sbin/useradd -m  -p '[b]cryptedpass[/b]' -s /bin/false -g [b]testuser[/b] -u [b]456 testuser[/b]
where the uid/gid numbers (eg: 123/456) can be found by doing the command for each User:
Code:
ls -lad /home/username
drwx--x--x  7        [b]123[/b]        [b]456[/b]    4096 Apr  1 08:10 username
If you need an example on how to create a crypt, see this related guide:
http://help.directadmin.com/item.php?id=288

Once all accounts are created, re-write the httpd.conf files, eg:
Code:
cd /usr/local/directadmin/custombuild
./build rewrite_confs
John
 
Hello,

1) Named:

The list is taken from the /etc/named.conf (path varies depending on OS).
Make sure the domains/zones are listed in the named.conf.
Also, the format of the line should look like this:
Code:
zone "domain.com" { type master; file "/var/named/domain.com.db"; };
where the "file" path must start with a slash / else, DA will ignore that line and it won't show up in the DNS Admin.

Hello,

in named.conf not listed my domain names.But I see all of zone files in /var/named directory.

Thank you.
 
Back
Top