Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CF push fails with "Error processing app files: remove <TEMP_FOLDER>\unzipped-app160441603\BOOT-INF\lib: The directory is not empty #1355

Closed
tanhung3101 opened this issue Mar 29, 2018 · 5 comments

Comments

@tanhung3101
Copy link

tanhung3101 commented Mar 29, 2018

Command

cf push

What occurred

When pushing a java app from a windows machine once in a while we are treated with error after the upload of file is complete

FAILED Error processing app files: remove <FOLDER_TEMP>\unzipped-app160441603\BOOT-INF\lib: The directory is not empty

What you expected to occur

CF CLI should not fail since it can't clean up temp folder, as it's a minor issue to exit the push, it should ignore and continue with the remaining task.

CLI Version

cf version 6.35.2+88a03e995.2018-03-15

CC API Endpoint Version

v2 (2.75.0)

CF Trace

Platform & Shell Details

Windows 10 64-bit with cmd only

Any other relevant information

error_cf_push

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/156363481

The labels on this github issue will be updated when the story is started.

@XenoPhex
Copy link
Contributor

XenoPhex commented Mar 30, 2018

@tanhung3101 By chance, are you running an Anti-Virus, if so, which one/version?

Also, are you seeing a similar Deprecation warning at the top of your push:

Deprecation warning: Route component attributes 'domain', 'domains', 'host', 'hosts' and 'no-hostname' are deprecated. Found: host.
Please see http://docs.cloudfoundry.org/devguide/deploy-apps/manifest.html#deprecated for the currently supported syntax and other app manifest deprecations. This feature will be removed in the future.

If you are seeing the deprecation warning. Please update your manifest.yml to use the non-deprecated properties and that will allow you to push with the non-legacy version of push which has fixed the issue.

@tanhung3101
Copy link
Author

@XenoPhex : I'm using McAfee v5.0.5.658

And I do see the deprecation warning when pushing my app. So do you think the root cause is my manifest.yml file?

@XenoPhex
Copy link
Contributor

@tanhung3101 Sorry for the delayed response! Yes the issue is the manifest file contains deprecated fields and is falling back on the legacy version of push (aka the old crunchy code). The problem you're seeing is due to the old code making multiple copies of your app files into a TEMP directory and then your virus scanner wanting to scan these copies for safety reasons. Because of this scanning, when the CF CLI tries to delete them (post upload), the files are still open by the Antivirus and an error occurs.

If you remove all the deprecated fields, push will use the new (more performant and safe) version of the code which has a fix for the problem you're seeing. This version only creates a single ZIP file in your TEMP dir containing your app bits which is much quicker to scan/requires less work for your anti-virus. Additionally, if push can't delete the file, for whatever reason, it'll just display a warning instead of breaking push.

I'm going to close this issue as it's been solved for manifests containing non-deprecated fields. Feel free to continue asking questions/providing feedback. I'll try and stay on top of any replies to this thread. Sorry again for the delay!!

@XenoPhex
Copy link
Contributor

Marking as dupe of #1006.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants