Configuration file errors encountered while trying to start/restart DHCP service on Red Hat Satellite.
Environment
- Red Hat Satellite 6.x
Issue
- Unable to start
dhcpd.service
:
● dhcpd.service - DHCPv4 Server Daemon
Loaded: loaded (/etc/systemd/system/dhcpd.service; enabled; vendor preset: disabled)
Active: failed (Result: exit-code) since Wed 2019-05-15 11:31:47 IST; 2h 39min ago
Docs: man:dhcpd(8)
man:dhcpd.conf(5)
Process: 1038 ExecStart=/usr/sbin/dhcpd -f -cf /etc/dhcp/dhcpd.conf -user dhcpd -group dhcpd --no-pid ens192 (code=exited, status=1/FAILURE)
Main PID: 1038 (code=exited, status=1/FAILURE)
May 15 11:31:47 satellite.redhat.com dhcpd[1038]: /etc/dhcp/dhcpd.conf line 12: semicolon expected.
May 15 11:31:47 satellite.redhat.com dhcpd[1038]: option domain-name-servers 192.168.0.200 192.
May 15 11:31:47 satellite.redhat.com dhcpd[1038]: ^
May 15 11:31:47 satellite.redhat.com dhcpd[1038]: Configuration file errors encountered -- exiting
May 15 11:31:47 satellite.redhat.com dhcpd[1038]:
May 15 11:31:47 satellite.redhat.com dhcpd[1038]: This version of ISC DHCP is based on the release available
May 15 11:31:47 satellite.redhat.com systemd[1]: dhcpd.service: main process exited, code=exited, status=1/FAILURE
May 15 11:31:47 satellite.redhat.com systemd[1]: Failed to start DHCPv4 Server Daemon.
May 15 11:31:47 satellite.redhat.com systemd[1]: Unit dhcpd.service entered failed state.
May 15 11:31:47 satellite.redhat.com systemd[1]: dhcpd.service failed.
Resolution
- Verify if the syntax to separate IP's for the following parameter at /etc/foreman-installer/scenarios.d/satellite-answers.yaml is correct:
# vi /etc/foreman-installer/scenarios.d/satellite-answers.yaml
dhcp_nameservers: "192.168.0.200; 192.168.0.205" <<============= Adding a semicolon here fixed the error.
- Run the installer to read the configuration file again and make desired changes:
# satellite-installer -S satellite
Root Cause
- A semicolon for the
dhcp_nameservers
parameter in /etc/foreman-installer/scenarios.d/satellite-answers.yaml was missing.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.
Comments