开发者

SVN can't get exclusive lock on file <repo>/db/txn-current-lock': Bad address

Since an hour, I'm unable to commit to my svn repository. All repositories on my svn server are affected.

Updating and checking out works fine. Committing yields the following error:

svn: Commit failed (details follow):
svn: Can't get exclusive lock on file '/var/svn/repos/<repo name>/db/txn-current-lock': 
  Bad address

The problem started when I created a new repository with the name 'config', although I'm not sure this triggered the problems I'm encountering.

svnadmin recover <repo name> gives:

svnadmin: Can't get exclusive lock on file '<repo nam开发者_运维问答e>/db/write-lock': Invalid argument

Why does this locking problem occur?

[edit] The server got worse, and started Segfaulting while trying to install updates. After rebooting again, the whole issue seems to be resolved...


Repository corrupted, see Berkeley DB Recovery part of SVN Book. In short you have to do;

svnadmin recover /path/to/repos


I just encountered this problem after migrating SVN servers. I used the native svn export and import commands to do this. On the new server I received the same error as the OP. I noticed that if from the shell I executed commit as sudo it worked, but it failed under my normal user account.

It ended up being a file permissions. I just quickly did a chmod 777 -R which for me is fine because its just my local dev box at home.

svn recover did not resolve the problem. You can't lock the file, because you do not have write permissions.


I ran into this problem just this morning after migrating a repository across the world. The issue was that root owned the directory on the server, but the webserver runs as a different user. Change the directory owner on the server using

chown -R user:group /path/to/repository

to resolve the issue, replacing 'user' with the user who runs the webserver, and the 'group' generally should be the same as the user.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