You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Gordon Sullivan <go...@gortek.com> on 2002/10/25 05:46:49 UTC

"Expected version '1' of repository; found no version...

Hello,

I'm getting the following message when I try viewing the repository in my 
browser: "Expected version '1' of repository; found no version at all; is 
'/usr/local/svn-repo' a valid repository path?"

--Yes, it is.  I can do a co of the repository from the local machine using 
the file:/// convention

I'm running the server on SuSE 8.0 using the Berkeley DB (4.0.14) that comes
with the distro.  I tried using version 4.1.24 from sleepycat but it has 
some problems with the number of parameters being passed in some function.

The subversion I'm have had the most luck with is the package I downloaded
called subversion-r3200.  I tried building everything from scratch using a 
fresh copy of subversion plus snapshots of apr and apr-util and the latest 
neon.  It was horrible.

I have also tried both the snapshot of httpd-2.0 and httpd-2.0.43.tar.gz.  I
seem to have more luck with the packaged tarball that includes the apr and
apr-util.

Is there a known good configuration I can use where all the parts play nice
together?   


Thanks,

Gordon Sullivan

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

Re: "Expected version '1' of repository; found no version...

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
mark benedetto king <bk...@inquira.com> writes:
> Nevermind, I found it...it was issue 900, permissions on ra_local, not
> ra_dav.  Though *that* patch is still uncommitted. :-)

Notice, however, that it *is* in a milestone :-).

Some comments on the patch attached there:

> Shepherd the ENOENT from apr_file_open up through the call
> stack to svn_ra_local__split_URL.  Accomplish this via
> empassioned pleas to maintenance programmers not to break
> this frail exception handling mechanism.

Those pleas are written in internal comments, not in the public
interfaces.  But the pleas *are* essentially interface requirements,
so they need to be made explicit, or else it will never be
maintainable.

Here's the patch, for reference:

