java.io.IOException: The process cannot access the file because another process has locked a portion of the file

Atlassian JIRA | Michael Heemskerk | 2 years ago
  1. 0

    The backup client reports the following error: {noformat} 2014-08-02 02:00:44,927 ERROR (53%) Error writing tar file entry: The process cannot access the file because another process has locked a portion of the file java.io.IOException: The process cannot access the file because another process has locked a portion of the file at java.io.FileInputStream.readBytes(Native Method) ~[na:1.7.0_60] at java.io.FileInputStream.read(FileInputStream.java:272) ~[na:1.7.0_60] ... 13 more frames available in the log file 2014-08-02 02:00:44,973 ERROR (53%) Failed to close tar file entry: entry 'shared/.lock' closed at '0' before the '15' bytes specified in the header were written java.io.IOException: entry 'shared/.lock' closed at '0' before the '15' bytes specified in the header were written at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.closeArchiveEntry(TarArchiveOutputStream.java:363) ~[commons-compress-1.5.jar:1.5] at com.atlassian.stash.internal.backup.client.extensions.TarExtensions.withEntry(TarExtensions.groovy:31) ~[stash-backup-core-1.3.0.jar:na] ... 9 more frames available in the log file {noformat} This .lock file is created and held by Stash itself to prevent multiple instances from running with this shared-home. The .lock file should have been excluded from the backup, but hasn't been included in the default excludes list. As a workaround, add the following line to your {{backup-config.properties}}: {noformat} stash.home.excludes=**/.lock {noformat}

    Atlassian JIRA | 2 years ago | Michael Heemskerk
    java.io.IOException: The process cannot access the file because another process has locked a portion of the file
  2. 0

    The backup client reports the following error: {noformat} 2014-08-02 02:00:44,927 ERROR (53%) Error writing tar file entry: The process cannot access the file because another process has locked a portion of the file java.io.IOException: The process cannot access the file because another process has locked a portion of the file at java.io.FileInputStream.readBytes(Native Method) ~[na:1.7.0_60] at java.io.FileInputStream.read(FileInputStream.java:272) ~[na:1.7.0_60] ... 13 more frames available in the log file 2014-08-02 02:00:44,973 ERROR (53%) Failed to close tar file entry: entry 'shared/.lock' closed at '0' before the '15' bytes specified in the header were written java.io.IOException: entry 'shared/.lock' closed at '0' before the '15' bytes specified in the header were written at org.apache.commons.compress.archivers.tar.TarArchiveOutputStream.closeArchiveEntry(TarArchiveOutputStream.java:363) ~[commons-compress-1.5.jar:1.5] at com.atlassian.stash.internal.backup.client.extensions.TarExtensions.withEntry(TarExtensions.groovy:31) ~[stash-backup-core-1.3.0.jar:na] ... 9 more frames available in the log file {noformat} This .lock file is created and held by Stash itself to prevent multiple instances from running with this shared-home. The .lock file should have been excluded from the backup, but hasn't been included in the default excludes list. As a workaround, add the following line to your {{backup-config.properties}}: {noformat} stash.home.excludes=**/.lock {noformat}

    Atlassian JIRA | 2 years ago | Michael Heemskerk
    java.io.IOException: The process cannot access the file because another process has locked a portion of the file
  3. 0

    org.gradle.api.UncheckedIOException: java.io.IOException

    GitHub | 3 years ago | ChrLipp
    org.gradle.api.UncheckedIOException: java.io.IOException: The process cannot access the file because another process has locked a portion of the file
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Copy files to rootDir in Gradle

    Stack Overflow | 5 years ago | stuff22
    org.gradle.api.UncheckedIOException: java.io.IOException: The process cannot access the file because another process has locked a portion of the file
  6. 0

    Lock on Hot Backup

    GitHub | 1 year ago | thiagopm
    java.io.IOException: The process cannot access the file because another process has locked a portion of the file

    5 unregistered visitors
    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.io.IOException

      The process cannot access the file because another process has locked a portion of the file

      at java.io.FileInputStream.readBytes()
    2. Java RT
      FileInputStream.read
      1. java.io.FileInputStream.readBytes(Native Method)[na:1.7.0_60]
      2. java.io.FileInputStream.read(FileInputStream.java:272)[na:1.7.0_60]
      2 frames