You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Youssouf Naciri <yn...@gmail.com> on 2005/10/27 17:42:43 UTC

Error opening db lockfile

Hi there !

I'm puzzled by subversion... Let me explain : I've used subversion for 
some months now, on a FreeBSD 5.4 through Apache2+mod_dav_svn 
(svn-1.2.0). I used to create multiple repositories on it, and managing 
multiple users. On the client side, I used subversion either under 
Windows XP (svn-1.2.3) and several Linux distributions (svn-1.2.3) 
without any problem, and I think it's a great tool !

Anyway, I wanted to move my svn repositories and merge them into a big 
one, on an Ubuntu host (svn-1.2.0).

* First I created the repository on this Ubuntu host :

[ny@parisium svn]$ svnadmin create repos

* Then I tried to create a directory in that repository :

[ny@parisium svn]$ svn mkdir file://`pwd`/repos/liblio
svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///oi/05/ny/usr/svn/repos'
svn: Error opening db lockfile
svn: Can't get shared lock on file 
'/oi/05/ny/usr/svn/repos/locks/db.lock': No locks available

* I wondered if it was because of the BDB database, so I created a new 
one using FSFS :

[ny@parisium svn]$ rm -rf repos
[ny@parisium svn]$ svnadmin create --fs-type fsfs repos

* And then tried several commands to check it :

[ny@parisium svn]$ svn mkdir -m "test" file://`pwd`/repos/liblio
svn: Unable to open an ra_local session to URL
svn: Unable to open repository 'file:///oi/05/ny/usr/svn/repos'
svn: Error opening db lockfile
svn: Can't get shared lock on file 
'/oi/05/ny/usr/svn/repos/locks/db.lock': No locks available

[ny@parisium svn]$ svnadmin verify repos
svnadmin: Error opening db lockfile
svnadmin: Can't get shared lock on file 'repos/locks/db.lock': No locks 
available

[ny@parisium svn]$ svnlook info repos
svnlook: Error opening db lockfile
svnlook: Can't get shared lock on file 'repos/locks/db.lock': No locks 
available

* Though I was using a 022 umask, I checked the repository files 
permissions :

[ny@parisium svn]$ ls -l repos/
total 7
drwxr-xr-x  2 ny invites 512 2005-10-27 19:30 conf
drwxr-xr-x  2 ny invites 512 2005-10-27 19:30 dav
drwxr-sr-x  5 ny invites 512 2005-10-27 19:30 db
-r--r--r--  1 ny invites   2 2005-10-27 19:30 format
drwxr-xr-x  2 ny invites 512 2005-10-27 19:30 hooks
drwxr-xr-x  2 ny invites 512 2005-10-27 19:30 locks
-rw-r--r--  1 ny invites 379 2005-10-27 19:30 README.txt

[ny@parisium svn]$ ls -l repos/locks/
total 2
-rw-r--r--  1 ny invites 460 2005-10-27 19:30 db.lock
-rw-r--r--  1 ny invites 295 2005-10-27 19:30 db-logs.lock

* Since I don't have the rights to install things on this host, I 
checked the way svn was installed, and found that it was done by apt-get 
(and well-done since all the RA modules were there) :

[ny@parisium svn]$ svn --version
svn, version 1.2.0 (r14790)
    compiled Jun 29 2005, 12:46:42

