SVN indexing fails due to NonWritableChannelException
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
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.
1
2
3
4
5
6
7
8
9
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
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;
Was this helpful?