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

NFS lock file prevents deletion of resource #1311

Closed
kbraak opened this issue Jan 4, 2017 · 1 comment
Closed

NFS lock file prevents deletion of resource #1311

kbraak opened this issue Jan 4, 2017 · 1 comment

Comments

@kbraak
Copy link
Contributor

kbraak commented Jan 4, 2017

When the IPT data directory is on an NFS volume, an NFS lock file in the resource directory prevents the deletion of the resource. This lock file is likely the result of a file input stream or similar not being closed properly.

Instructions on how to reproduce the issue, including screenshot of the issue and stacktrace are included below.

To reproduce:

  1. configure IPT instance using IPT directory on NFS
  2. create a new empty resource
  3. upload a new file source, click add, then save
  4. click delete button on resource overview page (produces result shown in screenshot attached)

Screenshot:
screen shot 2017-01-04 at 11 57 45

Stacktrace:

ERROR Failed to remove resource.
java.io.IOException: Unable to delete file: /var/lib/tomcat/ipt-giasip-data/resources/test1234567/sources/.nfs0000000007750a8000000004
	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2381)
	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1679)
	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1575)
	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2372)
	at org.apache.commons.io.FileUtils.cleanDirectory(FileUtils.java:1679)
	at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1575)
	at org.apache.commons.io.FileUtils.forceDelete(FileUtils.java:2372)
	at org.gbif.ipt.service.manage.impl.ResourceManagerImpl.delete(ResourceManagerImpl.java:703)
	at org.gbif.ipt.action.manage.OverviewAction.delete(OverviewAction.java:267)
@kbraak
Copy link
Contributor Author

kbraak commented Mar 9, 2017

Closing additional instances in commit fdcb647 fixed this issue, allowing the fix to be included in version 2.3.4.

A reminder gbif/dwca-io#22 still needs fixing, at which point the IPT should upgrade to this newer version of dwca-io to ensure more CSVReader instances get closed properly.

@kbraak kbraak closed this as completed Mar 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant