You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Vincent Ducret <Vi...@Sun.COM> on 2005/01/05 14:37:52 UTC

SSH+SVN - svn: Connection closed unexpectedly

Hi all,
We are currently installing SubVersion on a Solaris 9-SPARC server (I 
got the most recent binary from www.sunfreeware.com, it's in fact 
SubVersion 1.0.5).

 From a Solaris Client machine, I can successfully access and use a SVN 
repository through Apache (without SSL) and through the svnserve process 
(without SSH). Unfortunately, it's not the case through svnserver + SSH.

Each svn command started from the Solaris client, e.g.
svn list svn+ssh://192.168.3.33/repo/projectXXX,
  got the following message:
"svn: Connection closed unexpectedly"
after the SSH authentication step

Here is the contents of /var/adm/messages on Solaris server:
  Jan  5 15:24:30 xxxxx sshd[6976]: [ID 800047 auth.info] Accepted 
password for user_id from 192.168.3.26 port 50494 ssh2

I didn't find any error log from svnserver process. Do you know where I 
can find these logs (if they exist) ??

On the Solaris Server, svnserve process is started through inetd (I 
tried to start it without inetd, but same error on the client-side).

Inetd.conf Excerpt:
# Subversion
svn stream tcp nowait projadm /usr/local/bin/svnserve svnserve -i -t -r 
/opt/svn/repositories

Note that I can successfully open an SSH tunnel between my client and 
server machines through ssh userid@server_machine

Am I missing some additional SSH configuration (to support SVN) ??

Any help would be really appreciate
Thanks

Vincent

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

Re: SSH+SVN - svn: Connection closed unexpectedly

Posted by Uffe Friis Lichtenberg <uf...@gmail.com>.
On Wed, 05 Jan 2005 15:37:52 +0100, Vincent Ducret
<Vi...@sun.com> wrote:
> Each svn command started from the Solaris client, e.g.
> svn list svn+ssh://192.168.3.33/repo/projectXXX,
>  got the following message:
> "svn: Connection closed unexpectedly"
> after the SSH authentication step

I've had similar symptoms several times, when setting up svn+ssh for
use with TortoiseSVN, so my solution may be applicable here :)

Basically SSH can be invoked two ways:

1) ssh user@host

   Which simply connects and starts an interactive shell. This of
course ensures you get all your environment variables as per expected
and thus probably have svn and (importantly) svnserve in your path.

2) ssh user@host command

   Which connects and runs the given command. This is the way that
Subversion connects (where the command is 'svnserve'). This way,
however, does not start an interactive shell, and may therefore have
less than the full environement; specifically the path may not include
svn and svnserve.

You need to test the command

   ssh 192.168.3.33 svnserve

Does is terminate with 

