You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Masaru Kitajima <ki...@prime-kobo.com> on 2012/05/31 05:46:09 UTC

Problem in connecting the server

Hi, all!

I do need your help.

I'm running CentOS 5.8 and Subversion 1.6.11 on a VPS.

When I try to connect to the repository from my client Versions.app for Mac,
an error message is shown.
"Could not read status line: Connection reset by peer"

I use http to connect to the repository, not https as I haven't configured SSL
connection on my server.

I installed Subversion using yum. And am confusing that two packages were
installed.

Package subversion-1.6.11-10.el5_8.x86_64
Package subversion-1.6.11-10.el5_8.i386

I don't know why two packages were installed.

Anyway, please help me to solve the status line issue.

Thanks in advance for your help

Kindest regards,
Masaru

Re: Problem in connecting the server

Posted by Masaru Kitajima <ta...@gmail.com>.
Stefan,

First of all, I really appreciate your continuing helps.

I'm new to subversion and server configuration, your helps
are very appreciated.

To disable /var/www/html/, is it OK to comment out the document
root setting in httpd.conf and <Direcotry /var/www/html> section?

My website location is http://www.hakodate-night.info. This is where
/var/www/html/.

And my subversion location is /var/lib/svn/ and accessible form
http://www.hakodate-night.info/svn/ikasu . "ikasu" is the real name
of project.

/var/lib/svn/ is protected by .htpasswd. If you kindly check it, I'll
disable the auth related settings for /var/lib/svn.

Anyway, I'll try to disable the /var/www/html/ first.

Thanks again,
Kindest regards,

Masaru

On 2012/06/03, at 1:07, Stefan Sperling wrote:
> On Sat, Jun 02, 2012 at 07:39:46PM +0900, Masaru Kitajima wrote:
>> Stefan,
>> 
>> I have one website configuration and its document root is /var/www/html/.
>> This is where I want to put the php files. No other website is configured.
>> 
>> And I want to manage there versions with subversion and its repository
>> is /lib/svn/project.
>> 
>> Do you recommend to disable /var/www/html/?
> 
> Yes. Please try to disable the other website and check if that
> makes the problem go away.
> 
> What URL do you use to access the website? Is the website at '/' ?
> 
> Please make sure that <Location /svn> and the website location do
> not overlap. Else, Apache HTTPD might mis-route requests destined
> for Subversion to the website, and vice-versa.
> 
> Qutoing http://svnbook.red-bean.com/en/1.7/svn.serverconfig.httpd.html
>  Be sure that when you define your new Location, it doesn't overlap with other
>  exported locations. For example, if your main DocumentRoot is exported to /www,
>  do not export a Subversion repository in <Location /www/repos>. If a request
>  comes in for the URI /www/repos/foo.c, Apache won't know whether to look for a
>  file repos/foo.c in the DocumentRoot, or whether to delegate mod_dav_svn to
>  return foo.c from the Subversion repository. The result is often an error from
>  the server of the form 301 Moved Permanently.


Re: Problem in connecting the server

Posted by Masaru Kitajima <ta...@gmail.com>.
Stefan,

I disabled what you kindly mentioned about /etc/httpd/conf/httpd/conf.

Then I tried again, but the same error happened. Of course, I restarted
the httpd after modified the conf file.

On 2012/06/04, at 19:36, Stefan Sperling wrote:
> On Mon, Jun 04, 2012 at 10:02:02AM +0900, Masaru Kitajima wrote:
>> And in the /etc/httpd/conf/httpd/conf, the WebDAV is defined as below.
>> <IfModule mod_dav_fs.c>
>>    # Location of the WebDAV lock database.
>>    DAVLockDB /var/lib/svn/dav.lock
>> </IfModule>
>> <Directory /var/lib/svn>
>>    DAV on
>> </Directory>
> 
> Why did you add the above? I don't think it's necessary. It might even
> conflict with Subversion's own DAV handler. Setting SVNAutoversioning on
> as you did below should be enough to allow DAV clients to connect to
> Subversion. Try removing the above lines from your configuration and
> maybe that will fix the problem.
> 
>> 
>> And in /etc/httpd/conf.d/subversion.conf. I defined as below.
>> <Location /svn>
>>   DAV svn
>>   SVNParentPath /var/lib/svn
>>   SVNAutoversioning on
>>   <LimitExcept GET PROPFIND OPTIONS REPORT>
>>      # Require SSL connection for password protection.
>>      # SSLRequireSSL
>> 
>>      AuthType Basic
>>      AuthName "Authorization Realm"
>>      AuthUserFile /etc/httpd/conf.d/svn_auth
>>      Require valid-user
>>   </LimitExcept>
>> </Location>
>> 
>> Then I restarted the httpd and tried to connect via client,
>> but the result was same. Still cannot connect.


Re: Problem in connecting the server

Posted by Stefan Sperling <st...@elego.de>.
On Thu, Jun 07, 2012 at 10:39:11AM +0900, Masaru Kitajima wrote:
> Stefan,
> 
> I sent an e-mail with my iptables list. Did you kindly look at it?

Yes but I could not see anything wrong with it.
And I don't really know a lot about iptables.

One if your rules requires stateful connection tracking:
  ACCEPT tcp  --  anywhere  anywhere  state RELATED,ESTABLISHED
As far as I know this requires the ip_conntrack (or nf_conntrack) kernel
module to be loaded. Is it loaded? Check with 'lsmod | grep conntrack'.

