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

    Failing to Update Database after capture of image is complete on the client

    Scheduled Pinned Locked Moved Solved
    FOG Problems
    3
    24
    4.2k
    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
      tgidwani
      last edited by

      Hello Everyone,

      I am get a Updating Database … FAILED error message when trying to run a capture task on a client. The image is being captured successfully.

      I am running FOG version 1.5.6 with CentOS 7. Currently, I have the firewalld stopped and disabled and selinux disabled.

      I have tried the following using the troubleshooting article on the wiki:

      1. Ensure /images has the appropriate permissions
      2. Ensure the storage management, tftp server and local fogproject user have the same password
      3. Verified the filesystem where /images resides is not ext3
      4. Tried the capture task with a managed and unmanaged switch as well

      I am going through a process of elimination at this point and any help would be much appreciated.

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

        Could you provide a clear screen shot of the error page taken with a mobile phone?

        Does the error message (before the failed to update database) mention anything about ftp_put?

        Ensure the storage management, tftp server and local fogproject user have the same password

        Does this password match the password stored in /opt/fog/.fogsettings file?

        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
        • T
          tgidwani
          last edited by tgidwani

          @george1421 Here are the screenshots of the entire process that my client goes though once a capture task has been scheduled:

          Screenshot 1
          Screenshot 2
          Screenshot 3
          Screenshot 4
          Screenshot 5
          Screenshot 6

          No, I do not see any error message (before the failed to update database) that mentions anything about ftp_put.

          Yes, those passwords match the password stored in /opt/fog/.fogsettings

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

            @tgidwani Seems like you run into some kind of issue where the “Update Database” returns with a “Service U available” from the FOG web server. On retry it fails because the update seems to have happened despite the unavailable error. So now it can’t update anymore and keeps failing.

            We need to figure out why you get the unavailable in the first place. How many machines with the fog-client sotfware do you have installed?

            Please take a look at the apache error log. See my signature on where to find that log.

            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
            • T
              tgidwani
              last edited by

              @Sebastian-Roth if by fog-client software you mean the service that runs in the background I have not installed that service on the Windows 10 OS I am trying to capture with FOG. Currently, I am only working with 1 physical PC.

              Here is the workflow I am following:

              • PXE boot physical PC
              • Perform full host registration and inventory on physical PC using FOS
              • Using the FOG web UI, schedule a capture task for this physical PC
              • PXE boot the physical PC and the capture task begins running
              • Capture completes but encounters a update database failed error

              I have gone through the entire troubleshoot guide here and still I continue getting the failed to update database error.

              Here are the screenshots from the 3 main error log files:

              apache-error-log.PNG

              php-fpm-error-log.PNG

              php-fpm-www-error-log.PNG

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

                @tgidwani Please run this command on your FOG server and post output here: ls -alRt /images/

                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
                • T
                  tgidwani
                  last edited by

                  @Sebastian-Roth Appreciate your help and quick response. Here is the screenshot:

                  images-permissions.PNG

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

                    @tgidwani Please as well run grep USERNAME /var/www/html/fog/lib/fog/config.class.php and post results here.

                    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
                    • T
                      tgidwani
                      last edited by

                      @Sebastian-Roth Here is the screenshot:

                      username-config.PNG

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

                        @tgidwani said in Failing to Update Database after capture of image is complete on the client:

                        with CentOS 7

                        Why didn’t I see this any earlier?!??!

                        Please run command getenforce on your FOG server and post output here.

                        Sure you wanna read this: https://wiki.fogproject.org/wiki/index.php?title=CentOS_7#Continue_pre-config

                        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
                        • T
                          tgidwani
                          last edited by

                          @Sebastian-Roth I followed all the steps in the mentioned article when setting up my CentOS 7 VM and before installing FOG.

                          Here is the screenshot:

                          selinux-status.PNG

                          When I got the update database failure, I disabled and stopped firewalld and set selinux=disabled in /etc/selinux/config and restarted my CentOS 7 VM. Re-ran the capture process but still continued to get the same failure of updating database.

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

                            @tgidwani Seems like we need to work this out manually. Use a ftp command line utility (Windows or Linux) and connect to the FOG server using the credentials you see in /var/www/html/fog/lib/fog/config.class.php.

                            Try connecting, then create and rename a directory just to see if things work like expected:

                            shell> ftp 192.168.2.5
                            Connected to 192.168.2.5.
                            220 (vsFTPd 3.0.3)
                            Name (192.168.2.5:roth): fogproject
                            331 Please specify the password.
                            Password:
                            230 Login successful.
                            Remote system type is UNIX.
                            Using binary mode to transfer files.
                            ftp> pwd
                            257 "/home/fogproject" is the current directory
                            ftp> cd /images/dev
                            250 Directory successfully changed.
                            ftp> mkdir test12345
                            257 "/images/dev/test12345" created
                            ftp> rename test12345 12345test
                            350 Ready for RNTO.
                            250 Rename successful.
                            ftp> rm 12345test
                            250 Remove directory operation successful.
                            ftp> quit
                            221 Goodbye.
                            

                            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
                            • T
                              tgidwani
                              last edited by

                              @Sebastian-Roth Here is the screenshot:

                              ftp-test.PNG

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

                                @tgidwani Alright, FTP is not an issue I am fairly sure now. Seems like I was miss-lead by the messages we saw in the php-fpm log file. Those probably came from the time before you disabled SELinux… I reckon.

                                So do you still see it failing on database update at the end of the task?

                                Please check the log files again but this time only take a look at the last 10 lines: tail -10 /var/log/php-fpm/www-error.log

                                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
                                • T
                                  tgidwani
                                  last edited by

                                  @Sebastian-Roth I cleared all three error log files today before posting the screenshots here. With or without SeLinux disabled I keep getting the same failed to update database error.

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

                                    @tgidwani said in Failing to Update Database after capture of image is complete on the client:

                                    I cleared all three error log files today

                                    Don’t you get new log entries when doing a new capture? There is no possible way we can help you without getting more evidence on what exactly is causing this. Logs are usually the best way to figure this out.

                                    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
                                    • T
                                      tgidwani
                                      last edited by

                                      @Sebastian-Roth My apologizes for the confusion. I meant I cleared them only today to eliminate the possibility of looking at stale logs entries.

                                      I do get new log entries every time I run a capture. I continue getting the same error every time. Update database failed with the same ftp_put failure. Would you like me to re-run the capture? Since I have not changed anything I am not why the problem would go away?

                                      Do you think it is a version issue? I am running 1.5.6? Does updating the database process depend upon DNS or a default gateway by chance?

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

                                        @tgidwani Ahhh, I see, got that wrong, sorry. I will take a look at our code again to see if I can figure out what might be causing this.

                                        Just to be sure, Do you still get the full list of exact same ftp_… messages in the log everytime even when SELinux is disabled/permissive?

                                        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
                                        • S
                                          Sebastian Roth Moderator
                                          last edited by

                                          @tgidwani Looking at out code more closely I noticed that most of those ftp_... warnings are perfectly fine. FTP is not able to remove a directory that isn’t empty yet. So we do some kind of recursive delete which leads to print out all of the “ftp_delete” and “ftp_rmdir” messages which are not important. I’ll still remove those in the next release we get less confusion.

                                          But the “ftp_rename” and “ftp_put” warnings make me think there is something wrong with your NFS shares. Just guessing here but let’s give it a try. Please run exportfs -v as root on your FOG server and post output here. As well take a picture of the Storage Node setting in the web UI and post a picture here.

                                          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
                                          • T
                                            tgidwani
                                            last edited by

                                            @Sebastian-Roth Good to know about some of the warnings. Here are the screenshots:

                                            exportfs-v-output.PNG

                                            storage-node-settings-1.PNG
                                            storage-node-settings-2.PNG

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

                                            191

                                            Online

                                            12.0k

                                            Users

                                            17.3k

                                            Topics

                                            155.2k

                                            Posts
                                            Copyright © 2012-2024 FOG Project