Reattempting to update database...Failed



  • Hi everybody,

    running fog 1.5.2 and today I tried to clone 12+18 computers.
    Imaging itself went fine but when the clients tried to reconnect to update the database after the cloning, they all came to this point:
    0_1533641934603_IMAG0019.jpg

    Apache errorlog:

    [Tue Aug 07 12:37:08.653642 2018] [proxy_fcgi:error] [pid 2669] [client 10.10.11.63:48862] AH01071: Got error 'PHP message: PHP Notice:  A non well formed numeric value encountered in /var/www/html/fog/status/bandwidth.php on line 109\nPHP message: PHP Notice:  A non well formed numeric value encountered in /var/www/html/fog/status/bandwidth.php on line 109\nPHP message: PHP Notice:  A non well formed numeric value encountered in /var/www/html/fog/status/bandwidth.php on line 110\nPHP message: PHP Notice:  A non well formed numeric value encountered in /var/www/html/fog/status/bandwidth.php on line 110\n'
    [Tue Aug 07 12:43:07.355829 2018] [php7:warn] [pid 2669] [client 10.10.11.62:48840] PHP Warning:  trim() expects parameter 1 to be string, array given in /var/www/html/fog/lib/fog/fogbase.class.php on line 1382, referer: http://fog.schulung.bfz.de/fog/management/index.php?node=task&sub=active
    [Tue Aug 07 13:14:32.307638 2018] [proxy_fcgi:error] [pid 3950] (70007)The timeout specified has expired: [client 10.10.11.202:43110] AH01075: Error dispatching request to : (polling)
    [Tue Aug 07 13:14:32.328505 2018] [proxy_fcgi:error] [pid 5031] (70007)The timeout specified has expired: [client 10.10.11.201:53474] AH01075: Error dispatching request to : (polling)
    [Tue Aug 07 13:14:32.378917 2018] [proxy_fcgi:error] [pid 4077] (70007)The timeout specified has expired: [client 
    

    After this the fog gui also did not react anymore.
    Had to reboot the fog-server.

    Second try resulted in the same behavior.

    Any ideas?
    Thanx in advance, Rainer



  • Thanx.
    The thread can be marked als solved. Can I do this somewhere or can just a board admin do that?


  • Moderator

    @tywyn That’s correct on both accounts. It doesn’t hurt to fill it in, but if you’re on 1.5 you can ignore dnsbootimage indeed.

    The DHCP server needs to be able to point clients to a local DNS server so that they know where to look.



  • @quazz said in Reattempting to update database...Failed:

    dnsaddress=‘yourdnsserver (possibly router)’
    dnsbootimage=‘yourdnsserver (possibly router)’

    Hi,

    thank you for your hint. 2 remarks:

    I am struggeling with the documentation here: https://wiki.fogproject.org/wiki/index.php/.fogsettings#dnsaddress
    It says that the parameter dnsaddress is used for dhcp setup. What does that actually mean? Is this value put in /etc/dhcp/dhcpd.conf as option domain-name-servers ipadress;

    Same documentation says, that dnsbootimage is no longer used?


  • Moderator

    @tywyn Please fill in the variables

    routeraddress='yourrouterip'
    plainrouter='yourrouterip'
    dnsaddress='yourdnsserver (possibly router)'
    dnsbootimage='yourdnsserver (possibly router)'
    

    in /opt/fog/.fogsettings

    Assuming you want FOG to handle DHCP of course…

    If not set

    dodhcp='N'
    bldhcp='0'
    

    in /opt/fog/.fogsettings



  • @Sebastian-Roth
    On the dashboard I can see in the lower right corner: 1.5.4

    And here is the dhcpd.conf:

    # DHCP Server Configuration file\n#see /usr/share/doc/dhcp*/dhcpd.conf.sample
    # This file was created by FOG
    #Definition of PXE-specific options
    # Code 1: Multicast IP Address of bootfile
    # Code 2: UDP Port that client should monitor for MTFTP Responses
    # Code 3: UDP Port that MTFTP servers are using to listen for MTFTP requests
    # Code 4: Number of seconds a client must listen for activity before trying
    #         to start a new MTFTP transfer
    # Code 5: Number of seconds a client must listen before trying to restart
    #         a MTFTP transfer
    option space PXE;
    option PXE.mtftp-ip code 1 = ip-address;
    option PXE.mtftp-cport code 2 = unsigned integer 16;
    option PXE.mtftp-sport code 3 = unsigned integer 16;
    option PXE.mtftp-tmout code 4 = unsigned integer 8;
    option PXE.mtftp-delay code 5 = unsigned integer 8;
    option arch code 93 = unsigned integer 16;
    use-host-decl-names on;
    ddns-update-style interim;
    ignore client-updates;
    # Specify subnet of ether device you do NOT want service.
    # For systems with two or more ethernet devices.
    # subnet 136.165.0.0 netmask 255.255.0.0 {}
    subnet 10.10.11.0 netmask 255.255.255.0{
        option subnet-mask 255.255.255.0;
        range dynamic-bootp 10.10.11.10 10.10.11.254;
        default-lease-time 21600;
        max-lease-time 43200;
        #option routers 0.0.0.0
        #option routers 0.0.0.0
        next-server 10.10.11.63;
        class "Legacy" {
            match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00000";
            filename "undionly.kkpxe";
        }
        class "UEFI-32-2" {
            match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00002";
            filename "i386-efi/ipxe.efi";
        }
        class "UEFI-32-1" {
            match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00006";
            filename "i386-efi/ipxe.efi";
        }
        class "UEFI-64-1" {
            match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00007";
            filename "ipxe.efi";
        }
        class "UEFI-64-2" {
            match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00008";
            filename "ipxe.efi";
        }
        class "UEFI-64-3" {
            match if substring(option vendor-class-identifier, 0, 20) = "PXEClient:Arch:00009";
            filename "ipxe.efi";
        }
        class "SURFACE-PRO-4" {
            match if substring(option vendor-class-identifier, 0, 32) = "PXEClient:Arch:00007:UNDI:003016";
            filename "ipxe.efi";
        }
        class "Apple-Intel-Netboot" {
            match if substring(option vendor-class-identifier, 0, 14) = "AAPLBSDPC/i386";
            option dhcp-parameter-request-list 1,3,17,43,60;
            if (option dhcp-message-type = 8) {
                option vendor-class-identifier "AAPLBSDPC";
                if (substring(option vendor-encapsulated-options, 0, 3) = 01:01:01) {
                    # BSDP List
                    option vendor-encapsulated-options 01:01:01:04:02:80:00:07:04:81:00:05:2a:09:0D:81:00:05:2a:08:69:50:58:45:2d:46:4f:47;
                    filename "ipxe.efi";
                }
            }
        }
    }
    
    

    @all: Thanx for your help


  • Developer

    @Tywyn said:

    Installscript says:

    What this means is, be careful when you install FOG on a server that has any other services running in production. For example if you have a web server running on this system, running a FOG installation can break the other website’s apache configuration.

    Accessing the url provided I cannot see, where I can install/update my database schema

    After the upgrade which version do you see in the blue cloud on the web UI? Just wondering. From version to version there might be DB schema updates but I am not sure if there were any from 1.5.2 to 1.5.4, possibly not.

    Having done an update without changing anything in the config, but adding a second NIC with a new default gateway: Do I have to bother about the error-message below?

    Please post your FOG DHCP config here so we can have a look (/etc/dhcp/dhcpd.conf).



  • @Sebastian-Roth , @george1421

    It was a proxy-issue. I have had http_proxy environment set, but I did not have https_proxy.
    Fixing that I ran into a timeout concerning a connection to a key-server.

    gpg: requesting key E5267A6C from hkp server keyserver.ubuntu.com
    Error: retrieving gpg key timed out.
    

    So I decided to add another NIC to bypass the proxy and connect directly to the internet an so the install went through.
    There still remain 3 questions concerning the update process:

    1. Installscript says:
       # It is not recommended that you install this on a production system #
       #        as this script modifies many of your system settings.       #
    

    when I have a production system running fog, which method shall I use then, if not running install-script?

    1. Accessing the url provided I cannot see, where I can install/update my database schema
     * You still need to install/update your database schema.
     * This can be done by opening a web browser and going to:
    
       http://10.10.11.63/fog/management
    
     * Press [Enter] key when database is updated/installed.
    
    1. Having done an update without changing anything in the config, but adding a second NIC with a new default gateway: Do I have to bother about the error-message below?
    * Setting up and starting DHCP Server......................... !!! No router address found !!!
    !!! No dns address found !!!
    OK
    
    

  • Developer



  • @george1421

    Unfortunately does not work either:

    # add-apt-repository ppa:ondrej/php
    Cannot add PPA: 'ppa:~ondrej/ubuntu/php'.
    ERROR: '~ondrej' user or team does not exist.
    

  • Moderator

    @tywyn This appears to be a ubuntu issue. A quick google-fu shows up quite a few posts with the same error.

    I’m a rhel not debian guy so I can only post what I found.

    Try to add these repositories your self by hand with:

    sudo add-apt-repository ppa:ondrej/php
    sudo add-apt-repository ppa:ondrej/apache2
    sudo apt-get update
    sudo apt-get upgrade
    

    Then rerun the installer.



  • @george1421
    ~$ cat /etc/issue
    Ubuntu 16.04.5 LTS \n \l


  • Moderator

    @tywyn What version of ubuntu are you using? It appears that third party library is no longer available.



  • @george1421 Hi,

    thanx for your advice. Tried to update. Here is what I did:
    For the previous installation of 1.5.2:

    cd /root
    git clone https://github.com/FOGProject/fogproject.git
    cd /root/fogproject/bin
    ./installfog.sh
    

    Now for the update to 1.5.4:

    cd /root/fogproject
    git pull https://github.com/FOGProject/fogproject.git
    cd /root/fogproject/bin
    ./installfog.sh
    

    The install fails. Here is the errorlog:

    /usr/bin/lsb_release
    /bin/systemctl
    /opt/fog/.fogsettings
    Paketlisten werden gelesen...
    Abhängigkeitsbaum wird aufgebaut....
    Statusinformationen werden eingelesen....
    ntpdate is already the newest version (1:4.2.8p4+dfsg-3ubuntu5.9).
    software-properties-common is already the newest version (0.96.20.7).
    python-software-properties is already the newest version (0.96.20.7).
    0 aktualisiert, 0 neu installiert, 0 zu entfernen und 35 nicht aktualisiert.
     8 Aug 09:33:01 ntpdate[3288]: no server suitable for synchronization found
    Generating locales (this might take a while)...
      en_US.UTF-8... done
    Generation complete.
    Cannot add PPA: 'ppa:~ondrej/ubuntu/php'.
    ERROR: '~ondrej' user or team does not exist.
    Cannot add PPA: 'ppa:~ondrej/ubuntu/apache2'.
    ERROR: '~ondrej' user or team does not exist.
    

    Any idea?


  • Moderator

    OK there are two things you need to do.

    1. Upgrade to at least FOG version 1.5.4
    2. There are some tweaks that you need to do to 1.5.4 to make FOG happy.

    Lets assume this is the issue we’ve found after FOG 1.5.4 has been released.

    1. Change to the /etc directory from the fog server linux command prompt.
    2. Search for www.conf file. It can be in a number of locations depending on what version of php is installed. Use this command.
      find /etc -name www.conf (hopefully you will only find one)
    3. Edit that file file and ensure these settings are accurate. Don’t just add them since all should be there except php_admin_value[memory_limit] = 256M you will need to add that entry.
    php_admin_value[memory_limit] = 256M
    pm.max_requests = 2000
    pm.max_children = 35
    pm.min_spare_servers = 5
    pm.start_servers = 5
    
    1. Save and exit your text editor.
    2. Reboot the fog server.
    3. See if that fixes what is wrong. You really should only see this strangeness under heavy load, but I guess it might show up sooner under certain conditions.

Log in to reply
 

435
Online

5.8k
Users

13.0k
Topics

123.1k
Posts