• Recent
  • Unsolved
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
  • 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.4k
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 May 20, 2019, 5:23 PM

    @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 May 20, 2019, 6:55 PM

      @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 May 20, 2019, 7:20 PM

        @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 May 20, 2019, 1:29 PM May 20, 2019, 7:29 PM

          @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 May 20, 2019, 7:33 PM

            @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 May 20, 2019, 1:45 PM May 20, 2019, 7:44 PM

              @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 May 20, 2019, 7:54 PM

                @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 May 20, 2019, 8:15 PM

                  @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 May 20, 2019, 8:25 PM

                    @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 May 20, 2019, 2:50 PM May 20, 2019, 8:50 PM

                      @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 May 20, 2019, 9:35 PM

                        @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 May 20, 2019, 10:05 PM

                          @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 May 21, 2019, 12:33 AM

                            @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 May 21, 2019, 12:14 AM May 21, 2019, 6:09 AM

                              @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 May 21, 2019, 7:54 PM

                                @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 May 22, 2019, 7:46 PM

                                  @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
                                  • T
                                    tgidwani
                                    last edited by May 22, 2019, 7:49 PM

                                    This post is deleted!
                                    1 Reply Last reply Reply Quote 0
                                    • S
                                      Sebastian Roth Moderator
                                      last edited by May 23, 2019, 9:13 AM

                                      @tgidwani Ok, lets try to focus on the following warning in the logs: ftp_put(/images/dev/ac1f6bb0690e): failed to open stream: No such file or directory

                                      What FOG does is it boots the FOS (FOG operating system) on the clients and mounts /images/dev directory (NFS export) to write the new captured image into /images/dev/<MAC-ADDRESS> - in your case the client MAC should be AC:1F:6B:B0:69:0E - please double check just to make sure there is no culprit in this. Now after the image capture is finished FOS calls back to the FOG server and tells it to move that newly captured image from /images/dev/<MAC-ADDRESS> to /images/<IMAGE-NAME> and this is exactly the point where things seem to fail for you.

                                      Thinks to check:

                                      • When capturing an image, do you see files being written to /images/dev/ac1f6bb0690e -> if not we need to figure out why!!
                                      • When the capture is finished, do you still have those files in place? They should still be there if rename/move failed. -> Then try to rename/move those manually via FTP to hopefully see why it fails. Connect via FTP as below and run: rename /images/dev/ac1f6bb0690e /images/Imagename

                                      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 May 23, 2019, 7:13 PM

                                        @Sebastian-Roth When I was experiencing said error the intermediary directory was never being created.

                                        It is working now. As mentioned in my previous reply asking about the default gateway, I think it has something to do with the Gateway configured in my network interface’s configuration file.

                                        Within the config file, GATEWAY= was pointing to an IP address that was not assigned to any machine on the current network when I moved networks. When I removed the GATEWAY= line from the config and ifdown and ifup my network interface, the update database error was resolved.

                                        Does FOS when communicating with the FOG server go through the default gateway even when both the client running FOS and the FOG server are on the same network?

                                        1 Reply Last reply Reply Quote 0
                                        • S
                                          Sebastian Roth Moderator
                                          last edited by Sebastian Roth May 23, 2019, 1:49 PM May 23, 2019, 7:48 PM

                                          @tgidwani Wow. Really glad you figured that out. I have done a lot of networking but I wouldn’t have expected the gateway setting to cause such an error. In theory the gateway information is only ever used when the host tries to connect to a machine that is not within it’s own subnet. So gateway shouldn’t play a role here as long as both were in the same subnet.

                                          Are you able to replicate the issue when putting the GATEWAY= line back into the 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
                                          • 1
                                          • 2
                                          • 1 / 2
                                          1 / 2
                                          • First post
                                            14/24
                                            Last post

                                          148

                                          Online

                                          12.0k

                                          Users

                                          17.3k

                                          Topics

                                          155.2k

                                          Posts
                                          Copyright © 2012-2024 FOG Project