You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Shay Harding <sh...@ccbill.com> on 2002/08/13 02:27:24 UTC

OPTIONS request failed error

Ok, I am at my wits end about these problems that suddenly appeared
after upgrading to the newest Subversion (revision 2959) and Apache
(from CVS).

I keep getting the following error no matter what commands I issue:

[shayh]# svn mkdir http://localhost/repos/programmers -m "Test"
subversion/libsvn_ra_dav/util.c:332: (apr_err=20014, src_err=0)
svn: Error string not specified yet
svn: OPTIONS request failed on /repos
subversion/libsvn_ra_dav/util.c:306: (apr_err=20014, src_err=0)
svn: The OPTIONS status was 301, but expected 200.

Now this was working before I updated. I get the same error if I try to
import anything now as well.

Nothing at all appears in the Apache error log, just the above error
that gets printed to screen.

I've made sure the repository directory is owned by the Apache user (svn
in this case). I can browse to the directory just fine with lynx. I can
'su svn' and do whatever I want in the repository directory, so I know
the web server can as well since it runs as 'svn'.

I just cannot seem to find what is suddenly causing these errors. Anyone
have any ideas. The above error really isn't all that helpful and seems
to be a general error meaning 'I (being the software) have no clue what
just happened, but it was bad'.



Shay


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

Re: OPTIONS request failed error

