SOLVED TFTP open timeout but it seems to work

  • Hi guys, i love FOG but sometimes i hate it! it think our story is 1/2 love and 1/2 hate. 🙂

    I have a problem, the site is working well but i cant register any host or download upload anything because i have this annoying TFTP timeout error. !
    I’m on ubuntu server 14.04.2 LTS and i had the 1.0.0 version of FOG, i updated it yesterday because it was not working.
    actually i have to manually start the mysql service after each reboot or i get the database error when i try to reach the FOG page, i fixed it before an ubuntu update.
    i also noticed that many FOG settings are duplicate, here an example.

    i also tried to do

    sudo stop tftpd-hpa
    sudo start tftpd-hpa

    and i can see the FOG ipxe menù but if i select something (like full registration) it give the TFTP open timeout screen.

    here the Config.class.php

    * Class Name: Config
    * Initializes default settings.
    * Most notably the sql connection.
    class Config
            * Calls the required functions to define the settings.
            * method db_settings()
            * method svc_setting()
            * method init_setting()
            public function __construct()
            * db_settings()
            * Defines the database settings for FOG
            * @return void
            private static function db_settings()
                    define('DATABASE_TYPE',         'mysql');       // mysql or oracle
                    define('DATABASE_HOST',         'localhost');
                    define('DATABASE_NAME',         'fog');
                    define('DATABASE_USERNAME',             'root');
                    define('DATABASE_PASSWORD',             'abff29');
            * svc_setting()
            * Defines the service settings.
            * (e.g. FOGMulticastManager,
            *       FOGScheduler,
            *       FOGImageReplicator)
            * @return void
            private static function svc_setting()
                    define( "UDPSENDERPATH", "/usr/local/sbin/udp-sender" );
                    define( "MULTICASTLOGPATH", "/opt/fog/log/multicast.log" );
                    define( "MULTICASTDEVICEOUTPUT", "/dev/tty2" );
                    define( "MULTICASTSLEEPTIME", 10 );
                    define( "MULTICASTINTERFACE", "eth0" );
                    define( "UDPSENDER_MAXWAIT", null );
                    define( "LOGMAXSIZE", "1000000" );
                    define( "REPLICATORLOGPATH", "/opt/fog/log/fogreplicator.log" );
                    define( "REPLICATORDEVICEOUTPUT", "/dev/tty3" );
                    define( "REPLICATORSLEEPTIME", 600 );
                    define( "REPLICATORIFCONFIG", "/sbin/ifconfig" );
                    define( "SCHEDULERLOGPATH", "/opt/fog/log/fogscheduler.log" );
                    define( "SCHEDULERDEVICEOUTPUT", "/dev/tty4" );
                    define( "SCHEDULERSLEEPTIME", 60 );
            * init_setting()
            * Initial values if fresh install are set here
            * NOTE: These values are only used on initial
            * installation to set the database values.
            * If this is an upgrade, they do not change
            * the values within the Database.
            * Please use FOG Configuration->FOG Settings
            * to change these values after everything is
            * setup.
            * @return void
            private static function init_setting()
    define('TFTP_HOST', "");
                    define('TFTP_FTP_USERNAME', "fog");
                    define('TFTP_FTP_PASSWORD', "abff29");
                    define('TFTP_PXE_KERNEL_DIR', '/var/www/fog/service/ipxe/');
                    define('PXE_KERNEL', 'bzImage');
                    define('MEMTEST_KERNEL', 'memtest.bin');
                    define('PXE_IMAGE', 'init.xz');
                    define('PXE_IMAGE_DNSADDRESS', "");
                    define('STORAGE_HOST', "");
                    define('STORAGE_FTP_USERNAME', "fog");
                    define('STORAGE_FTP_PASSWORD', "abff29");
                    define('STORAGE_DATADIR', '/images/');
                    define('STORAGE_DATADIR_UPLOAD', '/images/dev/');
                    define('STORAGE_BANDWIDTHPATH', '/fog/status/bandwidth.php');
                    define('WEB_HOST', "");
                    define('WOL_HOST', "");
                    define('WOL_PATH', '/fog/wol/wol.php');
                    define('WOL_INTERFACE', "eth0");
                    define('SNAPINDIR', "/opt/fog/snapins/");
                    define('QUEUESIZE', '10');
                    define('USER_VALIDPASSCHARS', '1234567890ABCDEFGHIJKLMNOPQRSTUVWZXYabcdefghijklmnopqrstuvwxyz_()^!#-');
                    define('NFS_ETH_MONITOR', "eth0");
                    define('UDPCAST_INTERFACE', "eth0");
                    define('UDPCAST_STARTINGPORT', 63100 );                                         // Must be an even number! recommended between 49152 to 65535
                    define('FOG_JPGRAPH_VERSION', '2.3');
                    define('FOG_REPORT_DIR', './reports/');
                    define('FOG_DONATE_MINING', "0");

    and the .fogsettings

    ## Created by the FOG Installer
    ## Version: 1.2.0
    ## Install time: Mon 22 Jun 2015 15:30:03 CEST
    routeraddress="         option routers;";
    dnsaddress="    option domain-name-servers; ";

    The firewall is disabled and if i try to do tftp x.x.x.x get undionly.kpxe from a windows pc it can download the file…

    I don’t know what else i can do, do you have any suggestion?
    thanks a lot for your work guys.

  • @Lesso Nice article. 🙂

    Feel free to request access to the FOG Project’s WiKi. 🙂 We need more people that are good technical writers.

  • @lessndro said:

    fortunately i found also this page because it explain how to modify the default.ipxe file (maybe someone should update the wiki!) and finally i can get in the FOG menù at every boot.

    😄 Glad someone found my boredom useful and thank you for referencing my site rather than copying and pasting the info.

  • Hello Guys, i forgot to say one thing… yes it is working… we updated to trunk… BUT all this because Wayne Workman connected to our server and fixed it! thanks a lot for you help and your time!
    thanks thanks thanks

  • Got FOG working by upgrading to Trunk. However in this particular instance, a new but less concerning problem emerged. Duplicate fog settings… Read further here:

  • unfortunately the restart didn’t change anything and also reinstalling mysql nothing happen.

    i did

    sudo apt-get remove mysql-server
    sudo apt-get install mysql-server

    thanks for the support

  • @lessndro I’d first try to restart the database. If that didn’t work, I’d remove then reinstall it.

    sudo service mysql restart


    apt-get remove mysql mysql-server
    apt-get install mysql mysql-server


    apt-get remove mariadb mariadb-server
    apt-get install mariadb mariadb-server

  • yeah, a lot of hours wasted for a trivial error… actually we are for re-do all the network and add a lot of new servers, it can be the right time for do a complete documentation.

    what about the new error? I tried to google it but i can’t find others people with the same problem, i hope it is fixable!
    thanks a lot

    ----- UPDATE

    I discovered i can’t modify anything, for example if a try to create a new image i can do it but after i don’t see the new image in the list, is like i have only read permissions…

  • @lessndro 🙂 IP conflicts lol.

    To avoid that, you either need amazingly anal documentation skills from every single I.T. person in your organization,


    Do not use static addresses, just simply make reservations in DHCP for your always-on equipment - and keep documentation on your reservations.
    Because, if DHCP fails, you’re screwed anyways till it’s fixed, right?

  • Hello guys, thanks a lot for your answers. Yesterday i was home so i didn’t tested anything, now i’m here. 🙂

    i tried to follow the ‘IP conflict’ way… i changed the reservation from DHCP to another ip that i was sure it was free ( i updated the DHCP fog info (i put again the undionly.kpxe instead of the .kkpxe) and followed the first part of this wiki and fortunately i found also this page because it explain how to modify the default.ipxe file (maybe someone should update the wiki!) and finally i can get in the FOG menù at every boot.

    …and YES there was an ip conflict! from the dhcp server i could see the (old ip) was free but probably a client took it because after i changed the FOG server to the new ip i could still ping and i see a device from a ip scanner


    unfortunately i don’t know how to understand which device it is because i tried to do ‘ping -a’ but i only get the ip address and also from Spicework if i try to search the mac address i can’t find it. I also tried to search the mac address on the DHCP server but nothing. Anyway it is just a curiosity because now i don’t need that ip.

    NOW i have another problem, but i hope this time it will be easier. Since i update FOG to 1.2.0 i noticed that i lost every host previously registered, not a big problem because i register only a few hosts because it was a pretty new installation… the problem is that i cannot register any new host. If i try from the pxe menù to do a quick or a full registration i get this error:


    and also if i try to register a new host on the the website it says ‘Host added’ but if i i click on ‘List All Hosts’ i can’t see any host. do you have any idea?
    thanks a lot

  • @lessndro How hard would it be to get a Chat session going and potentially a Teamviewer session?

    My guess is the DHCP items are not setup properly and therefore not actually doing anything.

  • @lessndro You should do TCPDump at the earliest time possible.

    It’s the one thing that will reveal what’s going on.

  • the ip of the server is still the same (i also browse the FOG site with the ip in the address bar) and also in the dhcp server i see only it with his ip, maybe i can try to change it just for see what happen. thanks again

  • Just a simple thing to check but… since your DHCP server changed, maybe check for an IP conflict with the FOG server… or… maybe your FOG server is set to receive DHCP and it’s IP changed?

  • i forgot to say that the server was working well, than we moved our dhcp server to another machine (window server 2008) and FOG starts to has problems. at the start i thought the FOG has problems also with its site because i couldn’t reach it from my pc so i did many tries and i discovered my pc had a problem…many hours wasted but this is the best way to learn. so here the new configuration on the new dhcp server my colleague did. It seems ok for me, so i will try to do the TCPDump. Thanks again


  • @lessndro It would seem that somehow this host is not getting the file… Normally this points to DHCP config being wrong… but if you think it’s right, I’d suggest running a TCPDump and seeing what the client is asking for, and where it’s asking for it, and to whom it’s asking…

    Check this out:

    There’s a bit in there about TCPDump.

    You might also check out the DHCP stuff too, and the rest of the article as well.

  • Hi Wayne,
    thanks for yours answer. unfortunately same error.

  • can you try to change your boot file to undionly.kkpxe and see if it makes a difference? This is done on your DHCP server.

    We can address the mysql issue in a moment… wanna get other things running first.