03.02
I run a Debian Linux server as a general workhorse: web, email, FTP and also as a server for the Subversion source control system. I recently upgraded the version of the server software to 1.5 (from 1.4) and ran into a puzzling error when importing a project into a new repository I’d created under the new version.
Running “Import…” from TortoiseSVN resulted in the following error:
Can't open activity db: APR does not understand this error code
What gives? The server was working perfectly well before the upgrade, so it had to be something to do with the new server software. Checking the logs for the https:// checkin revealed the following error sequence:
[error] [client xx.xx.xx.xx] Could not create activity /svn/wordpress/!svn/act/a4265168-57ec-f947-a7d4-9534dc3cdf5e. [500, #0] [error] [client xx.xx.xx.xx] could not open dbm files. [500, #120002] [error] [client xx.xx.xx.xx] Can't open activity db: APR does not understand this error code [500, #120002]
The mention of “activity” hinted that this was WebDAV related. After some time searching around for others that had encountered this error, I was able to determine that the problem was that version 1.5 of the svnadmin create command doesn’t create a “dav” directory in the repository, unlike earlier versions. This directory is used when modifying the repository via WebDAV (ie: using the http:// or https:// protocol) and without it WebDAV will not work. The directory should be created at the time of the first check in (or so goes the theory) but, for some reason that I was unable to determine, it wasn’t being created on my system.
This problem only occurs in brand new repositories created by version 1.5 of svnadmin create. Furthermore, if the –pre-1.5-compatible command line option is given on creation, the problem does not occur.
The simple solution was to create the directory “by hand” myself, as follows:
svnadmin create newproject mkdir newproject/dav
After this, imports and check ins worked as before.
Related Posts
No related posts.

I had the same problem. Thanks for this solution!
You just saved my life. Thanks.
Spot on – fixed it right away – thanks John!
Yeah, it worked for me too. Thanks man and good luck on your way ;-)
Thanks – clear explanation. Saved me figuring this out for myself.
THANKS – I’ve been fighting this all morning and this was the last step. Whew!
Thank you kind sir, may your PageRank be increased by one.
[...] [Wed May 27 14:28:14 2009] [error] [client 202.218.216.13] Could not create activity /repos/tmprepo/!svn/act/c41a20c5-6b08-4c73-9da5-e41a2da69086. [500, #0] [Wed May 27 14:28:14 2009] [error] [client 202.218.216.13] could not open dbm files. [500, #2] [Wed May 27 14:28:14 2009] [error] [client 202.218.216.13] Can't open activity db: No such file or directory [500, #2] どうやらsvnの管理情報が書けないエラーのようです。 「Could not create activity」でググってみると、 どうやらリポジトリ直下にdavディレクトリを作成しなければならないらしい。 mkdir /path/to/repo/dav しかし、別件で作成したリポジトリはそんなことしなくても良かったのになと思ったので、もしかしたらsubversionのバージョンによってリポジトリの構造が違うのかもと思ったら、やっぱりそうらしいです。 After some time searching around for others that had encountered this error, I was able to determine that the problem was that version 1.5 of the svnadmin create command doesn’t create a “dav” directory in the repository, unlike earlier versions. via: subversion ‘can’t open activity db’| johngirvin.com [...]
FTW! Thank you! that worked for me!!!
[...] com este problema, do subversion, quando me deparei
com a solução de um cara chamado John Girvin (I love [...]
Thanks u so much
Thank u save me
oh i don’t know how to say thanks
Thanks u so much
Excelente solución, clara y precisa, muchas gracias