Posted by Julian Fitzell <ju...@beta4.com>.
Shay Harding wrote:
> On Tue, 2002-08-13 at 15:41, Julian Fitzell wrote:
> 
>>Shay Harding wrote:
>>
>>>On Tue, 2002-08-13 at 08:57, Karl Fogel wrote:
>>>
>>>
>>>>Shay Harding <sh...@ccbill.com> writes:
>>>>
>>>>
>>>>>Ok, I am at my wits end about these problems that suddenly appeared
>>>>>after upgrading to the newest Subversion (revision 2959) and Apache
>>>>>(from CVS).
>>>>>
>>>>>I keep getting the following error no matter what commands I issue:
>>>>>
>>>>>[shayh]# svn mkdir http://localhost/repos/programmers -m "Test"
>>>>>subversion/libsvn_ra_dav/util.c:332: (apr_err=20014, src_err=0)
>>>>>svn: Error string not specified yet
>>>>>svn: OPTIONS request failed on /repos
>>>>>subversion/libsvn_ra_dav/util.c:306: (apr_err=20014, src_err=0)
>>>>>svn: The OPTIONS status was 301, but expected 200.
>>>>>
>>>>>Now this was working before I updated. I get the same error if I try to
>>>>>import anything now as well.
>>>>>
>>>>>Nothing at all appears in the Apache error log, just the above error
>>>>>that gets printed to screen.
>>>>
>>>>Can you do an ethereal capture of the traffic on port 80?
>>>>
>>>>(And if you're really feeling ambitious, do the same thing with the
>>>>old code, the version that worked, so we can compare them...)
>>>>
>>>
>>>
>>>Well, after messing with this for a while, it seems Apache (or some
>>>component of Apache) is sending back a 301 status (permanent redirect)
>>>for any access to http://localhost/repos where my repository resides. If
>>>I lynx to the page, I get there no problem but that's only because Lynx
>>>redirects me without complaints. If I use 'svn mkdir
>>>http://localhost/repos/A', it errors out because it is expecting a 200
>>>(OK) status, but receiving a 301 status back (guess there's no redirect
>>>capability within mod_dav_svn (or maybe it's the mod_dav) module?
>>>
>>>Now as to why the Apache server is insisting on a 301 status... I have
>>>no clue. There are no <Redirect> type tags in the conf file and the SVN
>>>config is:
>>>
>>>Alias /repos /var/securewww/repos
>>>
>>><Location /repos>
>>>    DAV svn
>>>    SVNPath /var/securewww/repos
>>>
>>>    AllowOverride       None
>>>    Options             None
>>></Location>
>>
>> >
>>
>>Perhaps I'm missing something but why is that Alias directive there? 
>>Looks to me like you've got two thing serving the same URL path 
>>("/alias") though I have no idea which take precedence.  I also don't 
>>quite see how that would cause a 301 but I always try to remove the 
>>extraneous stuff first and see if the problem is still there.  If 
>>there's actually a reason for that Alias, my mistake...
>>
>>[...]
>>
>>>
>>>Any help or insight would surely be appreciated.
>>
>>Julian
> 
> 
> The 'Alias' exists because '/repos' is not in the DocumentRoot so Apache
> needs to know where to find it or else it will return a 404.
> 

Have you tried it without the Alias?

 From the apache docs about Location:

"Note that URLs do not have to line up with the filesystem at all, it 
should be emphasized that <Location> operates completely outside the 
filesystem."

The only thing that knows the filepath is the mod_dav_svn (from the 
SVNPath directive).

Your success from adding a / may be just that the Location is then 
matching and the Alias is not.

I certainly don't have an Alias and it works fine.

Julian


-- 
julian@beta4.com
Beta4 Productions (http://www.beta4.com)


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

Re: OPTIONS request failed error

Posted by Shay Harding <sh...@ccbill.com>.
On Tue, 2002-08-13 at 15:53, Shay Harding wrote:
> On Tue, 2002-08-13 at 15:41, Julian Fitzell wrote:
> > Shay Harding wrote:
> > > On Tue, 2002-08-13 at 08:57, Karl Fogel wrote:
> > > 
> > >>Shay Harding <sh...@ccbill.com> writes:
> > >>
> > >>>Ok, I am at my wits end about these problems that suddenly appeared
> > >>>after upgrading to the newest Subversion (revision 2959) and Apache
> > >>>(from CVS).
> > >>>
> > >>>I keep getting the following error no matter what commands I issue:
> > >>>
> > >>>[shayh]# svn mkdir http://localhost/repos/programmers -m "Test"
> > >>>subversion/libsvn_ra_dav/util.c:332: (apr_err=20014, src_err=0)
> > >>>svn: Error string not specified yet
> > >>>svn: OPTIONS request failed on /repos
> > >>>subversion/libsvn_ra_dav/util.c:306: (apr_err=20014, src_err=0)
> > >>>svn: The OPTIONS status was 301, but expected 200.
> > >>>
> > >>>Now this was working before I updated. I get the same error if I try to
> > >>>import anything now as well.
> > >>>
> > >>>Nothing at all appears in the Apache error log, just the above error
> > >>>that gets printed to screen.
> > >>
> > >>Can you do an ethereal capture of the traffic on port 80?
> > >>
> > >>(And if you're really feeling ambitious, do the same thing with the
> > >>old code, the version that worked, so we can compare them...)
> > >>
> > > 
> > > 
> > > Well, after messing with this for a while, it seems Apache (or some
> > > component of Apache) is sending back a 301 status (permanent redirect)
> > > for any access to http://localhost/repos where my repository resides. If
> > > I lynx to the page, I get there no problem but that's only because Lynx
> > > redirects me without complaints. If I use 'svn mkdir
> > > http://localhost/repos/A', it errors out because it is expecting a 200
> > > (OK) status, but receiving a 301 status back (guess there's no redirect
> > > capability within mod_dav_svn (or maybe it's the mod_dav) module?
> > > 
> > > Now as to why the Apache server is insisting on a 301 status... I have
> > > no clue. There are no <Redirect> type tags in the conf file and the SVN
> > > config is:
> > > 
> > > Alias /repos /var/securewww/repos
> > > 
> > > <Location /repos>
> > >     DAV svn
> > >     SVNPath /var/securewww/repos
> > > 
> > >     AllowOverride       None
> > >     Options             None
> > > </Location>
> >  >

And it figures I would find the solution right after I post to the
list... seems the 'Alias' line needs to be:

Alias /repos/ /var/securewww/repos/


Guess for SVN to correctly get to the repository, the trailing slashes
are required. Guess my next question is which piece of the puzzle does
the actual lookup (and handling of redirects if necessary) of the
resource requested?



Shay




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

Re: OPTIONS request failed error

Posted by Greg Stein <gs...@lyra.org>.
On Wed, Aug 14, 2002 at 01:15:50AM +0200, Olof Oberg wrote:
> On 2002-08-13 15:53:52 (PDT) Shay Harding <sh...@ccbill.com> wrote:
> [snip]
> > The 'Alias' exists because '/repos' is not in the DocumentRoot so Apache
> > needs to know where to find it or else it will return a 404.

As others have said... this isn't true.

> http://httpd.apache.org/docs-2.0/mod/core.html#location
> 
>  "Note that URLs do not have to line up with the filesystem at all, 
>   it should be emphasized that <Location> operates completely outside 
>   the filesystem."

Right. mod_dav_svn serves the Location.

In fact, using an Alias is dangerous. It maps a portion of the filesystem
into the URL space. If something goes wonky, then it might be possible for
somebody to grab http://example.com/repos/db/strings and look at your entire
repository.

You were getting a 301 because your URL did not have a trailing slash. The
Alias and mod_dav_svn were fighting for serving, and Apache won. It saw you
referred to a filesystem directory and didn't include a trailing slash. So
it redirected you to one that *had* a slash.

The answer is to not let Apache serve the thing, and that means to remove
the Alias directive.

Appending the slash worked because when you requested /repos, that did not
match /repos/

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: OPTIONS request failed error

Posted by Olof Oberg <mi...@pedgr571.sn.umu.se>.
On 2002-08-13 15:53:52 (PDT) Shay Harding <sh...@ccbill.com> wrote:
[snip]
> The 'Alias' exists because '/repos' is not in the DocumentRoot so Apache
> needs to know where to find it or else it will return a 404.
http://httpd.apache.org/docs-2.0/mod/core.html#location

 "Note that URLs do not have to line up with the filesystem at all, 
  it should be emphasized that <Location> operates completely outside 
  the filesystem."

So you can have a <Location /dev/null> (doesn't seem to like "null" though, 
but anyway) and then have SVNPath point to where ever your repository is 
located. 

The Alias shouldn't be necessary.

Or maybe I am missing something with your Alias..

 /mill

-- 
#############################################################
# S-mail: Olof Oberg     #  mill@pedgr571.sn.umu.se         #
#         Pedagoggr. 7A  #  mill@ludd.luth.se               #
#         S-907 30 Umea  #  tdv94oog@cs.umu.se              #
# Phone:  090-197395     #  http://pedgr571.sn.umu.se/~mill #
#############################################################



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

Re: OPTIONS request failed error

Posted by Shay Harding <sh...@ccbill.com>.
On Tue, 2002-08-13 at 15:41, Julian Fitzell wrote:
> Shay Harding wrote:
> > On Tue, 2002-08-13 at 08:57, Karl Fogel wrote:
> > 
> >>Shay Harding <sh...@ccbill.com> writes:
> >>
> >>>Ok, I am at my wits end about these problems that suddenly appeared
> >>>after upgrading to the newest Subversion (revision 2959) and Apache
> >>>(from CVS).
> >>>
> >>>I keep getting the following error no matter what commands I issue:
> >>>
> >>>[shayh]# svn mkdir http://localhost/repos/programmers -m "Test"
> >>>subversion/libsvn_ra_dav/util.c:332: (apr_err=20014, src_err=0)
> >>>svn: Error string not specified yet
> >>>svn: OPTIONS request failed on /repos
> >>>subversion/libsvn_ra_dav/util.c:306: (apr_err=20014, src_err=0)
> >>>svn: The OPTIONS status was 301, but expected 200.
> >>>
> >>>Now this was working before I updated. I get the same error if I try to
> >>>import anything now as well.
> >>>
> >>>Nothing at all appears in the Apache error log, just the above error
> >>>that gets printed to screen.
> >>
> >>Can you do an ethereal capture of the traffic on port 80?
> >>
> >>(And if you're really feeling ambitious, do the same thing with the
> >>old code, the version that worked, so we can compare them...)
> >>
> > 
> > 
> > Well, after messing with this for a while, it seems Apache (or some
> > component of Apache) is sending back a 301 status (permanent redirect)
> > for any access to http://localhost/repos where my repository resides. If
> > I lynx to the page, I get there no problem but that's only because Lynx
> > redirects me without complaints. If I use 'svn mkdir
> > http://localhost/repos/A', it errors out because it is expecting a 200
> > (OK) status, but receiving a 301 status back (guess there's no redirect
> > capability within mod_dav_svn (or maybe it's the mod_dav) module?
> > 
> > Now as to why the Apache server is insisting on a 301 status... I have
> > no clue. There are no <Redirect> type tags in the conf file and the SVN
> > config is:
> > 
> > Alias /repos /var/securewww/repos
> > 
> > <Location /repos>
> >     DAV svn
> >     SVNPath /var/securewww/repos
> > 
> >     AllowOverride       None
> >     Options             None
> > </Location>
>  >
> 
> Perhaps I'm missing something but why is that Alias directive there? 
> Looks to me like you've got two thing serving the same URL path 
> ("/alias") though I have no idea which take precedence.  I also don't 
> quite see how that would cause a 301 but I always try to remove the 
> extraneous stuff first and see if the problem is still there.  If 
> there's actually a reason for that Alias, my mistake...
> 
> [...]
> > 
> > 
> > Any help or insight would surely be appreciated.
> 
> Julian

The 'Alias' exists because '/repos' is not in the DocumentRoot so Apache
needs to know where to find it or else it will return a 404.



Shay




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

Re: OPTIONS request failed error

Posted by Julian Fitzell <ju...@beta4.com>.
Shay Harding wrote:
> On Tue, 2002-08-13 at 08:57, Karl Fogel wrote:
> 
>>Shay Harding <sh...@ccbill.com> writes:
>>
>>>Ok, I am at my wits end about these problems that suddenly appeared
>>>after upgrading to the newest Subversion (revision 2959) and Apache
>>>(from CVS).
>>>
>>>I keep getting the following error no matter what commands I issue:
>>>
>>>[shayh]# svn mkdir http://localhost/repos/programmers -m "Test"
>>>subversion/libsvn_ra_dav/util.c:332: (apr_err=20014, src_err=0)
>>>svn: Error string not specified yet
>>>svn: OPTIONS request failed on /repos
>>>subversion/libsvn_ra_dav/util.c:306: (apr_err=20014, src_err=0)
>>>svn: The OPTIONS status was 301, but expected 200.
>>>
>>>Now this was working before I updated. I get the same error if I try to
>>>import anything now as well.
>>>
>>>Nothing at all appears in the Apache error log, just the above error
>>>that gets printed to screen.
>>
>>Can you do an ethereal capture of the traffic on port 80?
>>
>>(And if you're really feeling ambitious, do the same thing with the
>>old code, the version that worked, so we can compare them...)
>>
> 
> 
> Well, after messing with this for a while, it seems Apache (or some
> component of Apache) is sending back a 301 status (permanent redirect)
> for any access to http://localhost/repos where my repository resides. If
> I lynx to the page, I get there no problem but that's only because Lynx
> redirects me without complaints. If I use 'svn mkdir
> http://localhost/repos/A', it errors out because it is expecting a 200
> (OK) status, but receiving a 301 status back (guess there's no redirect
> capability within mod_dav_svn (or maybe it's the mod_dav) module?
> 
> Now as to why the Apache server is insisting on a 301 status... I have
> no clue. There are no <Redirect> type tags in the conf file and the SVN
> config is:
> 
> Alias /repos /var/securewww/repos
> 
> <Location /repos>
>     DAV svn
>     SVNPath /var/securewww/repos
> 
>     AllowOverride       None
>     Options             None
> </Location>
 >

Perhaps I'm missing something but why is that Alias directive there? 
Looks to me like you've got two thing serving the same URL path 
("/alias") though I have no idea which take precedence.  I also don't 
quite see how that would cause a 301 but I always try to remove the 
extraneous stuff first and see if the problem is still there.  If 
there's actually a reason for that Alias, my mistake...

[...]
> 
> 
> Any help or insight would surely be appreciated.

Julian


-- 
julian@beta4.com
Beta4 Productions (http://www.beta4.com)


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

Re: OPTIONS request failed error

Posted by Shay Harding <sh...@ccbill.com>.
On Tue, 2002-08-13 at 08:57, Karl Fogel wrote:
> Shay Harding <sh...@ccbill.com> writes:
> > Ok, I am at my wits end about these problems that suddenly appeared
> > after upgrading to the newest Subversion (revision 2959) and Apache
> > (from CVS).
> > 
> > I keep getting the following error no matter what commands I issue:
> > 
> > [shayh]# svn mkdir http://localhost/repos/programmers -m "Test"
> > subversion/libsvn_ra_dav/util.c:332: (apr_err=20014, src_err=0)
> > svn: Error string not specified yet
> > svn: OPTIONS request failed on /repos
> > subversion/libsvn_ra_dav/util.c:306: (apr_err=20014, src_err=0)
> > svn: The OPTIONS status was 301, but expected 200.
> > 
> > Now this was working before I updated. I get the same error if I try to
> > import anything now as well.
> > 
> > Nothing at all appears in the Apache error log, just the above error
> > that gets printed to screen.
> 
> Can you do an ethereal capture of the traffic on port 80?
> 
> (And if you're really feeling ambitious, do the same thing with the
> old code, the version that worked, so we can compare them...)
> 

Well, after messing with this for a while, it seems Apache (or some
component of Apache) is sending back a 301 status (permanent redirect)
for any access to http://localhost/repos where my repository resides. If
I lynx to the page, I get there no problem but that's only because Lynx
redirects me without complaints. If I use 'svn mkdir
http://localhost/repos/A', it errors out because it is expecting a 200
(OK) status, but receiving a 301 status back (guess there's no redirect
capability within mod_dav_svn (or maybe it's the mod_dav) module?

Now as to why the Apache server is insisting on a 301 status... I have
no clue. There are no <Redirect> type tags in the conf file and the SVN
config is:

Alias /repos /var/securewww/repos

<Location /repos>
    DAV svn
    SVNPath /var/securewww/repos

    AllowOverride       None
    Options             None
</Location>


same as it was before I upgraded the Apache/SVN/Neon programs. If I
change the config to include a trailing '/', I can get to
http://localhost/repos/ with no 301 occurring as I would expect. Problem
is SVN doesn't like that. That then gives me:

subversion/libsvn_ra_dav/options.c:126
svn_error: #21102 : <RA layer didn't receive requested OPTIONS info>
  The OPTIONS response did not include the requested
activity-collection-set.
(Check the URL again;  this often means that the URL is not
WebDAV-enabled.)

Request Header:

    OPTIONS /repos HTTP/1.1\r\n
    User-Agent: neon/0.21.2 SVN/0.14.0 (dev build)\r\n


I'm guessing the above occurs because SVN strips the URL down to
"http://localhost/repos" (as seen in the headers) and now Apache has no
clue where to find this since mod_alias matches the trailing '/'.

It's hard to tell which component is doing what since there's SVN, Neon,
DAV, Apache +(modules, hooks, filters, etc).

The response headers for the above were:

    HTTP/1.1 200 OK\r\n
    Date: Mon, 12 Aug 2002 22:09:34 GMT\r\n
    Server: Apache/2.0.41-dev (Unix) mod_ssl/2.0.41-dev OpenSSL/0.9.6g
DAV/2 SVN/0.14.1 (dev build)\r\n
    Allow: GET,HEAD,POST,OPTIONS,TRACE\r\n
    Content-Length: 0\r\n
    Keep-Alive: timeout=15, max=100\r\n
    Connection: Keep-Alive\r\n
    Content-Type: text/plain; charset=ISO-8859-1\r\n
    \r\n


Any help or insight would surely be appreciated.



Shay







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

Re: OPTIONS request failed error

Posted by Karl Fogel <kf...@newton.ch.collab.net>.
Shay Harding <sh...@ccbill.com> writes:
> Ok, I am at my wits end about these problems that suddenly appeared
> after upgrading to the newest Subversion (revision 2959) and Apache
> (from CVS).
> 
> I keep getting the following error no matter what commands I issue:
> 
> [shayh]# svn mkdir http://localhost/repos/programmers -m "Test"
> subversion/libsvn_ra_dav/util.c:332: (apr_err=20014, src_err=0)
> svn: Error string not specified yet
> svn: OPTIONS request failed on /repos
> subversion/libsvn_ra_dav/util.c:306: (apr_err=20014, src_err=0)
> svn: The OPTIONS status was 301, but expected 200.
> 
> Now this was working before I updated. I get the same error if I try to
> import anything now as well.
> 
> Nothing at all appears in the Apache error log, just the above error
> that gets printed to screen.

Can you do an ethereal capture of the traffic on port 80?

(And if you're really feeling ambitious, do the same thing with the
old code, the version that worked, so we can compare them...)

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