> * subversion/include/svn_error_codes.h:
>   SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED: new error code.
> 
> * subversion/libsvn_subr/io.c:
>   (svn_io_file_open): Added comment.
>   (svn_io_read_version_file): Added comment.
> 
> * subversion/libsvn_ra_local/split_url.c
>   (svn_ra_local__split_URL): Handle errors other
>   than missing repository.
> 
> 
> 
> Index: subversion/include/svn_error_codes.h
> ===================================================================
> --- subversion/include/svn_error_codes.h
> +++ subversion/include/svn_error_codes.h        Mon Sep 16 17:27:16 2002
> @@ -519,6 +519,10 @@
>                SVN_ERR_RA_LOCAL_CATEGORY_START + 0,
>                "Couldn't find a repository.")
>  
> +  SVN_ERRDEF (SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED,
> +              SVN_ERR_RA_LOCAL_CATEGORY_START + 1,
> +              "Couldn't open a repository.")
> +
>    /* svndiff errors */
>  
>    SVN_ERRDEF (SVN_ERR_SVNDIFF_INVALID_HEADER,
> Index: subversion/libsvn_subr/io.c
> ===================================================================
> --- subversion/libsvn_subr/io.c
> +++ subversion/libsvn_subr/io.c Mon Sep 16 16:57:03 2002
> @@ -1568,6 +1568,9 @@
>    SVN_ERR (svn_utf_cstring_from_utf8 (&fname_native, fname, pool));
>    status = apr_file_open (new_file, fname_native, flag, perm, pool);
>  
> +  /* The exact status code from apr_file_open is checked by
> +     at least one caller (svn_io_read_version_file).  This
> +     status MUST be preserved. */
>    if (status)
>      return svn_error_createf (status, 0, NULL, pool,
>                                "svn_io_file_open: can't open `%s'", fname);
> @@ -1911,7 +1914,10 @@
>    svn_stringbuf_t *version_str;
>    apr_status_t apr_err;
>  
> -  /* Read a line from PATH */
> +  /* Read a line from PATH.
> +     The exact status code from svn_io_file_open is checked
> +     by at least one caller (svn_repos_open).  Any error MUST
> +     be passed on, unaltered. */
>    SVN_ERR (svn_io_file_open (&format_file, path, APR_READ, 
>                               APR_OS_DEFAULT, pool));
>    format_stream = svn_stream_from_aprfile (format_file, pool);
> Index: subversion/libsvn_ra_local/split_url.c
> ===================================================================
> --- subversion/libsvn_ra_local/split_url.c
> +++ subversion/libsvn_ra_local/split_url.c      Mon Sep 16 17:26:39 2002
> @@ -111,6 +111,12 @@
>        if (err == SVN_NO_ERROR)
>          break;
>  
> +      if (!APR_STATUS_IS_ENOENT(err->apr_err))
> +        return svn_error_createf 
> +          (SVN_ERR_RA_LOCAL_REPOS_OPEN_FAILED, 0, err, pool, 
> +           "svn_ra_local__split_URL: Unable to open repository\n"
> +           "   (%s)", URL);
> +
>        /* It would be strange indeed if "/" were a repository, but hey,
>           people do strange things sometimes.  Anyway, if "/" failed
>           the test above, then reduce it to the empty string.

-Karl

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

Re: "Expected version '1' of repository; found no version...

Posted by mark benedetto king <bk...@inquira.com>.
On Sun, Oct 27, 2002 at 05:12:34PM -0500, mark benedetto king wrote:
> On Fri, Oct 25, 2002 at 04:03:49PM +0100, Philip Martin wrote:
> > 
> > It looks like the httpd process doesn't have read access.
> > 
> 
> ISTR posting a patch that made for more appropriate error messages
> when this sort of thing happens.
> 
> I wonder what happened to that?
> 

Nevermind, I found it...it was issue 900, permissions on ra_local, not
ra_dav.  Though *that* patch is still uncommitted. :-)

--ben



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

Re: "Expected version '1' of repository; found no version...

Posted by mark benedetto king <bk...@inquira.com>.
On Fri, Oct 25, 2002 at 04:03:49PM +0100, Philip Martin wrote:
> Gordon Sullivan <go...@gortek.com> writes:
> 
> > I'm getting the following message when I try viewing the repository in my 
> > browser: "Expected version '1' of repository; found no version at all; is 
> > '/usr/local/svn-repo' a valid repository path?"
> > 
> > --Yes, it is.  I can do a co of the repository from the local machine using 
> > the file:/// convention
> 
> It looks like the httpd process doesn't have read access.
> 

ISTR posting a patch that made for more appropriate error messages
when this sort of thing happens.

I wonder what happened to that?

--ben

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

Re: "Expected version '1' of repository; found no version...

Posted by Gordon Sullivan <gs...@orionsci.com>.
The httpd process is running as the same user that owns the repository, and 
just for giggles I did a chmod -R 777 of the repository.  Same deal.  I looked 
at the source for the error message and saw errcode="165005".  Does that help?

I also double checked that the path to the repository in the httpd.conf file.  
It is the correct path.

Thanks for your help

-Gordon Sullivan

Quoting Philip Martin <ph...@codematters.co.uk>:

> Gordon Sullivan <go...@gortek.com> writes:
> 
> > I'm getting the following message when I try viewing the repository in my
> 
> > browser: "Expected version '1' of repository; found no version at all; is
> 
> > '/usr/local/svn-repo' a valid repository path?"
> > 
> > --Yes, it is.  I can do a co of the repository from the local machine using
> 
> > the file:/// convention
> 
> It looks like the httpd process doesn't have read access.
> 
> > I'm running the server on SuSE 8.0 using the Berkeley DB (4.0.14) that
> comes
> > with the distro.  I tried using version 4.1.24 from sleepycat but it has 
> > some problems with the number of parameters being passed in some
> function.
> > 
> > The subversion I'm have had the most luck with is the package I
> downloaded
> > called subversion-r3200.  I tried building everything from scratch using a
> 
> > fresh copy of subversion plus snapshots of apr and apr-util and the latest
> 
> > neon.  It was horrible.
> > 
> > I have also tried both the snapshot of httpd-2.0 and httpd-2.0.43.tar.gz. 
> I
> > seem to have more luck with the packaged tarball that includes the apr
> and
> > apr-util.
> > 
> > Is there a known good configuration I can use where all the parts play
> nice
> > together?   
> 
> Subversion HEAD (and probably r3200 as well) should work with
> APR/Apache 2.0.43 and BDB 4.0.14.  You need to use Subversion HEAD and
> APR/Apache HEAD to use BDB 4.1.24.
> 
> -- 
> Philip Martin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 
> 




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

Re: "Expected version '1' of repository; found no version...

Posted by Philip Martin <ph...@codematters.co.uk>.
Gordon Sullivan <go...@gortek.com> writes:

> I'm getting the following message when I try viewing the repository in my 
> browser: "Expected version '1' of repository; found no version at all; is 
> '/usr/local/svn-repo' a valid repository path?"
> 
> --Yes, it is.  I can do a co of the repository from the local machine using 
> the file:/// convention

It looks like the httpd process doesn't have read access.

> I'm running the server on SuSE 8.0 using the Berkeley DB (4.0.14) that comes
> with the distro.  I tried using version 4.1.24 from sleepycat but it has 
> some problems with the number of parameters being passed in some function.
> 
> The subversion I'm have had the most luck with is the package I downloaded
> called subversion-r3200.  I tried building everything from scratch using a 
> fresh copy of subversion plus snapshots of apr and apr-util and the latest 
> neon.  It was horrible.
> 
> I have also tried both the snapshot of httpd-2.0 and httpd-2.0.43.tar.gz.  I
> seem to have more luck with the packaged tarball that includes the apr and
> apr-util.
> 
> Is there a known good configuration I can use where all the parts play nice
> together?   

Subversion HEAD (and probably r3200 as well) should work with
APR/Apache 2.0.43 and BDB 4.0.14.  You need to use Subversion HEAD and
APR/Apache HEAD to use BDB 4.1.24.

-- 
Philip Martin

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

Re: "Expected version '1' of repository; found no version...

Posted by Gordon Sullivan <go...@gortek.com>.
Thank you very much.  I'm rebuilding apache now.

Gordon

Quoting Philip Martin <ph...@codematters.co.uk>:

> Gordon Sullivan <gs...@orionsci.com> writes:
> 
> > I had created the directory /usr/local/svn-repo to act as a
> > container.  I then did a svnadmin create
> > /usr/local/svn-repo/project1.  In the httpd.conf file I referenced
> > /usr/local/svn-repo instead of /usr/local/svn-repo/project1.  After
> > changing the httpd.conf to reference /usr/local/svn-repo/project1 I
> > get a different error.
> 
> You should be able to use
> 
> SVNPath /usr/local/svn-repo/project1
> 
> to access a single repository, or
> 
> SVNParentPath /usr/local/svn-repo
> 
> to access all repositories under svn-repo.
> 
> > 
> > human-readable errcode="160000"
> > Bad database version: 2.4.14
> 
> You need to build Apache with --with-dbm=db4 and
> --with-berkeley-db=/some/path, see the Subversion INSTALL file.
> 
> -- 
> Philip Martin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 
> 




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

Re: "Expected version '1' of repository; found no version...

Posted by Philip Martin <ph...@codematters.co.uk>.
Gordon Sullivan <gs...@orionsci.com> writes:

> I had created the directory /usr/local/svn-repo to act as a
> container.  I then did a svnadmin create
> /usr/local/svn-repo/project1.  In the httpd.conf file I referenced
> /usr/local/svn-repo instead of /usr/local/svn-repo/project1.  After
> changing the httpd.conf to reference /usr/local/svn-repo/project1 I
> get a different error.

You should be able to use

SVNPath /usr/local/svn-repo/project1

to access a single repository, or

SVNParentPath /usr/local/svn-repo

to access all repositories under svn-repo.

> 
> human-readable errcode="160000"
> Bad database version: 2.4.14

You need to build Apache with --with-dbm=db4 and
--with-berkeley-db=/some/path, see the Subversion INSTALL file.

-- 
Philip Martin

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

Re: "Expected version '1' of repository; found no version...

Posted by Greg Stein <gs...@lyra.org>.
On Fri, Oct 25, 2002 at 07:32:15PM -0700, Greg Stein wrote:
> On Fri, Oct 25, 2002 at 06:17:27PM -0400, Gordon Sullivan wrote:
> > Quoting Karl Fogel <kf...@newton.ch.collab.net>:
> >...
> > > > human-readable errcode="160000"
> > > > Bad database version: 2.4.14
> 
> Your Apache is linking against the wrong Berkeley DB. See Philip's note
> about how to configure/build Apache.

That was kind of dumb of me... the real reference is the INSTALL document,
of course (which is what Philip pointed out).

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

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

Re: "Expected version '1' of repository; found no version...

Posted by Greg Stein <gs...@lyra.org>.
On Fri, Oct 25, 2002 at 06:17:27PM -0400, Gordon Sullivan wrote:
> Quoting Karl Fogel <kf...@newton.ch.collab.net>:
>...
> > > human-readable errcode="160000"
> > > Bad database version: 2.4.14

Your Apache is linking against the wrong Berkeley DB. See Philip's note
about how to configure/build Apache.

>...
> > I can't believe you'd have a version of Berkeley DB that old (we're at
> > least 4.0.14 or 4.1.24 now), but I guess I should ask... ?
> 
> That's just it.  I don't have a version of Berkeley DB that old.  This was 
> done using the Berkeley DB that ships with SuSE 8.0 which is 4.0.14.  I 
> didn't understand that error message either.  

Most distributions have older copies of DB residing in /lib and/or /usr/lib.
My RedHat 7.x has the following:

  /lib/libdb-3.1.so
  /lib/libdb-3.2.so
  /lib/libdb.so

  /usr/lib/libdb-3.2.a
  /usr/lib/libdb-3.2.la
  /usr/lib/libdb-3.2.so
  /usr/lib/libdb.so.2
  /usr/lib/libdb.so.3
  /usr/lib/libdb1.a
  /usr/lib/libdb1.so
  /usr/lib/libdb1.so.2
  /usr/lib/libdb2.a
  /usr/lib/libdb2.so
  /usr/lib/libdb2.so.3

And I've also got my db4 installation, of course.

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/

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

Re: "Expected version '1' of repository; found no version...

Posted by Gordon Sullivan <gs...@orionsci.com>.
Quoting Karl Fogel <kf...@newton.ch.collab.net>:

> Gordon Sullivan <gs...@orionsci.com> writes:
> > I'm pretty sure I was doing it wrong.  
> 
> Yup, you've got it.
> 
> > I had created the directory /usr/local/svn-repo to act as a
> > container.  I then did a svnadmin create
> > /usr/local/svn-repo/project1.  In the httpd.conf file I referenced
> > /usr/local/svn-repo instead of /usr/local/svn-repo/project1.  After
> > changing the httpd.conf to reference /usr/local/svn-repo/project1 I
> > get a different error.
> > 
> > human-readable errcode="160000"
> > Bad database version: 2.4.14
> 
> Whoa.  Is that the entire error output?

Pretty much.

> 
> I can't believe you'd have a version of Berkeley DB that old (we're at
> least 4.0.14 or 4.1.24 now), but I guess I should ask... ?

That's just it.  I don't have a version of Berkeley DB that old.  This was 
done using the Berkeley DB that ships with SuSE 8.0 which is 4.0.14.  I 
didn't understand that error message either.  


> 
> -K
> 




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

Re: "Expected version '1' of repository; found no version...

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Gordon Sullivan <gs...@orionsci.com> writes:
> I'm pretty sure I was doing it wrong.  

Yup, you've got it.

> I had created the directory /usr/local/svn-repo to act as a
> container.  I then did a svnadmin create
> /usr/local/svn-repo/project1.  In the httpd.conf file I referenced
> /usr/local/svn-repo instead of /usr/local/svn-repo/project1.  After
> changing the httpd.conf to reference /usr/local/svn-repo/project1 I
> get a different error.
> 
> human-readable errcode="160000"
> Bad database version: 2.4.14

Whoa.  Is that the entire error output?

I can't believe you'd have a version of Berkeley DB that old (we're at
least 4.0.14 or 4.1.24 now), but I guess I should ask... ?

-K

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

Re: "Expected version '1' of repository; found no version...

Posted by Gordon Sullivan <gs...@orionsci.com>.
I'm pretty sure I was doing it wrong.  

I had created the directory /usr/local/svn-repo to act as a container.  I then 
did a svnadmin create /usr/local/svn-repo/project1.  In the httpd.conf file I 
referenced /usr/local/svn-repo instead of /usr/local/svn-repo/project1.  After 
changing the httpd.conf to reference /usr/local/svn-repo/project1 I get a 
different error.

human-readable errcode="160000"
Bad database version: 2.4.14


I really appreciate you helping me with this.


-Gordon Sullivan





Quoting Philip Martin <ph...@codematters.co.uk>:

> Gordon Sullivan <go...@gortek.com> writes:
> 
> > > > I'm getting the following message when I try viewing the repository
> > > > in my browser: "Expected version '1' of repository; found no version
> > > > at all; is '/usr/local/svn-repo' a valid repository path?"
> > > > 
> > > > --Yes, it is.  I can do a co of the repository from the local
> > > > machine using the file:/// convention
> > > 
> > > This is most likely a permissions problem - check the uid and gid
> > > Apache is running under and make sure they can both read and write to
> > > the repository.
> > 
> > I created a 'svn' user account that owns the repository and the apache
> server 
> > runs as that user as well.
> 
> Does the file /usr/local/svn-repo/format exist?  Does it have a first
> line consisting of the digit "1"?
> 
> Can the svn user run 'cat /usr/local/svn-repo/format'?
> 
> -- 
> Philip Martin
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 
> 




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

Re: "Expected version '1' of repository; found no version...

Posted by Philip Martin <ph...@codematters.co.uk>.
Gordon Sullivan <go...@gortek.com> writes:

> > > I'm getting the following message when I try viewing the repository
> > > in my browser: "Expected version '1' of repository; found no version
> > > at all; is '/usr/local/svn-repo' a valid repository path?"
> > > 
> > > --Yes, it is.  I can do a co of the repository from the local
> > > machine using the file:/// convention
> > 
> > This is most likely a permissions problem - check the uid and gid
> > Apache is running under and make sure they can both read and write to
> > the repository.
> 
> I created a 'svn' user account that owns the repository and the apache server 
> runs as that user as well.

Does the file /usr/local/svn-repo/format exist?  Does it have a first
line consisting of the digit "1"?

Can the svn user run 'cat /usr/local/svn-repo/format'?

-- 
Philip Martin

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

Re: "Expected version '1' of repository; found no version...

Posted by Gordon Sullivan <go...@gortek.com>.
Quoting Nuutti Kotivuori <na...@iki.fi>:

> Gordon Sullivan wrote:
> > I'm getting the following message when I try viewing the repository
> > in my browser: "Expected version '1' of repository; found no version
> > at all; is '/usr/local/svn-repo' a valid repository path?"
> > 
> > --Yes, it is.  I can do a co of the repository from the local
> > machine using the file:/// convention
> 
> This is most likely a permissions problem - check the uid and gid
> Apache is running under and make sure they can both read and write to
> the repository.



I created a 'svn' user account that owns the repository and the apache server 
runs as that user as well.



> 
> And yes, a better error message would be appropriate - there is an
> issue filed about this.
> 
> -- Naked
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
> For additional commands, e-mail: dev-help@subversion.tigris.org
> 
> 


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

Re: "Expected version '1' of repository; found no version...

Posted by Nuutti Kotivuori <na...@iki.fi>.
Gordon Sullivan wrote:
> I'm getting the following message when I try viewing the repository
> in my browser: "Expected version '1' of repository; found no version
> at all; is '/usr/local/svn-repo' a valid repository path?"
> 
> --Yes, it is.  I can do a co of the repository from the local
> machine using the file:/// convention

This is most likely a permissions problem - check the uid and gid
Apache is running under and make sure they can both read and write to
the repository.

And yes, a better error message would be appropriate - there is an
issue filed about this.

-- Naked


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