Copyright (C) 2000-2005 CollabNet.
Subversion is open source software, see http://subversion.tigris.org/
This product includes software developed by CollabNet 
(http://www.Collab.Net/).

The following repository access (RA) modules are available:

* ra_dav : Module for accessing a repository via WebDAV (DeltaV) protocol.
   - handles 'http' scheme
   - handles 'https' scheme
* ra_svn : Module for accessing a repository using the svn network protocol.
   - handles 'svn' scheme
* ra_local : Module for accessing a repository on local disk.
   - handles 'file' scheme

* Everything I tried there, I did it again on a FreeBSD 5.4 and under 
Windows XP, and it worked fine all the time...

* I desperately searched the mailing lists to find someone that got 
through those troubles, but nobody had this error message with every svn 
commands...

I really hope that someone could tell me what my silly mistake is, and 
for the last info, the global configuration files are the default ones, 
containing only the sections titles and some comments

Thanks

Youssouf

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Error opening db lockfile

Posted by Youssouf Naciri <yn...@gmail.com>.
Ok, the checkout issue is now resolved, seems like subversion don't like 
when you copy paste a line of the passwd file and just change the username.

So I've added the user ny, giving him a new and trivial password, and 
now I can checkout, but I'm still unable to do anything on any 
repository I create on my Ubuntu host...

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Error opening db lockfile

Posted by Youssouf Naciri <yn...@gmail.com>.
Another thing, the Apache logs says

[Fri Oct 28 10:54:32 2005] [error] [client 193.54.153.122] user ny: 
authentication failure for "/liblio": Password Mismatch
...
[Fri Oct 28 10:54:32 2005] [error] [client 193.54.153.122] user ny: 
authentication failure for "/liblio": Password Mismatch
[Fri Oct 28 10:55:22 2005] [error] [client 193.54.153.122] user y: 
authentication failure for "/liblio": Password Mismatch
...
[Fri Oct 28 11:06:44 2005] [error] [client 193.54.153.122] user y: 
authentication failure for "/liblio": Password Mismatch

though I used the same password for the two, the authorization 
credentials caching are disabled and when I typed the password in the 
terminal it was the same so that's not a typing or case problem...

Thanks for reading

Youssouf


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Error opening db lockfile

Posted by Garrett Rooney <ro...@electricjellyfish.net>.
On 10/29/05, Ryan Schmidt <su...@ryandesign.com> wrote:

> Odd. You're right, it shouldn't affect you. Everything I've read on
> this list suggests that FSFS should work fine over NFS.

FSFS works fine on NFS, but it still requires file locking to work. 
If your NFS server/client combination has some problem with file
locking (and this is not unknown) you're kind of screwed.  All you can
do is fix your NFS implementation.

-garrett

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Error opening db lockfile

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Oct 28, 2005, at 22:05, Youssouf Naciri wrote:

> I took my time and read the svnbook another time, and found an  
> interesting warning :
>
> "Do not create a Berkeley DB repository on a network share—it  
> cannot exist on a remote filesystem such as NFS, AFS, or Windows  
> SMB. Berkeley DB requires that the underlying filesystem implement  
> strict POSIX locking semantics, and more importantly, the ability  
> to map files directly into process memory. Almost no network  
> filesystems provide these features. If you attempt to use Berkeley  
> DB on a network share, the results are unpredictable—you may see  
> mysterious errors right away, or it may be months before you  
> discover that your repository database is subtly corrupted."
>
> "If you need multiple computers to access the repository, you  
> create an FSFS repository on the network share, not a Berkeley DB  
> repository. Or better yet, set up a real server process (such as  
> Apache or svnserve), store the repository on a local filesystem  
> which the server can access, and make the repository available over  
> a network. Chapter 6, Server Configuration covers this process in  
> detail."
>
> I though that since I wasn't using BDB, but FSFS, this won't affect  
> me, but I still tried to create a repository on a local filesystem,  
> and guess what, it worked !

Odd. You're right, it shouldn't affect you. Everything I've read on  
this list suggests that FSFS should work fine over NFS.

> Now, I'm quite sure that the svn I'm using hasn't been compiled  
> with FSFS support, but I wonder how I could know about that.

AFAIK it's not possible to compile Subversion without FSFS support; I  
think it's always enabled (since its debut in 1.1.0). It's possible  
to compile without BDB support, which makes sense, as then you don't  
need to have the BDB libraries. But it doesn't make sense to compile  
without FSFS support, since there are no additional libraries that  
would be required.

FSFS is also the default repository type as of 1.2.0.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org


Re: Error opening db lockfile

Posted by Youssouf Naciri <yn...@gmail.com>.
Sorry for disturbing you folks,

I took my time and read the svnbook another time, and found an 
interesting warning :

"Do not create a Berkeley DB repository on a network share—it cannot 
exist on a remote filesystem such as NFS, AFS, or Windows SMB. Berkeley 
DB requires that the underlying filesystem implement strict POSIX 
locking semantics, and more importantly, the ability to map files 
directly into process memory. Almost no network filesystems provide 
these features. If you attempt to use Berkeley DB on a network share, 
the results are unpredictable—you may see mysterious errors right away, 
or it may be months before you discover that your repository database is 
subtly corrupted."

"If you need multiple computers to access the repository, you create an 
FSFS repository on the network share, not a Berkeley DB repository. Or 
better yet, set up a real server process (such as Apache or svnserve), 
store the repository on a local filesystem which the server can access, 
and make the repository available over a network. Chapter 6, Server 
Configuration covers this process in detail."

I though that since I wasn't using BDB, but FSFS, this won't affect me, 
but I still tried to create a repository on a local filesystem, and 
guess what, it worked !

[ny@localhost tmp]$ svnadmin create --fs-type fsfs repos
[ny@localhost tmp]$ svnadmin verify repos
* Verified revision 0.
[ny@localhost tmp]$ svnlook info repos

2005-10-28 21:59:02 +0200 (Fri, 28 Oct 2005)
0

Now, I'm quite sure that the svn I'm using hasn't been compiled with 
FSFS support, but I wonder how I could know about that.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Error opening db lockfile

Posted by Youssouf Naciri <yn...@gmail.com>.
Ooops, forget what I said about copy/pasting the passwd file lines, it 
works fine, I used the wrong password for the checkout :p

Anyway, after that I tried to do modify this working copy and committing 
the changes, and it worked :

[ny@ubuntu ~]$ cd myproject/
[ny@ubuntu myproject]$ ls
branches  tags  trunk
[ny@ubuntu myproject]$ svn mkdir test
A         test
[ny@ubuntu myproject]$ ls
branches  tags  test  trunk
Authentication realm: <http://svn.mydomain.net:80> Subversion Repository
Password for 'ny': *******
Adding         test

Committed revision 25.

I really don't understand a thing... It looks like on that host the 
authentification is imperative, but since I've never put up 
authentification for ra_local access, I'll try to do that later and let 
you know the result.

Youssouf


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org

Re: Error opening db lockfile

Posted by Youssouf Naciri <yn...@gmail.com>.
There's one thing I forgot to say, it's that I can't checkout my old 
repository on the Ubuntu host :

[ny@parisium ~]$ svn co --username y --no-auth-cache 
http://svn.namaru.net/liblio/
Authentication realm: <http://svn.namaru.net:80> Subversion Repository
Password for 'y':
Authentication realm: <http://svn.namaru.net:80> Subversion Repository
Username: y
Password for 'y':
Authentication realm: <http://svn.namaru.net:80> Subversion Repository
Username: y
Password for 'y':
svn: PROPFIND request failed on '/liblio'
svn: PROPFIND of '/liblio': authorization failed (http://svn.namaru.net)

* But I can on any other host, using the same password (I even tried 
copy/paste the password...)

C:\Documents and Settings\y>svn co --username y --no-auth-cache 
http://svn.namar
u.net/liblio
A    liblio\trunk
A    liblio\trunk\test
A    liblio\trunk\test\include
...
A    liblio\branches
A    liblio\tags
Revision 24 extracted.

C:\Documents and Settings\y>


I hope this post won't be lost in the flood ;)

Youssouf

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@subversion.tigris.org
For additional commands, e-mail: users-help@subversion.tigris.org