> Is there anything wrong?
> 
> The problem is not fixed yet. Please help me.

At this point, I don't know what else to suggest. The problem
is hard for me to diagnose remotely over email. Sorry.

Also, I think we've ruled out long ago that this is a problem with
Subverion itself, but probably some network configuration issue.
This mailing list is primarily about problems with Subversion itself,
not about iptables etc. There are other support forums for that.

I would suggest that you ask a tech-savvy friend who could help and take
a look at the machine together with you to locate the source of the problem.

Re: Problem in connecting the server

Posted by Masaru Kitajima <ta...@gmail.com>.
Stefan,

I checked my iptables and found that only dpt port 80 was enabled.
I added spt to port 80. Also, to use svn commando to apache.org,
I opened both -dport and -sport on 3690.

After saving itables and restarting it, I tried 
"svn co http://svn.apache.org/repos/asf/subversion/trunk subversion"
again on the server, but it failed with the message
"svn: OPTIONS (URL: 'http://svn.apache.org/repos/asf/subversion/trunk'): 
Could not read status line:(http://svn.apache.org)".

Nothing has changed. Let me show my iptables list here. I add SERVICE
chain to make it manage easily.

Chain INPUT (policy DROP)
target     prot opt source               destination         
ACCEPT     all  --  anywhere             anywhere            
DROP       all  --  10.0.0.0/8           anywhere            
DROP       all  --  172.16.0.0/12        anywhere            
DROP       all  --  192.168.0.0/16       anywhere            
ACCEPT     icmp --  anywhere             anywhere            icmp echo-request 
ACCEPT     icmp --  anywhere             anywhere            icmp echo-reply 
ACCEPT     udp  --  anywhere             anywhere            udp spt:domain 
ACCEPT     tcp  --  anywhere             anywhere            state RELATED,ESTABLISHED 
DROP       tcp  --  anywhere             anywhere            state NEW tcp flags:!FIN,SYN,RST,ACK/SYN 
SERVICE    tcp  --  anywhere             anywhere            state NEW 

Chain FORWARD (policy DROP)
target     prot opt source               destination         

Chain OUTPUT (policy ACCEPT)
target     prot opt source               destination         

Chain SERVICE (1 references)
target     prot opt source               destination         
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:10022 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp-data 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:ftp 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpts:50000:50030 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:smtp 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:pop3 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:imap 
ACCEPT     tcp  --  anywhere             anywhere            tcp spt:smtp 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:submission 
ACCEPT     tcp  --  anywhere             anywhere            tcp spt:submission 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:http 
ACCEPT     tcp  --  anywhere             anywhere            tcp spt:http 
ACCEPT     tcp  --  anywhere             anywhere            tcp dpt:svn 
ACCEPT     tcp  --  anywhere             anywhere            tcp spt:svn 

Would you please have a look at this list? And if you find my mistakes,
let me know please.

Thanks in advance,
Masaru

On 2012/06/05, at 18:55, Stefan Sperling wrote:
> On Tue, Jun 05, 2012 at 06:42:46PM +0900, Masaru Kitajima wrote:
>> I'm not sure if I have a connection problem. As "Yum" and "wget"
>> works well on the server. And I can connect to the server using
>> HTTP, FTP, and SSH.
> 
> If I understood correctly you are having trouble connecting *from*
> the server to svn.apache.org, and that you can connect fine to
> svn.apache.org from another machine. Or did I misunderstand?
> 
>> And I'm not behind any proxies. Only one thing which is different
>> is that it's a VPS. But the VPS has a global IP address and I can
>> configure almost everything.
> 
> Maybe something between svn.apache.org and the VPS is interfering?
> Maybe your iptables rules on the VPS are somehow blocking or breaking
> outgoing http connections?
> 
> I hope you'll find out what's wrong. I cannot think of anything
> else to suggest :(
> 
>> Ah, I'm really confusing. Is there any specific port I should open
>> using iptables for Subversion HTTP connection besides 80?
> 
> Subversion uses just port 80 for HTTP.
> 
> BTW, I'm getting occasional bounces when sending replies to your posts:
> 
>  Final-Recipient: RFC822; kitajima@prime-kobo.com
>  Action: failed
>  Status: 4.4.7
>  Remote-MTA: DNS; prime-kobo.com
>  Diagnostic-Code: SMTP; 451 4.3.5 Server configuration error
>  Last-Attempt-Date: Tue, 5 Jun 2012 11:31:05 +0200
> 
> I don't know what this means and if it is related to the Subversion trouble
> you're having.


Re: Problem in connecting the server

Posted by Masaru Kitajima <ta...@gmail.com>.
On 2012/06/05, at 18:55, Stefan Sperling wrote:
> On Tue, Jun 05, 2012 at 06:42:46PM +0900, Masaru Kitajima wrote:
>> I'm not sure if I have a connection problem. As "Yum" and "wget"
>> works well on the server. And I can connect to the server using
>> HTTP, FTP, and SSH.
> 
> If I understood correctly you are having trouble connecting *from*
> the server to svn.apache.org, and that you can connect fine to
> svn.apache.org from another machine. Or did I misunderstand?

 Yes, you understand correctly.

>> And I'm not behind any proxies. Only one thing which is different
>> is that it's a VPS. But the VPS has a global IP address and I can
>> configure almost everything.
> 
> Maybe something between svn.apache.org and the VPS is interfering?
> Maybe your iptables rules on the VPS are somehow blocking or breaking
> outgoing http connections?

 Well, I'll check it tomorrow as I've gotta leave my office right
now as I have an appointment tonight.

> I hope you'll find out what's wrong. I cannot think of anything
> else to suggest :(

I really appreciate your helps. I'll check iptables tomorrow.

>> Ah, I'm really confusing. Is there any specific port I should open
>> using iptables for Subversion HTTP connection besides 80?
> 
> Subversion uses just port 80 for HTTP.

I see, thank you.

> BTW, I'm getting occasional bounces when sending replies to your posts:
> 
>  Final-Recipient: RFC822; kitajima@prime-kobo.com
>  Action: failed
>  Status: 4.4.7
>  Remote-MTA: DNS; prime-kobo.com
>  Diagnostic-Code: SMTP; 451 4.3.5 Server configuration error
>  Last-Attempt-Date: Tue, 5 Jun 2012 11:31:05 +0200
> 
> I don't know what this means and if it is related to the Subversion trouble
> you're having.

 No, it's not related to subversion trouble. Maybe I used another e-mail
account.

 Am sorry to cause you a trouble.

Re: Problem in connecting the server

Posted by Masaru Kitajima <ta...@gmail.com>.
Stefan,

I sent an e-mail with my iptables list. Did you kindly look at it?

Is there anything wrong?

The problem is not fixed yet. Please help me.

Kindest regards,
Masaru

On 2012/06/05, at 18:55, Stefan Sperling wrote:

> On Tue, Jun 05, 2012 at 06:42:46PM +0900, Masaru Kitajima wrote:
>> I'm not sure if I have a connection problem. As "Yum" and "wget"
>> works well on the server. And I can connect to the server using
>> HTTP, FTP, and SSH.
> 
> If I understood correctly you are having trouble connecting *from*
> the server to svn.apache.org, and that you can connect fine to
> svn.apache.org from another machine. Or did I misunderstand?
> 
>> And I'm not behind any proxies. Only one thing which is different
>> is that it's a VPS. But the VPS has a global IP address and I can
>> configure almost everything.
> 
> Maybe something between svn.apache.org and the VPS is interfering?
> Maybe your iptables rules on the VPS are somehow blocking or breaking
> outgoing http connections?
> 
> I hope you'll find out what's wrong. I cannot think of anything
> else to suggest :(
> 
>> Ah, I'm really confusing. Is there any specific port I should open
>> using iptables for Subversion HTTP connection besides 80?
> 
> Subversion uses just port 80 for HTTP.
> 
> BTW, I'm getting occasional bounces when sending replies to your posts:
> 
>  Final-Recipient: RFC822; kitajima@prime-kobo.com
>  Action: failed
>  Status: 4.4.7
>  Remote-MTA: DNS; prime-kobo.com
>  Diagnostic-Code: SMTP; 451 4.3.5 Server configuration error
>  Last-Attempt-Date: Tue, 5 Jun 2012 11:31:05 +0200
> 
> I don't know what this means and if it is related to the Subversion trouble
> you're having.


Re: Problem in connecting the server

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Jun 05, 2012 at 06:42:46PM +0900, Masaru Kitajima wrote:
> I'm not sure if I have a connection problem. As "Yum" and "wget"
> works well on the server. And I can connect to the server using
> HTTP, FTP, and SSH.

If I understood correctly you are having trouble connecting *from*
the server to svn.apache.org, and that you can connect fine to
svn.apache.org from another machine. Or did I misunderstand?

> And I'm not behind any proxies. Only one thing which is different
> is that it's a VPS. But the VPS has a global IP address and I can
> configure almost everything.

Maybe something between svn.apache.org and the VPS is interfering?
Maybe your iptables rules on the VPS are somehow blocking or breaking
outgoing http connections?

I hope you'll find out what's wrong. I cannot think of anything
else to suggest :(

> Ah, I'm really confusing. Is there any specific port I should open
> using iptables for Subversion HTTP connection besides 80?

Subversion uses just port 80 for HTTP.

BTW, I'm getting occasional bounces when sending replies to your posts:

  Final-Recipient: RFC822; kitajima@prime-kobo.com
  Action: failed
  Status: 4.4.7
  Remote-MTA: DNS; prime-kobo.com
  Diagnostic-Code: SMTP; 451 4.3.5 Server configuration error
  Last-Attempt-Date: Tue, 5 Jun 2012 11:31:05 +0200

I don't know what this means and if it is related to the Subversion trouble
you're having.

Re: Problem in connecting the server

Posted by Masaru Kitajima <ta...@gmail.com>.
I'm not sure if I have a connection problem. As "Yum" and "wget"
works well on the server. And I can connect to the server using
HTTP, FTP, and SSH.

And I'm not behind any proxies. Only one thing which is different
is that it's a VPS. But the VPS has a global IP address and I can
configure almost everything.

Ah, I'm really confusing. Is there any specific port I should open
using iptables for Subversion HTTP connection besides 80?

On 2012/06/05, at 18:26, Stefan Sperling wrote:
> On Tue, Jun 05, 2012 at 03:14:21PM +0900, Masaru Kitajima wrote:
>> Stefan,
>> 
>> I found another problem. This may be server side Subversion configuration
>> is somehow miss configured, I guess.
>> 
>> I installed subversion using "yum -y install subversion" and Subversion
>> 1.6.11 was installed. I also did "yum -y install mod_dav_svn" too.
>> 
>> Today, I found that Subversion 1.7.5 is released. So I tried to get it
>> and build it.
>> 
>> Connecting to my server using SSH and typed 
>> "svn co http://svn.apache.org/repos/asf/subversion/trunk subversion"
>> then again "svn: OPTIONS (URL: 'http://svn.apache.org/repos/asf/subversion/trunk'): 
>> Could not read status line:" was shown on the server.
>> 
>> I have another server running CentOS6 and tried the same thing and
>> it succeeded. I could get the source code from apache.org's repository.
>> 
>> I'm really confused...
> 
> If you cannot even check out from svn.apache.org (which should virtually
> always work), maybe there is a connection problem?
> 
> Are you behind a HTTP proxy?
> Is something blocking or interfering with network traffic?


Re: Problem in connecting the server

Posted by Stefan Sperling <st...@elego.de>.
On Tue, Jun 05, 2012 at 03:14:21PM +0900, Masaru Kitajima wrote:
> Stefan,
> 
> I found another problem. This may be server side Subversion configuration
> is somehow miss configured, I guess.
> 
> I installed subversion using "yum -y install subversion" and Subversion
> 1.6.11 was installed. I also did "yum -y install mod_dav_svn" too.
> 
> Today, I found that Subversion 1.7.5 is released. So I tried to get it
> and build it.
> 
> Connecting to my server using SSH and typed 
> "svn co http://svn.apache.org/repos/asf/subversion/trunk subversion"
> then again "svn: OPTIONS (URL: 'http://svn.apache.org/repos/asf/subversion/trunk'): 
> Could not read status line:" was shown on the server.
> 
> I have another server running CentOS6 and tried the same thing and
> it succeeded. I could get the source code from apache.org's repository.
> 
> I'm really confused...

If you cannot even check out from svn.apache.org (which should virtually
always work), maybe there is a connection problem?

Are you behind a HTTP proxy?
Is something blocking or interfering with network traffic?

Re: Problem in connecting the server

Posted by Masaru Kitajima <ta...@gmail.com>.
Thanks, Nico.

I'll try that later.

Thanks again!

On 2012/06/05, at 21:40, Nico Kadel-Garcia wrote:
> 
> 
> On Tue, Jun 5, 2012 at 2:14 AM, Masaru Kitajima <ta...@gmail.com> wrote:
> Stefan,
> 
> I found another problem. This may be server side Subversion configuration
> is somehow miss configured, I guess.
> 
> I installed subversion using "yum -y install subversion" and Subversion
> 1.6.11 was installed. I also did "yum -y install mod_dav_svn" too.
> 
> Today, I found that Subversion 1.7.5 is released. So I tried to get it
> and build it.
> Hop on over to https://github.com/nkadel/subversion-1.7.5-srpm. This is where I submit things to Repoforge: I've got a similarly set up 1.6.18 srpm toolkit there, as well. And it's got basic configs that I know work.
>  
>  
> Connecting to my server using SSH and typed
> "svn co http://svn.apache.org/repos/asf/subversion/trunk subversion"
> then again "svn: OPTIONS (URL: 'http://svn.apache.org/repos/asf/subversion/trunk'):
> Could not read status line:" was shown on the server.
> 
> I have another server running CentOS6 and tried the same thing and
> it succeeded. I could get the source code from apache.org's repository.
> 
> I'm really confused...
> 
> On 2012/06/04, at 19:36, Stefan Sperling wrote:
> > On Mon, Jun 04, 2012 at 10:02:02AM +0900, Masaru Kitajima wrote:
> >> And in the /etc/httpd/conf/httpd/conf, the WebDAV is defined as below.
> >> <IfModule mod_dav_fs.c>
> >>    # Location of the WebDAV lock database.
> >>    DAVLockDB /var/lib/svn/dav.lock
> >> </IfModule>
> >> <Directory /var/lib/svn>
> >>    DAV on
> >> </Directory>
> >
> > Why did you add the above? I don't think it's necessary. It might even
> > conflict with Subversion's own DAV handler. Setting SVNAutoversioning on
> > as you did below should be enough to allow DAV clients to connect to
> > Subversion. Try removing the above lines from your configuration and
> > maybe that will fix the problem.
> >
> >>
> >> And in /etc/httpd/conf.d/subversion.conf. I defined as below.
> >> <Location /svn>
> >>   DAV svn
> >>   SVNParentPath /var/lib/svn
> >>   SVNAutoversioning on
> >>   <LimitExcept GET PROPFIND OPTIONS REPORT>
> >>      # Require SSL connection for password protection.
> >>      # SSLRequireSSL
> >>
> >>      AuthType Basic
> >>      AuthName "Authorization Realm"
> >>      AuthUserFile /etc/httpd/conf.d/svn_auth
> >>      Require valid-user
> >>   </LimitExcept>
> >> </Location>
> >>
> >> Then I restarted the httpd and tried to connect via client,
> >> but the result was same. Still cannot connect.
> 
> 


Re: Problem in connecting the server

Posted by Nico Kadel-Garcia <nk...@gmail.com>.
On Tue, Jun 5, 2012 at 2:14 AM, Masaru Kitajima <ta...@gmail.com>wrote:

> Stefan,
>
> I found another problem. This may be server side Subversion configuration
> is somehow miss configured, I guess.
>
> I installed subversion using "yum -y install subversion" and Subversion
> 1.6.11 was installed. I also did "yum -y install mod_dav_svn" too.
>
> Today, I found that Subversion 1.7.5 is released. So I tried to get it
> and build it.
>
Hop on over to https://github.com/nkadel/subversion-1.7.5-srpm. This is
where I submit things to Repoforge: I've got a similarly set up 1.6.18 srpm
toolkit there, as well. And it's got basic configs that I know work.



> Connecting to my server using SSH and typed
> "svn co http://svn.apache.org/repos/asf/subversion/trunk subversion"
> then again "svn: OPTIONS (URL: '
> http://svn.apache.org/repos/asf/subversion/trunk'):
> Could not read status line:" was shown on the server.
>
> I have another server running CentOS6 and tried the same thing and
> it succeeded. I could get the source code from apache.org's repository.
>
> I'm really confused...
>
> On 2012/06/04, at 19:36, Stefan Sperling wrote:
> > On Mon, Jun 04, 2012 at 10:02:02AM +0900, Masaru Kitajima wrote:
> >> And in the /etc/httpd/conf/httpd/conf, the WebDAV is defined as below.
> >> <IfModule mod_dav_fs.c>
> >>    # Location of the WebDAV lock database.
> >>    DAVLockDB /var/lib/svn/dav.lock
> >> </IfModule>
> >> <Directory /var/lib/svn>
> >>    DAV on
> >> </Directory>
> >
> > Why did you add the above? I don't think it's necessary. It might even
> > conflict with Subversion's own DAV handler. Setting SVNAutoversioning on
> > as you did below should be enough to allow DAV clients to connect to
> > Subversion. Try removing the above lines from your configuration and
> > maybe that will fix the problem.
> >
> >>
> >> And in /etc/httpd/conf.d/subversion.conf. I defined as below.
> >> <Location /svn>
> >>   DAV svn
> >>   SVNParentPath /var/lib/svn
> >>   SVNAutoversioning on
> >>   <LimitExcept GET PROPFIND OPTIONS REPORT>
> >>      # Require SSL connection for password protection.
> >>      # SSLRequireSSL
> >>
> >>      AuthType Basic
> >>      AuthName "Authorization Realm"
> >>      AuthUserFile /etc/httpd/conf.d/svn_auth
> >>      Require valid-user
> >>   </LimitExcept>
> >> </Location>
> >>
> >> Then I restarted the httpd and tried to connect via client,
> >> but the result was same. Still cannot connect.
>
>

Re: Problem in connecting the server

Posted by Masaru Kitajima <ta...@gmail.com>.
Stefan,

I found another problem. This may be server side Subversion configuration
is somehow miss configured, I guess.

I installed subversion using "yum -y install subversion" and Subversion
1.6.11 was installed. I also did "yum -y install mod_dav_svn" too.

Today, I found that Subversion 1.7.5 is released. So I tried to get it
and build it.

Connecting to my server using SSH and typed 
"svn co http://svn.apache.org/repos/asf/subversion/trunk subversion"
then again "svn: OPTIONS (URL: 'http://svn.apache.org/repos/asf/subversion/trunk'): 
Could not read status line:" was shown on the server.

I have another server running CentOS6 and tried the same thing and
it succeeded. I could get the source code from apache.org's repository.

I'm really confused...

On 2012/06/04, at 19:36, Stefan Sperling wrote:
> On Mon, Jun 04, 2012 at 10:02:02AM +0900, Masaru Kitajima wrote:
>> And in the /etc/httpd/conf/httpd/conf, the WebDAV is defined as below.
>> <IfModule mod_dav_fs.c>
>>    # Location of the WebDAV lock database.
>>    DAVLockDB /var/lib/svn/dav.lock
>> </IfModule>
>> <Directory /var/lib/svn>
>>    DAV on
>> </Directory>
> 
> Why did you add the above? I don't think it's necessary. It might even
> conflict with Subversion's own DAV handler. Setting SVNAutoversioning on
> as you did below should be enough to allow DAV clients to connect to
> Subversion. Try removing the above lines from your configuration and
> maybe that will fix the problem.
> 
>> 
>> And in /etc/httpd/conf.d/subversion.conf. I defined as below.
>> <Location /svn>
>>   DAV svn
>>   SVNParentPath /var/lib/svn
>>   SVNAutoversioning on
>>   <LimitExcept GET PROPFIND OPTIONS REPORT>
>>      # Require SSL connection for password protection.
>>      # SSLRequireSSL
>> 
>>      AuthType Basic
>>      AuthName "Authorization Realm"
>>      AuthUserFile /etc/httpd/conf.d/svn_auth
>>      Require valid-user
>>   </LimitExcept>
>> </Location>
>> 
>> Then I restarted the httpd and tried to connect via client,
>> but the result was same. Still cannot connect.


Re: Problem in connecting the server

Posted by Stefan Sperling <st...@elego.de>.
On Mon, Jun 04, 2012 at 10:02:02AM +0900, Masaru Kitajima wrote:
> And in the /etc/httpd/conf/httpd/conf, the WebDAV is defined as below.
> <IfModule mod_dav_fs.c>
>     # Location of the WebDAV lock database.
>     DAVLockDB /var/lib/svn/dav.lock
> </IfModule>
> <Directory /var/lib/svn>
>     DAV on
> </Directory>

Why did you add the above? I don't think it's necessary. It might even
conflict with Subversion's own DAV handler. Setting SVNAutoversioning on
as you did below should be enough to allow DAV clients to connect to
Subversion. Try removing the above lines from your configuration and
maybe that will fix the problem.

> 
> And in /etc/httpd/conf.d/subversion.conf. I defined as below.
> <Location /svn>
>    DAV svn
>    SVNParentPath /var/lib/svn
>    SVNAutoversioning on
>    <LimitExcept GET PROPFIND OPTIONS REPORT>
>       # Require SSL connection for password protection.
>       # SSLRequireSSL
> 
>       AuthType Basic
>       AuthName "Authorization Realm"
>       AuthUserFile /etc/httpd/conf.d/svn_auth
>       Require valid-user
>    </LimitExcept>
> </Location>
> 
> Then I restarted the httpd and tried to connect via client,
> but the result was same. Still cannot connect.

Re: Problem in connecting the server

Posted by Masaru Kitajima <ta...@gmail.com>.
Stefan,

I disabled the Document root /var/www/html and it's directory
configuration in /etc/httpd/conf/httpd/conf.

And in the /etc/httpd/conf/httpd/conf, the WebDAV is defined as below.
<IfModule mod_dav_fs.c>
    # Location of the WebDAV lock database.
    DAVLockDB /var/lib/svn/dav.lock
</IfModule>
<Directory /var/lib/svn>
    DAV on
</Directory>

And in /etc/httpd/conf.d/subversion.conf. I defined as below.
<Location /svn>
   DAV svn
   SVNParentPath /var/lib/svn
   SVNAutoversioning on
   <LimitExcept GET PROPFIND OPTIONS REPORT>
      # Require SSL connection for password protection.
      # SSLRequireSSL

      AuthType Basic
      AuthName "Authorization Realm"
      AuthUserFile /etc/httpd/conf.d/svn_auth
      Require valid-user
   </LimitExcept>
</Location>

Then I restarted the httpd and tried to connect via client,
but the result was same. Still cannot connect.

Kindest regards,
Masaru

On 2012/06/03, at 1:07, Stefan Sperling wrote:

> On Sat, Jun 02, 2012 at 07:39:46PM +0900, Masaru Kitajima wrote:
>> Stefan,
>> 
>> I have one website configuration and its document root is /var/www/html/.
>> This is where I want to put the php files. No other website is configured.
>> 
>> And I want to manage there versions with subversion and its repository
>> is /lib/svn/project.
>> 
>> Do you recommend to disable /var/www/html/?
> 
> Yes. Please try to disable the other website and check if that
> makes the problem go away.
> 
> What URL do you use to access the website? Is the website at '/' ?
> 
> Please make sure that <Location /svn> and the website location do
> not overlap. Else, Apache HTTPD might mis-route requests destined
> for Subversion to the website, and vice-versa.
> 
> Qutoing http://svnbook.red-bean.com/en/1.7/svn.serverconfig.httpd.html
>  Be sure that when you define your new Location, it doesn't overlap with other
>  exported locations. For example, if your main DocumentRoot is exported to /www,
>  do not export a Subversion repository in <Location /www/repos>. If a request
>  comes in for the URI /www/repos/foo.c, Apache won't know whether to look for a
>  file repos/foo.c in the DocumentRoot, or whether to delegate mod_dav_svn to
>  return foo.c from the Subversion repository. The result is often an error from
>  the server of the form 301 Moved Permanently.


Re: Problem in connecting the server

Posted by Stefan Sperling <st...@elego.de>.
On Sat, Jun 02, 2012 at 07:39:46PM +0900, Masaru Kitajima wrote:
> Stefan,
> 
> I have one website configuration and its document root is /var/www/html/.
> This is where I want to put the php files. No other website is configured.
> 
> And I want to manage there versions with subversion and its repository
> is /lib/svn/project.
> 
> Do you recommend to disable /var/www/html/?

Yes. Please try to disable the other website and check if that
makes the problem go away.

What URL do you use to access the website? Is the website at '/' ?
 
Please make sure that <Location /svn> and the website location do
not overlap. Else, Apache HTTPD might mis-route requests destined
for Subversion to the website, and vice-versa.

Qutoing http://svnbook.red-bean.com/en/1.7/svn.serverconfig.httpd.html
  Be sure that when you define your new Location, it doesn't overlap with other
  exported locations. For example, if your main DocumentRoot is exported to /www,
  do not export a Subversion repository in <Location /www/repos>. If a request
  comes in for the URI /www/repos/foo.c, Apache won't know whether to look for a
  file repos/foo.c in the DocumentRoot, or whether to delegate mod_dav_svn to
  return foo.c from the Subversion repository. The result is often an error from
  the server of the form 301 Moved Permanently.

Re: Problem in connecting the server

Posted by Masaru Kitajima <ta...@gmail.com>.
Stefan,

I have one website configuration and its document root is /var/www/html/.
This is where I want to put the php files. No other website is configured.

And I want to manage there versions with subversion and its repository
is /lib/svn/project.

Do you recommend to disable /var/www/html/?

On 2012/06/02, at 18:29, Stefan Sperling wrote:
> On Sat, Jun 02, 2012 at 07:24:54AM +0900, Masaru Kitajima wrote:
>> Stefan,
>> 
>> I double checked all httpd configuration files, but there was
>> no RedirectMatch for /svn location.
>> 
>> About Project1, I created new repository to check if the project
>> repository was broken.
> 
> Do you have any other Location statements in your configuration?
> 
> Do you run anything else on this server than Subversion, such as
> another website? If so, please disable the other sites and check if
> Subversion works then. If this fixes the problem, try to re-enable
> the other sites until you find the one that breaks Subversion, and
> then show us the configuration of that site, and the Subversion
> configuration.
> 
> (I know you posted your SVN configuration parts already, but to a different
> thread. It is better to have all in the same thread.  In the future, if you
> do not get an answer to a question, please reply to your own post instead of
> starting a new thread. This way, the archives will keep all related
> information linked in a single thread. Thanks!)


Re: Problem in connecting the server

Posted by Stefan Sperling <st...@elego.de>.
On Sat, Jun 02, 2012 at 07:24:54AM +0900, Masaru Kitajima wrote:
> Stefan,
> 
> I double checked all httpd configuration files, but there was
> no RedirectMatch for /svn location.
> 
> About Project1, I created new repository to check if the project
> repository was broken.

Do you have any other Location statements in your configuration?

Do you run anything else on this server than Subversion, such as
another website? If so, please disable the other sites and check if
Subversion works then. If this fixes the problem, try to re-enable
the other sites until you find the one that breaks Subversion, and
then show us the configuration of that site, and the Subversion
configuration.

(I know you posted your SVN configuration parts already, but to a different
thread. It is better to have all in the same thread.  In the future, if you
do not get an answer to a question, please reply to your own post instead of
starting a new thread. This way, the archives will keep all related
information linked in a single thread. Thanks!)

Re: Problem in connecting the server

Posted by Masaru Kitajima <ta...@gmail.com>.
Stefan,

I double checked all httpd configuration files, but there was
no RedirectMatch for /svn location.

About Project1, I created new repository to check if the project
repository was broken.

I can see both in a browser.
On 2012/06/01, at 19:55, Stefan Sperling wrote:

> On Thu, May 31, 2012 at 10:46:08PM -0700, Masaru Kitajimam wrote:
>> Hi, Stefan
>> I looked /var/log/httpd/access_log and found an error.
>> 
>> XXX.XXX.XXX.XXX - kitajima [30/May/2012:16:14:26 +0900] "GET /svn/
>> project1 HTTP/1.1" 301 249 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X
>> 10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/
>> 534.57.2"
>> 
>> This looks like that /svn/project1 is moved permanently. But, /var/lib/
>> svn/project1 does exist.(In subversion.conf, I define "SVNParentPath /
>> var/lib/svn").
>> 
>> In the error_log, I found the line
>> [Thu May 31 16:51:38 2012] [error] [client XXX.XXX.XXX.XXX] Could not
>> fetch resource information.  [301, #0]
>> [Thu May 31 16:51:38 2012] [error] [client XXX.XXX.XXX.XXX] Requests
>> for a collection must have a trailing slash on the URI.  [301, #0]
>> 
>> I tried again with slash at the end of the svn URI, but it didn't work
>> and showed the same error message.
>> 
>> Can you find any information?
> 
> This looks like a HTTPD configuration problem, or a problem with
> the repository URL you're trying to use.
> 
> Do you have a RedirectMatch anywhere in your config that misroutes
> requests to the /svn location? (In case your configuration is split across
> several files, do not just check the svn.conf file -- the *entire* httpd
> config needs to be considered).
> 
> In your earlier post, http://svn.haxx.se/users/archive-2012-05/0295.shtml,
> you said this:
>  And I created repository as below:
>  # mkdir -p /var/lib/svn/
>  # svnadmin create /var/lib/svn/project
>  # chown -R apache:apache /var/lib/svn/project
> 
> Now you're showing logs that say you're accessing '/svn/project1',
> not '/svn/project'. Are you sure you are using the correct URL?
> Does the URL you use to access the repository work in a web browser?


Re: Problem in connecting the server

Posted by Stefan Sperling <st...@elego.de>.
On Thu, May 31, 2012 at 10:46:08PM -0700, Masaru Kitajimam wrote:
> Hi, Stefan
> I looked /var/log/httpd/access_log and found an error.
> 
> XXX.XXX.XXX.XXX - kitajima [30/May/2012:16:14:26 +0900] "GET /svn/
> project1 HTTP/1.1" 301 249 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X
> 10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/
> 534.57.2"
> 
> This looks like that /svn/project1 is moved permanently. But, /var/lib/
> svn/project1 does exist.(In subversion.conf, I define "SVNParentPath /
> var/lib/svn").
> 
> In the error_log, I found the line
> [Thu May 31 16:51:38 2012] [error] [client XXX.XXX.XXX.XXX] Could not
> fetch resource information.  [301, #0]
> [Thu May 31 16:51:38 2012] [error] [client XXX.XXX.XXX.XXX] Requests
> for a collection must have a trailing slash on the URI.  [301, #0]
> 
> I tried again with slash at the end of the svn URI, but it didn't work
> and showed the same error message.
> 
> Can you find any information?

This looks like a HTTPD configuration problem, or a problem with
the repository URL you're trying to use.

Do you have a RedirectMatch anywhere in your config that misroutes
requests to the /svn location? (In case your configuration is split across
several files, do not just check the svn.conf file -- the *entire* httpd
config needs to be considered).

In your earlier post, http://svn.haxx.se/users/archive-2012-05/0295.shtml,
you said this:
  And I created repository as below:
  # mkdir -p /var/lib/svn/
  # svnadmin create /var/lib/svn/project
  # chown -R apache:apache /var/lib/svn/project

Now you're showing logs that say you're accessing '/svn/project1',
not '/svn/project'. Are you sure you are using the correct URL?
Does the URL you use to access the repository work in a web browser?

Re: Problem in connecting the server

Posted by Masaru Kitajima <ta...@gmail.com>.
Hi, Ryan

The document root is /var/www/html/ .

On 2012/06/01, at 23:28, Ryan Schmidt wrote:

> 
> On Jun 1, 2012, at 00:46, Masaru Kitajimam wrote:
> 
>> Hi, Stefan
>> I looked /var/log/httpd/access_log and found an error.
>> 
>> XXX.XXX.XXX.XXX - kitajima [30/May/2012:16:14:26 +0900] "GET /svn/
>> project1 HTTP/1.1" 301 249 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X
>> 10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/
>> 534.57.2"
>> 
>> This looks like that /svn/project1 is moved permanently. But, /var/lib/
>> svn/project1 does exist.(In subversion.conf, I define "SVNParentPath /
>> var/lib/svn").
> 
> What's your DocumentRoot?
> 
> 


Re: Problem in connecting the server

Posted by Ryan Schmidt <su...@ryandesign.com>.
On Jun 1, 2012, at 00:46, Masaru Kitajimam wrote:

> Hi, Stefan
> I looked /var/log/httpd/access_log and found an error.
> 
> XXX.XXX.XXX.XXX - kitajima [30/May/2012:16:14:26 +0900] "GET /svn/
> project1 HTTP/1.1" 301 249 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X
> 10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/
> 534.57.2"
> 
> This looks like that /svn/project1 is moved permanently. But, /var/lib/
> svn/project1 does exist.(In subversion.conf, I define "SVNParentPath /
> var/lib/svn").

What's your DocumentRoot?



Re: Problem in connecting the server

Posted by Masaru Kitajimam <ta...@gmail.com>.
Hi, Stefan
I looked /var/log/httpd/access_log and found an error.

XXX.XXX.XXX.XXX - kitajima [30/May/2012:16:14:26 +0900] "GET /svn/
project1 HTTP/1.1" 301 249 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X
10_7_4) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/
534.57.2"

This looks like that /svn/project1 is moved permanently. But, /var/lib/
svn/project1 does exist.(In subversion.conf, I define "SVNParentPath /
var/lib/svn").

In the error_log, I found the line
[Thu May 31 16:51:38 2012] [error] [client XXX.XXX.XXX.XXX] Could not
fetch resource information.  [301, #0]
[Thu May 31 16:51:38 2012] [error] [client XXX.XXX.XXX.XXX] Requests
for a collection must have a trailing slash on the URI.  [301, #0]

I tried again with slash at the end of the svn URI, but it didn't work
and showed the same error message.

Can you find any information?

On 5月31ζ—₯, 午後6:12, Stefan Sperling <s....@elego.de> wrote:
> On Thu, May 31, 2012 at 12:46:09PM +0900, Masaru Kitajima wrote:
> > Hi, all!
>
> > I do need your help.
>
> > I'm running CentOS 5.8 and Subversion 1.6.11 on a VPS.
>
> > When I try to connect to the repository from my client Versions.app for Mac,
> > an error message is shown.
> > "Couldnotreadstatusline: Connection reset by peer"
>
> It is clear that the connection between client and server was
> terminated. But the message provides no information about why
> this happened, unfortunately.
>
> Can you please look at the server-side logs?
> There should be access_log and error_log files on the server, possibly
> in /var/log/httpd (I don't remember exactly which path is used on CentOS).
> Maybe those files contain some related information?
>
>
>
>
>
>
>
> > I use http to connect to the repository,nothttps as I haven't configured SSL
> > connection on my server.
>
> > I installed Subversion using yum. And am confusing that two packages were
> > installed.
>
> > Package subversion-1.6.11-10.el5_8.x86_64
> > Package subversion-1.6.11-10.el5_8.i386
>
> > I don't know why two packages were installed.
>
> > Anyway, please help me to solve thestatuslineissue.
>
> > Thanks in advance for your help
>
> > Kindest regards,
> > Masaru

Re: Problem in connecting the server

Posted by Stefan Sperling <st...@elego.de>.
On Thu, May 31, 2012 at 12:46:09PM +0900, Masaru Kitajima wrote:
> Hi, all!
> 
> I do need your help.
> 
> I'm running CentOS 5.8 and Subversion 1.6.11 on a VPS.
> 
> When I try to connect to the repository from my client Versions.app for Mac,
> an error message is shown.
> "Could not read status line: Connection reset by peer"

It is clear that the connection between client and server was
terminated. But the message provides no information about why
this happened, unfortunately.

Can you please look at the server-side logs?
There should be access_log and error_log files on the server, possibly
in /var/log/httpd (I don't remember exactly which path is used on CentOS).
Maybe those files contain some related information?

> I use http to connect to the repository, not https as I haven't configured SSL
> connection on my server.
> 
> I installed Subversion using yum. And am confusing that two packages were
> installed.
> 
> Package subversion-1.6.11-10.el5_8.x86_64
> Package subversion-1.6.11-10.el5_8.i386
> 
> I don't know why two packages were installed.
> 
> Anyway, please help me to solve the status line issue.
> 
> Thanks in advance for your help
> 
> Kindest regards,
> Masaru