The bit about “Service has more than one ExecStart= setting” is a mystery. There is, indeed, only one ExecStart.
named starts using the command “sudo named -u named”.
I assume then that there is a real reason for the error.
What could it be?
From systemctl status named.service
Failed to start named.service: Unit named.service has a bad unit file setting.
See system logs and 'systemctl status named.service' for details.
sma-user1:..lib/named> sudo systemctl status named.service
Warning: The unit file, source configuration file or drop-ins of named.service changed on disk. Run 'systemctl daemon-reload' to re>
○ named.service - Berkeley Internet Name Domain (DNS)
Loaded: bad-setting (Reason: Unit named.service has a bad unit file setting.)
Drop-In: /etc/systemd/system/named.service.d
└─override.conf
Active: inactive (dead)
Nov 26 12:23:25 sma-station12l systemd[1]: named.service: Cannot add dependency job, ignoring: Unit named.service has a bad unit fi>
Nov 26 12:56:04 sma-station12l systemd[1]: named.service: Service has more than one ExecStart= setting, which is only allowed for T>
From the system log:
2022-11-26T13:31:10-0700 sma-station12l systemd[1]: named.service: Service has more than one ExecStart= setting, which is only allowed for Type=oneshot services. Refusing.
When you post command output always post complete command line, full output and subsequent shell prompt. Only this way can we know how this output was generated, be sure it is complete and be able to make our own conclusion.
Failed to start named.service: Unit named.service has a bad unit file setting.
See system logs and 'systemctl status named.service' for details.
sma-user1:..lib/named> sudo systemctl status named.service
Warning: The unit file, source configuration file or drop-ins of named.service changed on disk. Run 'systemctl daemon-reload' to re>
Output is truncated which makes it only partially useful. Always use “–no-pager --full” options when posting systemctl or journalctl output.
○ named.service - Berkeley Internet Name Domain (DNS)
Loaded: bad-setting (Reason: Unit named.service has a bad unit file setting.)
Drop-In: /etc/systemd/system/named.service.d
└─override.conf
…
The unit file:
See above how to post information. We do not know where this unit file is located and whether it is related to your problem or not.
Anyway - there is file override.conf with unknown content. Show “systemctl cat named.service”.
I did run “sudo systemctl daemon-reload” to no effect.
$ sudo systemctl daemon-reload
$
So I should just delete “/etc/systemd/system/named.service.d/override.conf”?
$ sudo systemctl cat named.service
# Warning: named.service changed on disk, the version systemd has loaded is outdated.
# This output shows the current version of the unit's original fragment and drop-in files.
# If fragments or drop-ins were added or removed, they are not properly reflected in this output.
# Run 'systemctl daemon-reload' to reload units.
# /etc/systemd/system/named.service
[Unit]
Description=Berkeley Internet Name Domain (DNS)
After=network.target
After=time-set.target
Wants=nss-lookup.target
Wants=time-set.target
[Service]
Type=forking
KillMode=process
EnvironmentFile=/etc/sysconfig/named
ExecStartPre=+/usr/lib/bind/named.prep
ExecStart=/usr/sbin/named -u named $NAMED_ARGS
ExecReload=/usr/bin/kill -HUP $MAINPID
ProtectSystem=strict
ReadWritePaths=/var/lib/named /run/named /var/log /data01/var/log
PrivateDevices=yes
PrivateTmp=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectKernelLogs=yes
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
[Install]
WantedBy=multi-user.target
# /etc/systemd/system/named.service.d/override.conf
### /etc/systemd/system/named.service
[Unit]
Description=Berkeley Internet Name Domain (DNS)
After=network.target
After=time-set.target
Wants=nss-lookup.target
Wants=time-set.target
#
[Service]
Type=forking
KillMode=process
EnvironmentFile=/etc/sysconfig/named
ExecStartPre=+/usr/lib/bind/named.prep
ExecStart=/usr/sbin/named -u named $NAMED_ARGS
ExecReload=/usr/bin/kill -HUP $MAINPID
ProtectSystem=strict
ReadWritePaths=/var/lib/named /run/named /var/log /data01/var/log
PrivateDevices=yes
PrivateTmp=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectKernelLogs=yes
RestrictNamespaces=yes
RestrictRealtime=yes
RestrictSUIDSGID=yes
#
[Install]
WantedBy=multi-user.target
$