SVN indexing fails due to NonWritableChannelException

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

Fisheye/Crucible is indexing a local disk repository that is updated by svnsync.

Fisheye/Crucible has read only file permission on the local disk repository.

The following appears in the atlassian-fisheye-<date>.log when Fisheye/Crucible perform indexing and svnsync happen at the same time.

ERROR - Problem processing revisions from repo repoName due to class com.cenqua.fisheye.rep.RepositoryClientException - java.nio.channels.NonWritableChannelException
com.cenqua.fisheye.rep.RepositoryClientException: java.nio.channels.NonWritableChannelException
        at com.cenqua.fisheye.svn.SvnThrottledClient.executeNoThrottle(SvnThrottledClient.java:163)
        at com.cenqua.fisheye.svn.SvnThrottledClient.execute(SvnThrottledClient.java:132)
        at com.cenqua.fisheye.svn.SvnThrottledClient.properties(SvnThrottledClient.java:312)
        at com.atlassian.fisheye.svn.Svn2Infill2Processor.addNewFileChangeInfo(Svn2Infill2Processor.java:799)
        at com.atlassian.fisheye.svn.Svn2Infill2Processor.processDiffPaths(Svn2Infill2Processor.java:703)
        at com.atlassian.fisheye.svn.Svn2Infill2Processor.infillChangeSet(Svn2Infill2Processor.java:249)
        at com.atlassian.fisheye.svn.Svn2Infill2Processor.access$100(Svn2Infill2Processor.java:78)

Cause

  1. SVN library (SVNKit) detects that several threads (svnsync) are accessing the SVN repository and try to write a lock to the repository. The write process fails because Fisheye/Crucible has read-only file permission to the local disk repository. This issue was originally reported to TMate Software (the team that develops SVNKit) at SVNKIT-418 but their support has moved to another site and this problem is now being tracked in this forum thread.


      2. There is a zero-byte file called rep-cache.db-journal

Resolution

#1 Add write permission to the rep-cache.db file in the repository root directory (this is the URL pointing to the svn repository provided in the Fisheye configuration).

This error will cause "Too many open files"

rsync is not recommended to sync the local disk repository.


#2 Remove the rep-cache.db-journal file;


Last modified on Feb 28, 2022

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.