Failing to Update Database after capture of image is complete on the client
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:
- Ensure /images has the appropriate permissions
- Ensure the storage management, tftp server and local fogproject user have the same password
- Verified the filesystem where /images resides is not ext3
- 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.
@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 -vas 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.
@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?
@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?
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.
@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.
@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
@Sebastian-Roth Here is the screenshot:
@tgidwani Seems like we need to work this out manually. Use a
ftpcommand line utility (Windows or Linux) and connect to the FOG server using the credentials you see in
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.
@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:
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.
with CentOS 7
Why didn’t I see this any earlier?!??!
Please run command
getenforceon 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
@Sebastian-Roth Here is the screenshot:
@tgidwani Please as well run
grep USERNAME /var/www/html/fog/lib/fog/config.class.phpand post results here.
@Sebastian-Roth Appreciate your help and quick response. Here is the screenshot:
@tgidwani Please run this command on your FOG server and post output here:
ls -alRt /images/
@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:
@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.
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:
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
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