DirectSlave/GO 3 - public beta

Do you consider to add ability to overwrite master IP for example per user which created an entry?
 
Hello Guys,

When I update a DNS record trough DA, it does not reflect properly on the DS server, I have to issue the command "/usr/sbin/rndc reload domain.com" to get it updated.

Is there anything I have to do?

PS. I used the lastest script from bdacus01 and I am on Centos 7.

Thanks !
 
Hello Guys,

When I update a DNS record trough DA, it does not reflect properly on the DS server, I have to issue the command "/usr/sbin/rndc reload domain.com" to get it updated.

Is there anything I have to do?

PS. I used the lastest script from bdacus01 and I am on Centos 7.

Thanks !
Usually it's normal way primary->secondary DNS interacts. You can setup DNS notification for existing zones.

You may find this KB useful -- https://kb.isc.org/docs/aa-00726
 
Dear All,

I get the bellow error in the DS error.log when shutdown directslave.
2021/04/01 00:00:12 SHUTDOWN: SIGTERM received, exiting...
2021/04/01 00:00:12 Cant' delete pidfile: remove /usr/local/directslave/run/directslave.pid: no such file or directory
I have found no pid file in /usr/local/directsave/run

But I can find "pid /usr/local/directslave/run/directslave.pid" in /usr/local/directslave.conf

Anyone have any idea?

I am using CentOS 7 and the latest version directslave 3.4.1 Advanced
 
Dear All,

I get the bellow error in the DS error.log when shutdown directslave.
2021/04/01 00:00:12 SHUTDOWN: SIGTERM received, exiting...
2021/04/01 00:00:12 Cant' delete pidfile: remove /usr/local/directslave/run/directslave.pid: no such file or directory
I have found no pid file in /usr/local/directsave/run

But I can find "pid /usr/local/directslave/run/directslave.pid" in /usr/local/directslave.conf

Anyone have any idea?

I am using CentOS 7 and the latest version directslave 3.4.1 Advanced

Check /usr/local/directslave/run permissions, is it owned by directslave user (uid in /usr/local/directslave/etc/directslave.conf)
Is it writable?
 
Check /usr/local/directslave/run permissions, is it owned by directslave user (uid in /usr/local/directslave/etc/directslave.conf)
Is it writable?
Dear Roman,

Thanks for your prompt reply. I just test and user "named" can write to that directory. Please find the test procedure shown as below.

[root@ds directslave]# grep uid etc/directslave.conf
uid 25

[root@ds directslave]# grep named /etc/passwd
named:x:25:25:Named:/var/named:/sbin/nologin

[root@ds directslave]# runuser -u named touch run/test.txt

[root@ds directslave]# ll run
total 0
-rw-r--r--. 1 named named 0 Apr 2 01:06 test.txt

[root@ds directslave]# systemctl stop directslave
[root@ds directslave]# systemctl start directslave

[root@ds directslave]# ll run
total 0
-rw-r--r--. 1 named named 0 Apr 2 01:06 test.txt

The pid file still cannot be found. No luck.
 
Try to stop directslave via systemd then run it directly

[root@ds directslave]# /usr/local/directslave/bin/directslave --run

then check if pidfile available now.
 
Try to stop directslave via systemd then run it directly

[root@ds directslave]# /usr/local/directslave/bin/directslave --run

then check if pidfile available now.
Dear Roman,

Yes. It will generate the pid file when run it directly. But the service seems not runnng when I run "/usr/local/directslave/bin/directslave --status". The problem is systemd?

[root@ds /]# /usr/local/directslave/bin/directslave --run

DEBUG: Running as root (0), dropping privileges to 25:25

*** Starting DirectSlave GO/3.4.1 Advanced server ***
*** (c) Roman Mazur <[email protected]> 2012-2020 ***

Going background.

[root@ds /]# /usr/local/directslave/bin/directslave --status

DEBUG: Running as root (0), dropping privileges to 25:25
/usr/local/directslave/bin/directslave is not running.

[root@ds /]# ll /usr/local/directslave/run/
total 4
-rw-r--r--. 1 named named 4 Apr 2 02:56 directslave.pid
 
Yes. It will generate the pid file when run it directly. But the service seems not runnng when I run "/usr/local/directslave/bin/directslave --status". The problem is systemd?
May be...

Please check if DirectSlave installed as systemd native service in /etc/systemd/system/ (file directslave.service)
If not, please install it as directslave.service with following content:

Code:
[Unit]
Description=DirectSlave for DirectAdmin
After=network.target
[Service]
Type=simple
User=named
ExecStart=/usr/local/directslave/bin/directslave --run
Restart=always
[Install]
WantedBy=multi-user.target

Also delete legacy directslave service from /etc/init.d/ if any.

Then start ds via systemctl and all should be fine now.
 
May be...

Please check if DirectSlave installed as systemd native service in /etc/systemd/system/ (file directslave.service)
If not, please install it as directslave.service with following content:

Code:
[Unit]
Description=DirectSlave for DirectAdmin
After=network.target
[Service]
Type=simple
User=named
ExecStart=/usr/local/directslave/bin/directslave --run
Restart=always
[Install]
WantedBy=multi-user.target

Also delete legacy directslave service from /etc/init.d/ if any.

Then start ds via systemctl and all should be fine now.
[root@ds /]# vi /etc/systemd/system/directslave.service

My directslave.service file content as below
[Unit]
Description=DirectSlave
After=network.target

[Service]
Type=simple
ExecStart=/usr/local/directslave/bin/directslave --run
Restart=always

[Install]
WantedBy=multi-user.target

I've added "User=named" under "Type=simple" in the Service section and save the file

[root@ds /]# systemctl stop directslave
Warning: directslave.service changed on disk. Run 'systemctl daemon-reload' to reload units.
[root@ds /]# systemctl daemon-reload
[root@ds /]# systemctl stop directslave
[root@ds /]# systemctl start directslave
[root@ds /]# ll /usr/local/directslave/run/
total 0

Still no pid file gen in the run directory.
 
Please check last service exit status via

systemctl status directslave

and post output here.

Thanks!
Dear Roman,

Directslave service failed if I added "User=named" in the directslave.service.

[root@ds /]# systemctl status directslave
● directslave.service - DirectSlave
Loaded: loaded (/etc/systemd/system/directslave.service; enabled; vendor preset: disabled)
Active: failed (Result: start-limit) since Fri 2021-04-02 19:40:38 HKT; 1 day 22h ago
Process: 16420 ExecStart=/usr/local/directslave/bin/directslave --run (code=exited, status=250)
Main PID: 16420 (code=exited, status=250)

It can be run after I removed "User=named" in the directslave.service. Although there is no pid file. But It seems working fine. Thanks!

[root@ds /]# systemctl status directslave
● directslave.service - DirectSlave
Loaded: loaded (/etc/systemd/system/directslave.service; enabled; vendor preset: disabled)
Active: active (running) since Sun 2021-04-04 18:33:31 HKT; 3s ago
Main PID: 19306 (directslave)
CGroup: /system.slice/directslave.service
└─19306 /usr/local/directslave/bin/directslave --run

Apr 04 18:33:31 da4 systemd[1]: Started DirectSlave.
Apr 04 18:33:31 da4 directslave[19306]: DEBUG: Running as root (0), dropping privileges to 25:25
Apr 04 18:33:31 da4 directslave[19306]: *** Starting DirectSlave GO/3.4.1 Advanced server ***
Apr 04 18:33:31 da4 directslave[19306]: *** (c) Roman Mazur <[email protected]> 2012-2020 ***
Apr 04 18:33:31 da4 directslave[19306]: Going background.
 
Back
Top