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

Project archive import fails to copy log files #513

Closed
gschueler opened this issue Aug 19, 2013 · 3 comments
Closed

Project archive import fails to copy log files #513

gschueler opened this issue Aug 19, 2013 · 3 comments
Labels
Milestone

Comments

@gschueler
Copy link
Member

Project archive import seems to have a problem sometimes when moving the log file for an execution to the right place, echoing this message:

ERROR ProjectService - Unable to move temp log file to destination: /..snip../project/job/123.txt (old id 321)

Then the execution log cannot be viewed for that execution.

The problem might be caused by having temp files and log files on separate disks, so the system cannot rename the file directly, causing the File.renameTo to fail.

Potential workarounds, need confirmation:

Change the temp dir used by java:

  • for RPM/deb modify the RUNDECK_TEMPDIR variable in /etc/rundeck/profile
  • for launcher, set -Djava.io.tmpdir=/path when starting the server
@gschueler
Copy link
Member Author

Mailing list thread about this issue: https://groups.google.com/forum/#!msg/rundeck-discuss/qRPnlbvkLJM/QNRNd9h5CZoJ

@gschueler
Copy link
Member Author

From a user: changing the launcher's $RDECK_BASE/etc/profile and rundeckd script to set temp dir to local $RDECK_BASE/var/tmp fixed the issue:

export RDECK_JVM="$RDECK_JVM -Xmx2048m -Xms256m -server -Djava.io.tmpdir=$RDECK_BASE/var/tmp"

Fixed the issue.

@gschueler
Copy link
Member Author

The import code could also directly copy the file to the destination if renameTo fails.

gschueler added a commit that referenced this issue Aug 23, 2013
* use FileUtils to move file in case tmp dir is on a separate file system
* set filepath for execution even if file move fails, allowing user to
* manually restore file if necessary
* capture IOException for createTempFile when exporting archive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant