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

    Updating Database...failed while updating an existing Image

    Scheduled Pinned Locked Moved
    FOG Problems
    3
    11
    2.3k
    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.
    • P
      p0Ldi
      last edited by

      We are running Version 1.3.5-RC-1 SVN Revision: 6066 and have the following Problem.

      The Capturing of a new image does work without a problem, but if we try to recapture an existing Image the “Updating Database failed” Error occurs.

      It looks like the capturing to /image/dev works just fine and the error occurs while moving the image files to /image/imagename.
      The existing image files created by fog are owned by root and the rights are 777, in fact that is the Situation for the whole /image.

      If I delete the existing image files before capturing the Task finishes successful.

      in debug Capturing the error message is

      Updating Database..................................................................................Failed
      Error returned: Type: 2, File: /var/www/html/fog/lib/fogftp.class.php, Line: 708, Message: ftp_put(): Could not create file., Host: X.X.X.X, Username: fog
      

      the vsftpd.log

      Fri Mar  3 13:56:24 2017 [pid 19725] CONNECT: Client "X.X.X.X"
      Fri Mar  3 13:56:24 2017 [pid 19725] FTP response: Client "X.X.X.X", "220 (vsFTPd 3.0.2)"
      Fri Mar  3 13:56:24 2017 [pid 19725] FTP command: Client "X.X.X.X", "USER fog"
      Fri Mar  3 13:56:24 2017 [pid 19725] [fog] FTP response: Client "X.X.X.X", "331 Please specify the password."
      Fri Mar  3 13:56:24 2017 [pid 19725] [fog] FTP command: Client "X.X.X.X", "PASS <password>"
      Fri Mar  3 13:56:24 2017 [pid 19724] [fog] OK LOGIN: Client "X.X.X.X"
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP response: Client "X.X.X.X", "230 Login successful."
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP command: Client "X.X.X.X", "PASV"
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP response: Client "X.X.X.X", "227 Entering Passive Mode (10,149,97,7,52,187)."
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP command: Client "X.X.X.X", "TYPE A"
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP response: Client "X.X.X.X", "200 Switching to ASCII mode."
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP command: Client "X.X.X.X", "LIST -a //images"
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP response: Client "X.X.X.X", "150 Here comes the directory listing."
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP response: Client "X.X.X.X", "226 Directory send OK."
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP command: Client "X.X.X.X", "RNFR //images/dev/705a0fd62bf6"
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP response: Client "X.X.X.X", "350 Ready for RNTO."
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP command: Client "X.X.X.X", "RNTO //images/P_Studi_HP650_2016_aktuell"
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP response: Client "X.X.X.X", "550 Rename failed."
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FAIL RENAME: Client "X.X.X.X", "//images/dev/705a0fd62bf6 //images/P_Studi_HP650_2016_aktuell"
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP command: Client "X.X.X.X", "TYPE I"
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP response: Client "X.X.X.X", "200 Switching to Binary mode."
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP command: Client "X.X.X.X", "PASV"
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP response: Client "X.X.X.X", "227 Entering Passive Mode (10,149,97,7,100,254)."
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP command: Client "X.X.X.X", "STOR //images/P_Studi_HP650_2016_aktuell"
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP response: Client "X.X.X.X", "553 Could not create file."
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FAIL UPLOAD: Client "X.X.X.X", "//images/P_Studi_HP650_2016_aktuell", 0.00Kbyte/sec
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP command: Client "X.X.X.X", "QUIT"
      Fri Mar  3 13:56:24 2017 [pid 19726] [fog] FTP response: Client "X.X.X.X", "221 Goodbye."
      

      Any Ideas where to look?

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

        Let me tell you about the process here.

        When FOG captures a target system, during the capture process the images are uploaded by the FOS target engine to the FOG server using NFS to the /images/dev/<mac_address> directory. This part seems to be working for you

        Once the capture is complete, FOS connects to the FOG server using FTP to move the captured image from /images/dev/<mac_address> to the /images/<image_name> directory. It does this since the move happens on the FOG server and only the file pointer is changed to the new directory. This is done very fast.

        Now the issue (and I believe yours) is if the linux fog user’s password is not in line with the account defined in the storage configuration setting for the master node.

        If this linux fog account password was changed for some reason the image capture process will fail.

        My second recommendation would be to update from RC1 to the latest RC release (RC10).

        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
        • P
          p0Ldi
          last edited by

          Thanks for the answer.
          Unfortunately that is not the solution. I checked the password for the user fog, the one stored in .fog_settings and the one in the web interface storage note configuration are identical and working fine.

          Logged into ftp with the credentials successfully.

          On top of this if the Image doesn`t exist before capturing or the directory /image/P_Studi_HP650_2016_aktuell is empty everything works fine and the vsftpd.log states “230 Login successful”

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

            @p0Ldi Is this your first image capture? i.e. new fog server?

            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!

            george1421G P 2 Replies Last reply Reply Quote 0
            • george1421G
              george1421 Moderator @george1421
              last edited by

              @george1421 Also one test would be to connect via ftp to the fog server. Change to the /images/dev directory and see if you can create a text file. Then try to move (mv) the file to the /images directory.

              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
              • P
                p0Ldi @george1421
                last edited by

                @george1421

                We updated from Version 1.2.0 and at first everything seemed fine, until we tried a recapture.

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

                  @p0Ldi While I don’t think this is your issue, I’m going to ask you to update to RC10 first. I want to make sure we are not working on a problem that already has been solved.

                  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!

                  P 1 Reply Last reply Reply Quote 1
                  • P
                    p0Ldi @george1421
                    last edited by

                    @george1421
                    I tried to put a file via ftp into /image/dev (worked) and then mv it to /image but it seems that there ist no move command known to the ftp server (vsftpd: version 3.0.2).

                    I will try the update to RC10 tomorrow.

                    Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                    • Wayne WorkmanW
                      Wayne Workman @p0Ldi
                      last edited by

                      @p0Ldi What OS is your fog server running on?

                      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!
                      Daily Clean Installation Results:
                      https://fogtesting.fogproject.us/
                      FOG Reporting:
                      https://fog-external-reporting-results.fogproject.us/

                      P 1 Reply Last reply Reply Quote 0
                      • P
                        p0Ldi @Wayne Workman
                        last edited by

                        @Wayne-Workman
                        It´s running on CentOS Linux release 7.3.1611

                        Wayne WorkmanW 1 Reply Last reply Reply Quote 0
                        • Wayne WorkmanW
                          Wayne Workman @p0Ldi
                          last edited by

                          @p0Ldi Update to rc10 please first, then try again.

                          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!
                          Daily Clean Installation Results:
                          https://fogtesting.fogproject.us/
                          FOG Reporting:
                          https://fog-external-reporting-results.fogproject.us/

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

                          139

                          Online

                          12.1k

                          Users

                          17.3k

                          Topics

                          155.3k

                          Posts
                          Copyright © 2012-2024 FOG Project