Berkeley db errors
Berkeley DB Errors
A Berkeley DB error looks like this in the server-side logs:
[Mon Jun 02 13:17:38 2008] [error] [client X.X.X.X] (20014)Error string not specified yet: Berkeley DB error while opening environment for filesystem /srv/svn/repos/db:\nDB_RUNRECOVERY: Fatal error, run database recovery
[Mon Jun 02 13:17:38 2008] [error] [client X.X.X.X] Could not fetch resource information. [500, #0]
[Mon Jun 02 13:17:38 2008] [error] [client X.X.X.X] Could not open the requested SVN filesystem [500, #160029]
[Mon Jun 02 13:17:38 2008] [error] [client X.X.X.X] Could not open the requested SVN filesystem [500, #160029]
Resolving it is a simple matter. SVN provides the svnadmin
tool for repository administration. Running svnadmin help
produces a useful message:
root@server# svnadmin help
general usage: svnadmin SUBCOMMAND REPOS_PATH [ARGS & OPTIONS ...]
Type "svnadmin help <subcommand>" for help on a specific subcommand.
Available subcommands:
create
deltify
dump
help (?, h)
hotcopy
list-dblogs
list-unused-dblogs
load
lstxns
recover
rmtxns
setlog
verify
And running svnadmin help recover
produces even more helpful details:
root@server# svnadmin help recover
recover: usage: svnadmin recover REPOS_PATH
Run the Berkeley DB recovery procedure on a repository. Do
this if you've been getting errors indicating that recovery
ought to be run. Recovery requires exclusive access and will
exit if the repository is in use by another process.
Valid options:
--wait : wait instead of exit if the repository is in
use by another process
So I run the obvious command:root@server#svnadmin recover /srv/svn/repos
and all is working again.