DirectSlave - solution to add and remove zones on slave without DirectAdmin

I saw that error when i try manually to re-send all zones to slaves using task.queue file, maybe is not related :)

Regarding your issue, my guess was to restart DS.. but since you already did that and it worked... nothing to say just except that maybe DS was somehow stucked and not working correctly

Regards
 
Yep I think that too, because DS said it was running, but I did not see any processes when doing a ps faux before the restart.

Any clue on why on the slave server, the deleted domains from the master server won't get removed?
 
Mmmh honestly not, have you checked logs on both sides? Cause it sounds to me like some permission issue... On my side this error doesnt appear at all...

Regards
 
The master logs gives a reload on named.
On the slave system nothing is even visible on the same time.

So I did:
Code:
echo "action=rewrite&value=named" >> /usr/local/directadmin/data/task.queue
on the master system.

The logs on the slave system look fine like this:
Code:
2015-04-04 18:55:25: Auth passed for admin from 217.xxx.xxx.xxx
2015-04-04 18:55:25: reloaded somedomain.nl on primary 217.xxx.xxx.xxx
2015-04-04 18:55:25: Auth passed for admin from 217.xxx.xxx.xxx
2015-04-04 18:55:25: reloaded anotherdomain.nl on primary 217.xxx.xxx.xxx
So that looks fine. These lines were not present for the domains (testdomain.nl and test2domain.nl) which were not present anymore.
Still they were not removed from the slave server.

The most strange thing is that it worked flawlessly until some time ago, and I did not change anything.

I'm going to test again and see if something else will be visible in the logs, if yes, I will add a message here.
 
Tried again, had put also-notify instead of allow-notify in the master named.conf but when the domain was created, this was visible on the master server's log:
Code:
Apr  5 00:41:17 server19 named[8515]: client 141.slave.server.ip#33195: query (cache) 'xtralaxxnietwel.com/SOA/IN' denied
Apr  5 00:41:17 server19 named[8515]: client 141.slave.server.ip#55431: bad zone transfer request: 'xtralaxxnietwel.com/IN': non-authoritative zone (NOTAUTH)

Strangely enough, this happened 1 minute later in the same log:
Code:
Apr  5 00:42:02 server19 named[8515]: reloading configuration succeeded
Apr  5 00:42:02 server19 named[8515]: zone xtralaxxnietwel.com/IN: loaded serial 2015040500
Apr  5 00:42:02 server19 named[8515]: reloading zones succeeded
Apr  5 00:42:02 server19 named[8515]: zone xtralaxxnietwel.com/IN: sending notifies (serial 2015040500)
Apr  5 00:42:02 server19 named[8515]: client 141.slave.server.ip#37422: transfer of 'xtralaxxnietwel.com/IN': AXFR started
Apr  5 00:42:02 server19 named[8515]: client 141.slave.server.ip#37422: transfer of 'xtralaxxnietwel.com/IN': AXFR ended

This is from the removal in the master server's log, no errors there:
Code:
Apr  5 00:46:01 server19 named[8515]: zone xtralaxxnietwel.com/IN: (master) removed
Apr  5 00:46:01 server19 named[8515]: reloading configuration succeeded
Apr  5 00:46:01 server19 named[8515]: reloading zones succeeded
This was 4 minutes later as you can see.

And this was from the slave server access log:
Code:
217.master.server.ip - - [05/Apr/2015:00:32:41 +0200] "POST /CMD_API_DNS_ADMIN?action=rawsave&domain=xtralaxxnietwel.com HTTP/1.0" 200 - "-" "-"
217.master.server.ip - - [05/Apr/2015:00:37:03 +0200] "POST /CMD_API_DNS_ADMIN HTTP/1.0" 200 - "-" "-"
As you can see, on 00:37 (yes the time on my slave server is running behind), it did get some command and there is a http:/1.0 200, but nothing behind it, so no command to remove the domain I made for testing.

Action log on slave server:
Code:
2015-04-05 00:32:41: domain xtralaxxnietwel.com added with primary 217.master.server.ip
2015-04-05 00:37:03: Auth passed for admin from 217.master.server.ip
As you can see, Directslave receives authentication for admin, but does not remove the domain. It just says Auth passed and that's it.
I'm confused now.
 
I managed to fix things again. Zones are now deleted again. It just takes DS some time to do it.
Made some minor changes in named.conf.
 
Hey All,

Currently i'm revising my hosting setup to include some stand alone nameservers.
These servers are vps's.

Now, because i'm starting from scratch i want to use the most up-to-date versions of all software i need.
So, i installed centos7. Bind. Perl (modules from centos repo).
I get almost everything to work. Named is running fine.

directslave however won't run.
I did solve all issues that occurred during --check.
So it's all OK.

When i try --debug or --run however. I get the following error (besides a few deprecated warnings):
Code:
Couldn't find pid in existing pid_file at /usr/local/share/perl5/Net/Server/Daemonize.pm line 48.

Has anyone got directslave to work on centos7?
Or does anyone know how to solve the issue?

Thanks,
Erik
 
Have you installed perl Daemonize package?

Have you set a correct path (and user owner) for the pid file in configuration file?

Regards
 
What pid file path do you mean?
According to --check, all folders exist and are writable by directslave

wait... huh?
After a server restart i get a different result...
When i have named as a uid. It cannot find/write to named_workdir


The workdir is /var/named/slaves/ and it is named:named


My config:
Code:
Config: $VAR1 = {
          'rndc_path' => '/usr/sbin/rndc',
          'retry_time' => '1200',
          'ssl_cert' => '/usr/local/directslave/ssl/server.crt',
          'named_conf' => '/etc/named/directslave.conf',
          'pid' => '/usr/local/directslave/run/directslave.pid',
          'ssl_key' => '/usr/local/directslave/ssl/server.key',
          'debug' => 1,
          'authfile' => '/usr/local/directslave/etc/passwd',
          'action_log' => '/usr/local/directslave/log/action.log',
          'server_type' => 'HTTP',
          'error_log' => '/usr/local/directslave/log/error.log',
          'uid' => 'named',
          'ssl' => 'off',
          'access_log' => '/usr/local/directslave/log/access.log',
          'background' => 0,
          'port' => '2222',
          'host' => '*',
          'sslport' => '2224',
          'named_workdir' => '/var/named/slaves',
          'allow' => 'all',
          'gid' => 'named'
        };
Listen ports: $VAR1 = [
          '2222'
        ];
 
Last edited:
What version of DS are you using? Cause your conf look different to mine (is that a copy of the actual direcslave.conf file?)?

Regards
 
Using root named does get rid of the workdir not found (but i already found that out).
Just not the pid part.

The config is a paste from the output of --debug

I'm using directslave 2.1beta (the latest on the first page)
 
What is the output for:

ls -l /usr/local/directslave/run/directslave.pid

can you remove that file (in case it exist) and restart direcslave?

rm -rf /usr/local/directslave/run/directslave.pid

Also, can you paste output for:

ls -l /usr/local/directslave/

Regards
 
Back
Top