[Dspace-tech] Exporting communities or collections with bin/dspace packager -d -a … throws an error

9 views
Skip to first unread message

Christian Völker

unread,
Aug 26, 2015, 1:14:21 PM8/26/15
to dspace-tech
Hello,

I am using the dspace packer command line feature for the first time.

My Repository runs DSpace 1.8.3 on Tomcat 7, Ubuntu 12.04 LTS and Postgres 9.1.

Disseminating single items works flawlessly.

However, disseminating whole collections or communities constantly throws the same Exception. I tried various collections or communities. The communities I tried contained two or more collections but no subcommunities. I chose collections and communities that hold about twenty items or less for now.

As this is an IOException while creating a tempfile it is worth noting that my dspace user is tomcat7 who is not allowed to write to his own home directory by default in Debian/Ubuntu. This did not pose any problems for years and indeed I see this as a security advantage and a means to facilitate relocation to a freshly installed machine which happens from time to time.

The filename given on the command line is touched and has a size of zero. I cant see which file the packager actually tries to create when the exception gets thrown. It is just my arbitrary assumption that the packager tries to create a tempfile in the users home directory. I also assume that a tempfile is not required for exporting a single item, even if this item contains several bitstreams.

To prove whether it makes a difference, I ran the dspace packager command as root as well. Although this might not be usual operation, running the command as root makes sure that the user can write to its home directory and in fact eveery directory and file and that execution rights are available for the dspace CLI, which would not be the case for e.g. my login account.

I dont like the idea of changing the dspace user on a production system. Can anybody explain me what the packager tries to do exactly when failing? Thanks for suggestions.

Here comes a link to the collection I tried and a listing of several commands. First as user tomcat7, then as root.

Bye, Christian



<http://stadtteilgeschichten.net/handle/2339/4227>


esxh-15:/srv/dspace/packager> ../bin/dspace packager -e stadtteilg...@arcor.de -d -t AIP -i 2339/4227 4227.zip

Disseminating DSpace COLLECTION [ hdl=2339/4227 ] to 4227.zip
Exception: No such file or directory
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1833)
at java.io.File.createTempFile0(File.java:1857)
at java.io.File.createTempFile(File.java:1934)
at org.dspace.content.crosswalk.RoleCrosswalk.disseminateElement(RoleCrosswalk.java:186)
at org.dspace.content.packager.AbstractMETSDisseminator.crosswalkToMetsElement(AbstractMETSDisseminator.java:1359)
at org.dspace.content.packager.AbstractMETSDisseminator.makeMdSec(AbstractMETSDisseminator.java:614)
at org.dspace.content.packager.AbstractMETSDisseminator.addToAmdSec(AbstractMETSDisseminator.java:727)
at org.dspace.content.packager.AbstractMETSDisseminator.addAmdSec(AbstractMETSDisseminator.java:753)
at org.dspace.content.packager.AbstractMETSDisseminator.makeManifest(AbstractMETSDisseminator.java:839)
at org.dspace.content.packager.AbstractMETSDisseminator.writeZipPackage(AbstractMETSDisseminator.java:311)
at org.dspace.content.packager.AbstractMETSDisseminator.disseminate(AbstractMETSDisseminator.java:258)
at org.dspace.content.packager.DSpaceAIPDisseminator.disseminate(DSpaceAIPDisseminator.java:160)
at org.dspace.app.packager.Packager.disseminate(Packager.java:671)
at org.dspace.app.packager.Packager.main(Packager.java:460)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183)
esxh-15:/srv/dspace/packager> ../bin/dspace packager -e stadtteilg...@arcor.de -d -t AIP -i 2339/4228 4228.zip

Disseminating DSpace ITEM [ hdl=2339/4228 ] to 4228.zip

CREATED package file: /srv/dspace/packager/4228.zip
esxh-15:/srv/dspace/packager> id
uid=114(tomcat7) gid=122(tomcat7) Gruppen=122(tomcat7)
esxh-15:/srv/dspace/packager> ls -la
insgesamt 9352
drwxr-xr-x 2 tomcat7 tomcat7 4096 Jun 11 12:48 .
drwxrwxr-x 23 tomcat7 tomcat7 4096 Jun 11 11:33 ..
-rw-r--r-- 1 tomcat7 tomcat7 0 Jun 11 12:42 4225.zip
-rw-r--r-- 1 tomcat7 tomcat7 0 Jun 11 12:40 4226.zip
-rw-r--r-- 1 tomcat7 tomcat7 0 Jun 11 12:49 4227.zip
-rw-r--r-- 1 tomcat7 tomcat7 548845 Jun 11 12:49 4228.zip
-rw-r--r-- 1 tomcat7 tomcat7 809265 Jun 11 12:48 4229.zip
-rw-r--r-- 1 tomcat7 tomcat7 261623 Jun 11 12:47 4230.zip
esxh-15:/srv/dspace/packager> exit
exit
cvoelker@esxh-15:/srv/dspace/packager$ sudo tcsh
esxh-15:/srv/dspace/packager# ../bin/dspace packager -e stadtteilg...@arcor.de -d -t AIP -i 2339/4225 -a 4225.zip

Disseminating DSpace COMMUNITY [ hdl=2339/4225 ] to 4225.zip

Also disseminating all child objects (recursive mode)..
This may take a while, please check your logs for ongoing status while we process each package.
Exception: No such file or directory
java.io.IOException: No such file or directory
at java.io.UnixFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1833)
at java.io.File.createTempFile0(File.java:1857)
at java.io.File.createTempFile(File.java:1934)
at org.dspace.content.crosswalk.RoleCrosswalk.disseminateElement(RoleCrosswalk.java:186)
at org.dspace.content.packager.AbstractMETSDisseminator.crosswalkToMetsElement(AbstractMETSDisseminator.java:1359)
at org.dspace.content.packager.AbstractMETSDisseminator.makeMdSec(AbstractMETSDisseminator.java:614)
at org.dspace.content.packager.AbstractMETSDisseminator.addToAmdSec(AbstractMETSDisseminator.java:727)
at org.dspace.content.packager.AbstractMETSDisseminator.addAmdSec(AbstractMETSDisseminator.java:753)
at org.dspace.content.packager.AbstractMETSDisseminator.makeManifest(AbstractMETSDisseminator.java:839)
at org.dspace.content.packager.AbstractMETSDisseminator.writeZipPackage(AbstractMETSDisseminator.java:311)
at org.dspace.content.packager.AbstractMETSDisseminator.disseminate(AbstractMETSDisseminator.java:258)
at org.dspace.content.packager.DSpaceAIPDisseminator.disseminate(DSpaceAIPDisseminator.java:160)
at org.dspace.content.packager.AbstractPackageDisseminator.disseminateAll(AbstractPackageDisseminator.java:86)
at org.dspace.app.packager.Packager.disseminate(Packager.java:635)
at org.dspace.app.packager.Packager.main(Packager.java:460)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:622)
at org.dspace.app.launcher.ScriptLauncher.main(ScriptLauncher.java:183)
esxh-15:/srv/dspace/packager# id
uid=0(root) gid=0(root) Gruppen=0(root)
esxh-15:/srv/dspace/packager# touch ~/test
esxh-15:/srv/dspace/packager#


Reply all
Reply to author
Forward
0 new messages