• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion
  • Inviting everyone to the UX test of a new security feature in the WP Toolkit
    For WordPress site owners, threats posed by hackers are ever-present. Because of this, we are developing a new security feature for the WP Toolkit. If the topic of WordPress website security is relevant to you, we would be grateful if you could share your experience and help us test the usability of this feature. We invite you to join us for a 1-hour online session via Google Meet. Select a convenient meeting time with our friendly UX staff here.

Resolved DNS does not start via systemd

Michael E

New Pleskian
Hello,

i have a problem with starting bind9 as a service. systemctl start bind9.service waits about 15 seconds on the console.

OS ‪Debian 9.7‬
Product Plesk Onyx
Version 17.8.11 Update #37,

systemctl start bind9.service shows:

â bind9.service - BIND Domain Name Server
Loaded: loaded (/lib/systemd/system/bind9.service; enabled; vendor preset: enabled)
Active: failed (Result: timeout) since Sun 2019-02-03 17:30:51 UTC; 13s ago
Docs: man:named(8)
Process: 22403 ExecStart=/usr/sbin/named $OPTIONS (code=exited, status=0/SUCCESS)
CPU: 48ms

Feb 03 17:30:51 download5.hh-software.com systemd[1]: bind9.service: Start operation timed out. Terminating.
Feb 03 17:30:51 download5.hh-software.com named[22403]: shutting down
Feb 03 17:30:51 download5.hh-software.com named[22403]: stopping command channel on 127.0.0.1#953
Feb 03 17:30:51 download5.hh-software.com named[22403]: no longer listening on ::#53
Feb 03 17:30:51 download5.hh-software.com named[22403]: no longer listening on 127.0.0.1#53
Feb 03 17:30:51 download5.hh-software.com named[22403]: no longer listening on 87.106.127.25#53
Feb 03 17:30:51 download5.hh-software.com named[22403]: no longer listening on 172.17.0.1#53
Feb 03 17:30:51 download5.hh-software.com systemd[1]: Failed to start BIND Domain Name Server.
Feb 03 17:30:51 download5.hh-software.com systemd[1]: bind9.service: Unit entered failed state.
Feb 03 17:30:51 download5.hh-software.com systemd[1]: bind9.service: Failed with result 'timeout'.

When I call bind directly (/usr/sbin/named -f -t /var/named/run-root -c /etc/named.conf -u bind -n 2) I have no problems.

I have already tried: plesk repair dns

Checking the DNS configuration file ................................. [OK]

Restoring DNS server configuration

Synchronize DNS zones with the DNS server? [Y/n] Y
Synchronizing DNS zones with the DNS server ..................... [OK]

Error messages: 0; Warnings: 0; Errors resolved: 0

I think it's something to do with the Service Manager systemd.

Thanks, Michael.


 
Could you please post here [Service] section of /lib/systemd/system/bind9.service file here?
 
Hello,

my bind9.service:

[Unit]
Description=BIND Domain Name Server
Documentation=man:named(8)
After=network.target
Wants=nss-lookup.target
Before=nss-lookup.target

[Service]
Type=forking
EnvironmentFile=-/etc/default/bind9
ExecStart=/usr/sbin/named $OPTIONS
ExecReload=/usr/sbin/rndc reload
ExecStop=/usr/sbin/rndc stop

[Install]
WantedBy=multi-user.target

The value for $OPTIONS is -f -t /var/named/run-root -c /etc/named.conf -u bind -n defined in /etc/default/bind9
 
Try to remove line

Type=forking

and change line

ExecStart=/usr/sbin/named $OPTIONS

to

ExecStart=/usr/sbin/named -f $OPTIONS

after that try to start bind9.
 
I have removed type=forking and changed

ExecStart=/usr/sbin/named $OPTIONS


to

ExecStart=/usr/sbin/named -f $OPTIONS


Though ExecStart=/usr/sbin/named -f $OPTIONS makes no sense for me as OPTIONS contains already -f (OPTIONS=-f -t /var/named/run-root -c /etc/named.conf -u bind -n)

unfortunately it does not solve the problem. The console hangs at systemctl start bind9.service for 15-20 secondes. I would expect the prompt should apear in time?
 
I did a recent update from debian 9 to 10 and I did encounter the same issue - and today there was an update to the bind package which changed my /lib/systemd/system/bind9.service back to containing "type=forking" and the missing -f.
is there something broken with my bind install that is does not work with the default setting the package seems to want?
should I remove bind via plesk installer and add it again to fix it in the long run?
 
I also have to change the bind9.service after every update to remove the "type=forking".

@Plesk team: Can you please check what is wrong here.
 
Please open a support ticket with Plesk support so that an engineer can check it on your server.
 
Back
Top