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

    Disappearing images/Updating database... failed

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    3
    7
    695
    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.
    • J
      jserowoky
      last edited by

      I have set up a fog server on CentOS 8 running FOG version 1.5.8. When capturing an image, it will get to 100% and then I receive the “Updating database… failed” error. I also notice that the temp folder for the image created in the /images/dev directory disappears at that point. I read on the wiki this is usually a permission or credential issue and double-checked that my FTP path was set correctly and that the username and password under storage management match the ownership of the /images directory. I have also verified the TFTP, .fogsettings, and local fogproject user credentials match.

      In one instance I was able to manually rename and move the temp folder to /images and that is the only time I have gotten the image to stay.

      Any suggestions would be much appreciated

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

        @jserowoky said in Disappearing images/Updating database... failed:

        I also notice that the temp folder for the image created in the /images/dev directory disappears at that point.

        It should be moved to /images/IMAGENAME/. Do you see this? Or does it just disapear? I kind of doubt it does.

        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

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

          can you provide the output of these two commands
          ls -la /images/dev
          ls -la /images
          lsblk

          If these uploaded images are gone we’ll go through the ftp debugging steps. But lets see the output of those commands first.

          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!

          J 1 Reply Last reply Reply Quote 0
          • J
            jserowoky @Sebastian Roth
            last edited by

            @Sebastian-Roth I just ran it again watching both folders. In /images/dev the temp folder appears using a random alphanumeric name, which I’m assuming is normal (not super familiar with Linux yet.) It then moved to /images using the actual name of the image, while still receiving the same “updating database… failed” error. Then the client machine displays a new error stating “Could not complete tasking (/bin/fog.upload)” and it is at this point the /images/IMAGENAME directory disappears.

            1 Reply Last reply Reply Quote 0
            • J
              jserowoky @george1421
              last edited by

              @george1421 Here are the outputs for those commands:

              [root@fogserver2 ~]# ls -la /images/dev
              total 0
              drwxr-xr-x. 3 fogproject root 46 Mar 11 14:17 .
              drwxr-xr-x. 5 fogproject root 79 Mar 11 14:18 …
              -rwxrwxrwx. 1 fogproject root 0 Mar 5 17:58 .mntcheck
              drwxr-xr-x. 2 fogproject root 26 Mar 5 17:58 postinitscripts

              [root@fogserver2 ~]# ls -la /images
              total 0
              drwxr-xr-x. 5 fogproject root 79 Mar 11 14:18 .
              dr-xr-xr-x. 20 root root 275 Mar 5 17:59 …
              drwxr-xr-x. 3 fogproject root 46 Mar 11 14:17 dev
              -rwxrwxrwx. 1 fogproject root 0 Mar 5 17:58 .mntcheck
              drwxr-xr-x. 2 fogproject root 30 Mar 5 17:58 postdownloadscripts
              drwxr-xr-x. 2 root root 222 Mar 10 16:18 Win10_04.5

              [root@fogserver2 ~]# lsblk
              NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
              sda 8:0 0 931.5G 0 disk
              ├─sda1 8:1 0 1G 0 part /boot
              └─sda2 8:2 0 930.5G 0 part
              ├─cl_fogserver2-root 253:0 0 50G 0 lvm /
              ├─cl_fogserver2-swap 253:1 0 16G 0 lvm [SWAP]
              ├─cl_fogserver2-home 253:2 0 10G 0 lvm /home
              └─cl_fogserver2-images 253:3 0 854.5G 0 lvm /images
              sr0 11:0 1 1024M 0 rom

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

                @jserowoky ok your directories sure do look empty. I have to say I haven’t seen fog delete everything at this point.

                So where we are in the process is that when fog captures the image it uploads the image to /images/dev/<mac_address> when the capture is done the target computer logs into the FOG server using ftp and moves the directory from /images/dev/<mac_address> to /images/<image_Name> FOG uses the ftp mv command because on linux the move command just updates the directory pointers and never moves any files themselves. So the risk of deleting them is almost 0.

                The unable to update the database is a bit of an incorrect error since the ftp mv command happens just before the database is updated .

                So how to test this. We’ll use a windows computer with the cmd line ftp client.

                1. On the fog server review the hidden file /opt/fog/.fogsettings for a password field.
                2. On a windows computer using the ftp program log into the fog server using the user ID of fogproject and the password you collected from the .fogsettings file.
                3. If you can get logged in then execute these commands in the ftp client program.
                  cd /images/dev
                  mkdir bob
                  mv /images/dev/bob /images/sam
                  rm /images/sam
                4. With the exception of the rm command that is the process that FOG uses to create an image (more or less).

                Lets see where that fails.

                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 Sebastian Roth

                  @jserowoky Is SELinux enabled or disabled? Run getenforce and post output here.

                  Change access rights on the folders (chmod 775 /images /images/dev) and try capturing again.

                  In /images/dev the temp folder appears using a random alphanumeric name, which I’m assuming is normal.

                  Yes, we use the MAC address (without colon or hyphen notation) as temporary folder name in /images/dev.

                  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

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

                  182

                  Online

                  12.1k

                  Users

                  17.3k

                  Topics

                  155.3k

                  Posts
                  Copyright © 2012-2024 FOG Project