Image Capture FTP Failure - Could Not Create File



  • Server
    • FOG Version: 1.4.2
    • OS: Ubuntu 14.04
    Client
    • Service Version: 0.11.12
    • OS: Windows 7

    I just updated from 1.40 to 1.42 and tried to capture an image after updating. The image capture completes successfully, but when it tries to update the database, it fails with the following screens.

    0_1497529449721_fail 1.JPG
    0_1497530510030_fail 2.JPG

    I saw the troubleshooting FTP wiki article and verified that I can connect to /images with the fog account and password that is listed in storage management. I can create a test file to this directory, edit it, and delete it. This username and password match in all of the areas listed in the wiki

    I enabled all permissions on the /images directory using the following

    sudo chmod -R 777 /images

    I also set the ownership of /images using this:
    sudo chown -R fog:root /images

    Any help would be appreciated.

    Thanks!


  • Moderator

    @jaoyer said in Image Capture FTP Failure - Could Not Create File:

    Yes. Taking the “/” out of the name fixed my issue.

    I think we should reconsider, maybe we should filter out the /'s in the image name, but allow them in the image path. If they were in the image name I can see bad things happening. (I haven’t confirmed if they are allowed in the image name or not, I’m only suggesting based on this discussion)



  • @Tom-Elliott

    Yes. Taking the “/” out of the name fixed my issue.

    Thank you guys for all the hard work in developing and maintaining this awesome project.


  • Senior Developer

    @Sebastian-Roth This is really possible. The “feature” is to allow you to put images into sub folders of the root images folder.


  • Developer

    @jaoyer said in Image Capture FTP Failure - Could Not Create File:

    HAHA… Ok so this is twice now that I have asked for help on the forums and it has been a stupid simple fix.

    Don’t worry. This is what a forum is about! More eyes looking at it and hopefully finding the issue. You are welcome to post any question/issue and together we’ll figure it out.

    @george1421 said:

    Its a feature not a bug.

    I am not sure about this… Surely enough I have been offline for some time and missed some things. But having slashes in your image name to me seems problematic nevertheless. Please let me know if this is really possible.


  • Senior Developer

    @jaoyer So it’s safe to solve this thread? Sorry I didn’t poke my neck in. I didn’t notice the / in the image path as passed either.

    Glad @george1421 and @Sebastian-Roth were able to help.



  • @Sebastian-Roth

    HAHA… Ok so this is twice now that I have asked for help on the forums and it has been a stupid simple fix. I am going home.

    I changed the name, and it pushed up successfully.

    Thanks for your help!


  • Moderator

    @Sebastian-Roth said in Image Capture FTP Failure - Could Not Create File:

    There is a linux directory seperator / in that image name

    Its a feature not a bug.

    Just giving some background info here:
    FOG was updated to allow creating subdirectories as part of the image path. i.e. in /images you create a directory called lab01, lab02 and so on. Then in your image definition you would give the image path to lab01/<image_name> and FOS will store the file in /images/lab01/<image_name>. Now, I’m not sure what will happen if you define a image path name of lab01/<image_name> without having /images/lab01 directory created. That may be the case here.


  • Developer

    What the heck!!! Why didn’t I see this earlier? Trying to find out the name of the image in the picture you posted first I might have found the issue… In that screenshot it says img=WPS/WESTeacherSyspreppedImage2. There is a linux directory seperator / in that image name?!? Sure enough this will cause trouble at some point.



  • @Sebastian-Roth

    When I first got this error message, I was trying to update an existing image. I thought maybe it was having trouble overwriting the current image, so I created a new image in the fog web interface, and told it to capture, but still received the error message.

    Here is the output of ls -al /images /images/dev

    0_1497619443335_ls-output.jpg


  • Developer

    Ok, does not seem to be the old ext3 issue I had years ago. What if you delete /images/<IMAGENAME> by hand on the FOG server before uploading a new one. Do you still get the same error messages?

    As well please post the output (or a picture) of ls -al /images /images/dev, just to make sure we don’t miss anything important here.



  • @Sebastian-Roth

    It moved successfully.

    Here is a screenshot of the mount command

    0_1497618588452_mount.JPG

    Thanks!


  • Developer

    @jaoyer Don’t be confused by the “Updating Database” message. There is not just database stuff happening but also FOG moves the captured image from /images/dev/<MAC> to /images/<IMAGENAME> (besides other FTP stuff, see here in the code). So can you please try this. Connect using the FTP client as you just did and then try to move the image (directory) as described above. I am fairly sure this will fail.

    By the way, can you please run the command mount on your FOG server and post the output here? I just remembered an old issue I ran into when using ext3 filesystem to store my images on… ext3 wasn’t fast enough to finish the delete (due to internal defragmentation magic) and failed on ftp_rename because the destination still existed at that time.



  • @Sebastian-Roth

    I connected to it using filezilla and the fog credentials listed in the storage management page. I can upload files into /images. I created just a test text file and it created fine. I edited it and saved it. I then deleted it.

    I can see the image that I tried to push up in /images/dev, so I think the image process worked ok, but am not sure about why it failed to update the database at the end.

    Thanks!


  • Developer

    @jaoyer Please try connecting to the FTP server on your FOG system using a normal FTP client. Then try uploading files, creating and moving directories. Does this all work?



  • I have a little over 162 gb free. I pulled down an image yesterday, and it imaged fine and updated the database fine at the end of imaging. It seems that this issue is only when I try to push and image up to the server.

    Thanks!



  • How’s your server on free space for /images ?


 

526
Online

41.8k
Users

12.3k
Topics

116.0k
Posts