• Recent
    • Unsolved
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Changed IP of Fog, dhcpd is not starting anymore...

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    4
    7
    2.3k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • T
      Tywyn
      last edited by Tywyn

      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

      1 Reply Last reply Reply Quote 0
      • S
        Sebastian Roth Moderator
        last edited by

        @Tywyn I see two different interfaces in your post. enp3s1 in the dhcpd log messages and ens33 in the .fogsettings file. So I supposed you changed IP and interface. Please check /etc/default/isc-dhcp-server file. The INTERFACES=... variable might be set to the wrong interface.

        Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

        Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

        Wayne WorkmanW 1 Reply Last reply Reply Quote 2
        • george1421G
          george1421 Moderator
          last edited by george1421

          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.

          Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

          1 Reply Last reply Reply Quote 0
          • george1421G
            george1421 Moderator
            last edited by

            (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.

            Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

            1 Reply Last reply Reply Quote 0
            • george1421G
              george1421 Moderator
              last edited by george1421

              @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 })

              Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!

              1 Reply Last reply Reply Quote 0
              • S
                Sebastian Roth Moderator
                last edited by

                @Tywyn I see two different interfaces in your post. enp3s1 in the dhcpd log messages and ens33 in the .fogsettings file. So I supposed you changed IP and interface. Please check /etc/default/isc-dhcp-server file. The INTERFACES=... variable might be set to the wrong interface.

                Web GUI issue? Please check apache error (debian/ubuntu: /var/log/apache2/error.log, centos/fedora/rhel: /var/log/httpd/error_log) and php-fpm log (/var/log/php*-fpm.log)

                Please support FOG if you like it: https://wiki.fogproject.org/wiki/index.php/Support_FOG

                Wayne WorkmanW 1 Reply Last reply Reply Quote 2
                • Wayne WorkmanW
                  Wayne Workman @Sebastian Roth
                  last edited by

                  @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.

                  Please help us build the FOG community with everyone involved. It's not just about coding - way more we need people to test things, update documentation and most importantly work on uniting the community of people enjoying and working on FOG!
                  Daily Clean Installation Results:
                  https://fogtesting.fogproject.us/
                  FOG Reporting:
                  https://fog-external-reporting-results.fogproject.us/

                  1 Reply Last reply Reply Quote 0
                  • T
                    Tywyn
                    last edited by Tywyn

                    @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

                    1 Reply Last reply Reply Quote 1
                    • 1 / 1
                    • First post
                      Last post

                    192

                    Online

                    12.0k

                    Users

                    17.3k

                    Topics

                    155.2k

                    Posts
                    Copyright © 2012-2024 FOG Project