Skip to content

dhcpd_restart_command subprocess results in errors #3

@wdennis

Description

@wdennis

When I run ztpgenerator.py device_data.csv, it is now giving me the following errors:

cp: cannot stat '/etc/dhcp/hosts.conf': No such file or directory
rm: cannot remove '/etc/dhcp/hosts.conf': No such file or directory

Generating device and dhcpd config files...

Job for isc-dhcp-server.service failed.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.
Job for isc-dhcp-server.service failed.
See "systemctl status isc-dhcp-server.service" and "journalctl -xe" for details.
Done generating config files...

Running HTTP Server...
Press "Ctrl+C" in console to close HTTP server.
^C

I do not understand the cp and rm outputs, as the /etc/dhcp/hosts.conf file does exist...

root@junos-ztp:~/ztpgenerator# ls -l /etc/dhcp/hosts.conf
-rw-r--r-- 1 root root 3129 Jan 16 20:16 /etc/dhcp/hosts.conf

Also, as for the restart of the isc-dhcp-server service, journalctl shows the service restart failing with "Start request repeated too quickly":

root@junos-ztp:~/ztpgenerator# journalctl -xe -u isc-dhcp-server
-- Unit isc-dhcp-server.service has finished shutting down.
Jan 16 20:16:04 junos-ztp systemd[1]: isc-dhcp-server.service: Start request repeated too quickly.
Jan 16 20:16:04 junos-ztp systemd[1]: isc-dhcp-server.service: Failed with result 'start-limit-hit'.
Jan 16 20:16:04 junos-ztp systemd[1]: Failed to start ISC DHCP IPv4 server.
-- Subject: Unit isc-dhcp-server.service has failed
-- Defined-By: systemd
-- Support: http://www.ubuntu.com/support
--
-- Unit isc-dhcp-server.service has failed.
--
-- The result is RESULT.

However, if I start the service by hand (systemctl start isc-dhcp-service) it starts correctly and then is running.

Ever see anything like this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions