Facebook Twitter Gplus RSS
 
 
Home » MISC » Subversion: Failed to get lock on destination repository
formats

Subversion: Failed to get lock on destination repository

Published on February 15th, 2010

In the event that your Subversion server was powered down incorrectly during one of its subversion mirror synchronizations you might end up with a lock on the destination repository. This basic tutorial will help you to remove the lock and continue with your synchronizations.

Below is the output from the svnsync showed this:

# /usr/bin/svnsync --non-interactive synchronize svn://{destination repository}/opt/svn/{repo}

Failed to get lock on destination repos, currently held by ‘svn.how2centos.com:fbc2c0c8-957f-0410-8a06-87f31314868b’
Failed to get lock on destination repos, currently held by ‘svn.how2centos.com:fbc2c0c8-957f-0410-8a06-87f31314868b’
Failed to get lock on destination repos, currently held by ‘svn.how2centos.com:fbc2c0c8-957f-0410-8a06-87f31314868b’
Failed to get lock on destination repos, currently held by ‘svn.how2centos.com:fbc2c0c8-957f-0410-8a06-87f31314868b’
Failed to get lock on destination repos, currently held by ‘svn.how2centos.com:fbc2c0c8-957f-0410-8a06-87f31314868b’
Failed to get lock on destination repos, currently held by ‘svn.how2centos.com:fbc2c0c8-957f-0410-8a06-87f31314868b’
Failed to get lock on destination repos, currently held by ‘svn.how2centos.com:fbc2c0c8-957f-0410-8a06-87f31314868b’
Failed to get lock on destination repos, currently held by ‘svn.how2centos.com:fbc2c0c8-957f-0410-8a06-87f31314868b’
Failed to get lock on destination repos, currently held by ‘svn.how2centos.com:fbc2c0c8-957f-0410-8a06-87f31314868b’
Failed to get lock on destination repos, currently held by ‘svn.how2centos.com:fbc2c0c8-957f-0410-8a06-87f31314868b’
svnsync: Couldn’t get lock on destination repos after 10 attempts

To remove the lock you’ll need to do the following:

# svn propdel svn:sync-lock --revprop -r 0 svn://{destination repository}/opt/svn/{repo}
# /usr/bin/svnsync --non-interactive synchronize svn://{destination repository}/opt/svn/{repo}

Committed revision 1694.
Copied properties for revision 1694.
Committed revision 1695.
Copied properties for revision 1695.

 
  • Pas

    Hi All,

    Getting the above problem i.e. svn lock issue very frequently i mean to say 8-10 times a day.
    Please help me in solving.

    Prash

  • Anonymous

    You could start by checking the following.

    1) Connectivity between your servers (network cables, switches) ?
    2) Are you monitoring your servers (Cacti) if so what does that tell you ?

  • Pas

    Hi,

    There is no connectivity problem as of i know.
    it is a windows server. where we have installed svn.

    Prash

© [How2CentOS]
credit