johngirvin.com

John Girvin

This is the blog of John Girvin, a software engineer and web developer based in Belfast, Northern Ireland. He draws on over 14 years of hard won, real world experience of different projects, clients and working environments. Visit the rest of the site to find out more and get in touch.

John is currently working with the Art Technology Group (ATG), developing J2EE based, market leading e-commerce technology.

subversion ‘can’t open activity db’

March 2nd, 2009 by John Girvin

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.

John Girvin
Bookmark and Share

John Girvin is an experienced a software engineer and web developer based in Belfast, Northern Ireland. He draws on over 14 years of hard won, real world experience of different projects, clients and working environments.

John is currently working with the Art Technology Group (ATG), developing J2EE based, market leading e-commerce technology.

If you liked this article, why not subscribe to the RSS feed for more?

8 comments on “subversion ‘can’t open activity db’”

Juan Fornos
March 10 2009, 5:48 pm

I had the same problem. Thanks for this solution!

May 2 2009, 2:59 pm

You just saved my life. Thanks.

z0n
May 24 2009, 3:45 am

Spot on – fixed it right away – thanks John!

babak
August 13 2009, 7:03 pm

Yeah, it worked for me too. Thanks man and good luck on your way ;-)

Richard Huxton
August 18 2009, 9:50 pm

Thanks – clear explanation. Saved me figuring this out for myself.

Ell
November 12 2009, 6:08 pm

THANKS – I’ve been fighting this all morning and this was the last step. Whew!

michael
March 3 2010, 10:35 pm

Thank you kind sir, may your PageRank be increased by one.

March 5 2010, 2:15 pm

[...] [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 [...]

share your thoughts?

design & content © 2008-2010 john girvin, all rights reserved.