Updating Database...failed while updating an existing Image
-
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?
-
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).
-
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”
-
@p0Ldi Is this your first image capture? i.e. new fog server?
-
@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.
-
We updated from Version 1.2.0 and at first everything seemed fine, until we tried a recapture.
-
@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.
-
@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.
-
@p0Ldi What OS is your fog server running on?
-
@Wayne-Workman
It´s running on CentOS Linux release 7.3.1611 -
@p0Ldi Update to rc10 please first, then try again.