Hi,
I guess I know what caused the problem.
First, I have fixed the rndc issues, so if I run the rndc reload command I got the msg saying reloaded successfully.
however when I added a dummy domain, I still don't see the .com.db file, not until I manually run the "rndc reload" again.
I put some traces inside the /bin/directadmin reload function, and instead of using system() (which won't return any output), I used the backticks.
I restarted directspace and I have tried:
Code:
my $output1 = `$config->{rndc_path} reload $domain`;
my $output2 = `$config->{rndc_path} reload`;
both output1 and output 2 didn't give me any output.
when I setup directspace, I used named as the uid and gid to execute. So I guess named didn't have rights to execute rndc reload. (But I really don't know why, as if I delete domain on directadmin, the .com.db is gone. So why named can unlink .com.db but not create .com.db??)
Anyways, I then changed my uid and gid to root, however /usr/sbin/rndc reload $domain still not working.
I manually logged into root and run:
rndc reload wallmart.com (which I used directadmin to add this dummy wallmart.com domain)
rndc: 'reload' failed: not found
still not working.
and finally, I made some changes to the reload function as follows:
Code:
sub reload($) {
my $domain = shift;
return if($config->{rndc_path} eq "none");
&action_log (" prepare to run rndc reload for domain: $domain "); //I added this line
my $rndcresult = `$config->{rndc_path} reload`; //I removed the system() and added this line too
&action_log (" reload result: $rndcresult");
return 1;
}
and now it's working fine
Note:
1. even though when executing "rndc reload", I got the output of "server reload successful", my .com.db does take a min or so in order to show up under my /etc/named/secondary directory
2. not sure why when I run this using root: /usr/sbin/rndc reload mydomain.com will give me this: "rndc: 'reload' failed: not found" and it can't load up the .com.db
3. I'm not sure if executing "rndc reload" everytime when there is a change on bind, is good or not
but at least now is fine
Thanks Richard for helping me on this issue. I have been struggling on this issue for quite some time (if you look at the other thread: master2slave you will know what I'm talking about). Again, thanks Richard