A) an error message from svnserve (something along the lines of "You
must specify one of -d, -i, -t or -X. Type 'svnserve --help' for
usage.") or with

B) an error message from ssh (something along the lines of "svnserve:
Command not found").

If (A) then your problem isn't the path and I can't help you. If (B)
then your problem probably is the path and you need to make sure that
the path to svnserve is present for such logins. (How you do that, on
a Solaris box, I do not know, unfortunately...)

Hope this helps.

- Uffe

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

Re: SSH+SVN - svn: Connection closed unexpectedly

Posted by Steve Greenland <st...@lsli.com>.
On Wed, Jan 05, 2005 at 05:18:28PM +0100, Vincent Ducret wrote:
> Hi Steve,
> Thanks for the information.
> Therefore, how do I start the svnserve process on the server-side to 
> support SVN+SSH access ?

You don't. SVN does it for you. Read

http://svnbook.red-bean.com/en/1.1/ch06s03.html#svn-ch-6-sect-3.4

Steve

-- 
"Outlook not so good." That magic 8-ball knows everything! I'll ask
about Exchange Server next.
                           -- (Stolen from the net)

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

Re: SSH+SVN - svn: Connection closed unexpectedly

Posted by Vincent Ducret <Vi...@Sun.COM>.
Hi Steve,
Thanks for the information.
Therefore, how do I start the svnserve process on the server-side to 
support SVN+SSH access ?
I understand that in a case where SSH is not used, the svnserve 
processes may be started through inetd thanks to a right configuration 
of inetd.conf file
Thanks for your help
Cheers,
Vincent

Steve Greenland wrote:
> On Wed, Jan 05, 2005 at 03:37:52PM +0100, Vincent Ducret wrote:
> 
>>On the Solaris Server, svnserve process is started through inetd (I 
>>tried to start it without inetd, but same error on the client-side).
> 
> 
> When you use ssh+svn URLs, you do NOT use inetd -- svnserve is
> started by each individual ssh process. This means that your settings
> inetd.conf, particularly the '-r' coption, are not used.
> 
> Steve
> 

-- 
Vincent Ducret
Software Architect, Sun CS - Enterprise Web Services Practice

Sun Microsystems (Switzerland) Inc.  Phone:  +41 22 999 04 04
Route des Avouillons 12              Fax:    +41 22 999 04 05
CH-1196 Gland                        E-mail: vincent.ducret@sun.com

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

Re: SSH+SVN - svn: Connection closed unexpectedly

Posted by Ben Collins-Sussman <su...@collab.net>.
On Jan 5, 2005, at 5:49 PM, Mark Parker wrote:

> Steve Greenland wrote:
>> On Wed, Jan 05, 2005 at 03:37:52PM +0100, Vincent Ducret wrote:
>>> On the Solaris Server, svnserve process is started through inetd (I 
>>> tried to start it without inetd, but same error on the client-side).
>> When you use ssh+svn URLs, you do NOT use inetd -- svnserve is
>> started by each individual ssh process. This means that your settings
>> inetd.conf, particularly the '-r' coption, are not used.
>> Steve
>
> Which all makes me wonder... wouldn't svn+ssh be more accurately named 
> ssh+file (ok so technically it would be ssh+svn but conceptually and 
> effectively it's basically file:// over ssh)?
>

Because usually the 'schema' portion of the URL indicates the protocol:

     http://
     svn://

And in this case, it's still the 'svn' protocol being spoken over an 
ssh tunnel.  (The only thing that svn+ssh:// and file:// have in common 
is that they both open the repostiory database directly as the user 
which owns the process.)


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

Re: SSH+SVN - svn: Connection closed unexpectedly

Posted by Mark Parker <ma...@msdhub.com>.
Steve Greenland wrote:
> On Wed, Jan 05, 2005 at 03:37:52PM +0100, Vincent Ducret wrote:
> 
>>On the Solaris Server, svnserve process is started through inetd (I 
>>tried to start it without inetd, but same error on the client-side).
> 
> 
> When you use ssh+svn URLs, you do NOT use inetd -- svnserve is
> started by each individual ssh process. This means that your settings
> inetd.conf, particularly the '-r' coption, are not used.
> 
> Steve
> 

Which all makes me wonder... wouldn't svn+ssh be more accurately named 
ssh+file (ok so technically it would be ssh+svn but conceptually and 
effectively it's basically file:// over ssh)?

Mark


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

Re: SSH+SVN - svn: Connection closed unexpectedly

Posted by Steve Greenland <st...@lsli.com>.
On Wed, Jan 05, 2005 at 03:37:52PM +0100, Vincent Ducret wrote:
> On the Solaris Server, svnserve process is started through inetd (I 
> tried to start it without inetd, but same error on the client-side).

When you use ssh+svn URLs, you do NOT use inetd -- svnserve is
started by each individual ssh process. This means that your settings
inetd.conf, particularly the '-r' coption, are not used.

Steve

-- 
"Outlook not so good." That magic 8-ball knows everything! I'll ask
about Exchange Server next.
                           -- (Stolen from the net)

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