DirectSlave/GO 3 - public beta

hape

Verified User
Joined
Jul 22, 2010
Messages
80
Location
Poland
Do you consider to add ability to overwrite master IP for example per user which created an entry?
 

bepulse

New member
Joined
Feb 16, 2021
Messages
3
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 !
 

roman_m

Verified User
Joined
May 5, 2005
Messages
176
Location
Ukraine, Kiev
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
 

frog9394

Verified User
Joined
Jun 27, 2008
Messages
19
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
 

roman_m

Verified User
Joined
May 5, 2005
Messages
176
Location
Ukraine, Kiev
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?
 

frog9394

Verified User
Joined
Jun 27, 2008
Messages
19
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.

[[email protected] directslave]# grep uid etc/directslave.conf
uid 25

[[email protected] directslave]# grep named /etc/passwd
named:x:25:25:Named:/var/named:/sbin/nologin

[[email protected] directslave]# runuser -u named touch run/test.txt

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

[[email protected] directslave]# systemctl stop directslave
[[email protected] directslave]# systemctl start directslave

[[email protected] 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.
 

frog9394

Verified User
Joined
Jun 27, 2008
Messages
19
Try to stop directslave via systemd then run it directly

[[email protected] 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?

[[email protected] /]# /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.

[[email protected] /]# /usr/local/directslave/bin/directslave --status

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

[[email protected] /]# ll /usr/local/directslave/run/
total 4
-rw-r--r--. 1 named named 4 Apr 2 02:56 directslave.pid
 

roman_m

Verified User
Joined
May 5, 2005
Messages
176
Location
Ukraine, Kiev
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.
 

frog9394

Verified User
Joined
Jun 27, 2008
Messages
19
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.
[[email protected] /]# 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

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

Still no pid file gen in the run directory.
 

frog9394

Verified User
Joined
Jun 27, 2008
Messages
19
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.

[[email protected] /]# 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!

[[email protected] /]# 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.
 
Top