Changed IP of Fog, dhcpd is not starting anymore...
-
Server
- FOG Version: 1.4.4
- OS: debian 9.0.0
Client
- Service Version:
- OS:
Description
Hi there,
I wanted to change the IP-Address of the fog-server (according to this guide: https://wiki.fogproject.org/wiki/index.php?title=Change_FOG_Server_IP_Address.
The installer fails at the dhcpd:
* Press [Enter] key when database is updated/installed. * Setting up storage..........................................OK * Setting up and starting DHCP Server.........................Failed!
The point is, that obviously the dhcpd tries to bind to 192.168.100.x at enp3s1, which is the old IP-address/ethernet-interface.
The new one is 10.203.8.31 at ens33, which is in /opt/fog/.fogsettings, as well as in /etc/dhcp/dhcpd.conf.
The status of the daemon:
# service isc-dhcp-server status ● isc-dhcp-server.service - LSB: DHCP server Loaded: loaded (/etc/init.d/isc-dhcp-server; generated; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2017-08-01 13:35:37 CEST; 2min 0s ago Docs: man:systemd-sysv-generator(8) Process: 8126 ExecStop=/etc/init.d/isc-dhcp-server stop (code=exited, status=0/SUCCESS) Process: 8234 ExecStart=/etc/init.d/isc-dhcp-server start (code=exited, status=1/FAILURE) Aug 01 13:35:35 debian-linux systemd[1]: Starting LSB: DHCP server... Aug 01 13:35:35 debian-linux isc-dhcp-server[8234]: Launching IPv4 server only. Aug 01 13:35:35 debian-linux dhcpd[8245]: Wrote 0 class decls to leases file. Aug 01 13:35:35 debian-linux dhcpd[8245]: Wrote 0 leases to leases file. Aug 01 13:35:37 debian-linux isc-dhcp-server[8234]: Starting ISC DHCPv4 server: dhcpdcheck syslog for diagnostics. ... failed! Aug 01 13:35:37 debian-linux isc-dhcp-server[8234]: failed! Aug 01 13:35:37 debian-linux systemd[1]: isc-dhcp-server.service: Control process exited, code=exited status=1 Aug 01 13:35:37 debian-linux systemd[1]: Failed to start LSB: DHCP server. Aug 01 13:35:37 debian-linux systemd[1]: isc-dhcp-server.service: Unit entered failed state. Aug 01 13:35:37 debian-linux systemd[1]: isc-dhcp-server.service: Failed with result 'exit-code'.
And the daemon.log:
Aug 1 13:35:35 debian-linux isc-dhcp-server[8234]: Launching IPv4 server only. Aug 1 13:35:35 debian-linux dhcpd[8245]: Wrote 0 class decls to leases file. Aug 1 13:35:35 debian-linux dhcpd[8245]: Wrote 0 leases to leases file. Aug 1 13:35:35 debian-linux dhcpd[8245]: Aug 1 13:35:35 debian-linux dhcpd[8245]: No subnet declaration for enp3s1 (192.168.100.1). Aug 1 13:35:35 debian-linux dhcpd[8245]: ** Ignoring requests on enp3s1. If this is not what Aug 1 13:35:35 debian-linux dhcpd[8245]: you want, please write a subnet declaration Aug 1 13:35:35 debian-linux dhcpd[8245]: in your dhcpd.conf file for the network segment Aug 1 13:35:35 debian-linux dhcpd[8245]: to which interface enp3s1 is attached. ** Aug 1 13:35:35 debian-linux dhcpd[8245]: Aug 1 13:35:35 debian-linux dhcpd[8245]: Aug 1 13:35:35 debian-linux dhcpd[8245]: Not configured to listen on any interfaces! Aug 1 13:35:35 debian-linux dhcpd[8245]: Aug 1 13:35:35 debian-linux dhcpd[8245]: If you think you have received this message due to a bug rather Aug 1 13:35:35 debian-linux dhcpd[8245]: than a configuration issue please read the section on submitting Aug 1 13:35:35 debian-linux dhcpd[8245]: bugs on either our web page at www.isc.org or in the README file Aug 1 13:35:35 debian-linux dhcpd[8245]: before submitting a bug. These pages explain the proper Aug 1 13:35:35 debian-linux dhcpd[8245]: process and the information we find helpful for debugging..
dhcpd.conf:
subnet 10.203.8.0 netmask 255.255.248.0{ option subnet-mask 255.255.248.0; range dynamic-bootp 10.203.12.1 10.203.15.254; default-lease-time 21600; max-lease-time 43200; option routers 10.203.8.31; option domain-name-servers 10.203.8.31; next-server 10.203.8.31;
.fogsettings:
ipaddress='10.203.8.31' copybackold='0' interface='ens33' submask='255.255.248.0' routeraddress='10.203.8.31' plainrouter='' dnsaddress='10.203.8.31' username='fog' password="someencryptedpasswd" osid='2' osname='Debian' dodhcp='y' bldhcp='1' dhcpd='isc-dhcp-server' blexports='1' installtype='N' snmysqluser='root' snmysqlpass='' snmysqlhost='localhost' installlang='0' storageLocation='/images' fogupdateloaded=1 docroot='/var/www/html/' webroot='/fog/' caCreated='yes' startrange='10.203.12.1' endrange='10.203.15.254' bootfilename='undionly.kpxe' ...
Any help is appreciated
Thanx, Rainer -
@Tywyn I see two different interfaces in your post.
enp3s1
in the dhcpd log messages andens33
in the .fogsettings file. So I supposed you changed IP and interface. Please check/etc/default/isc-dhcp-server
file. TheINTERFACES=...
variable might be set to the wrong interface. -
I would start with updating the hidden config file in /opt/fog/.fogsettings.Then there are 3 places in the webgui where the IP address hides. There is 2 in the fog system settings in the web server and tftp server sections and then in the storage node configuration for the master node. Fix those locations then rerun the fog installer (./installfog.sh
) script. I know its a pita to fix but fog doesn’t like its IP address changed post installation. If you are creating a mobile fog server then there is a script to manage this process for you.OK forget that post. I did not read careful enough.
-
(OK now this time using some intelligence). In the same directory where the installfog.sh script is, there is a log directory. In that directory should be a log for each installation you have done. Review the install logs to see why dhcp isn’t happy.
-
@tywyn said in Changed IP of Fog, dhcpd is not starting anymore...:
isc-dhcp-server.service
You can / should also issue the start and stop commands manually
systemctl stop isc-dhcp-server.service
systemctl start isc-dhcp-server.service
To see if you can collect any additional information too.Also lets see your complete dhcp.conf file. If what you posted is it, you are missing some bits (and the trailing curly brace
}
) -
@Tywyn I see two different interfaces in your post.
enp3s1
in the dhcpd log messages andens33
in the .fogsettings file. So I supposed you changed IP and interface. Please check/etc/default/isc-dhcp-server
file. TheINTERFACES=...
variable might be set to the wrong interface. -
@sebastian-roth you are on the right track here with the interface name.
There’s an interface variable in /opt/fog/.fogsettings that needs updated. This may be impacting the logic that generates the dhcpd config.
-
@sebastian-roth said in Changed IP of Fog, dhcpd is not starting anymore...:
/etc/default/isc-dhcp-server
That was it.
I changed it, because indeed there was the old interface in there. Now the dhcpd works fine.
I also found, that in/tftpboot/default.ipxe
was the old IP-Address.Maybe these two places are worth to be mentioned in https://wiki.fogproject.org/wiki/index.php?title=Change_FOG_Server_IP_Address
Now I have another problem, but I will open a new thread for this
Thanx everybody for your help!
Rainer