# CVSD help

## iVai

hi all.  I'm attempting to setup a cvs server using cvsd, and I've been following this post: https://forums.gentoo.org/viewtopic.php?p=712793#712793

I have been unable to login.

```

ivai@ivai ~ $ cvs -d :pserver:cvs@localhost:/rep login

Logging in to :pserver:cvs@localhost:2401/rep

CVS password: 

cvs [login aborted]: reading from server: Connection reset by peer

ivai@ivai ~ $ 

```

and heres my /etc/cvsd/cvsd.conf file:

```

RootJail /var/cvsroot

Uid cvsd

Gid cvsd

Nice 1

Umask 027

Limit coredumpsize 0

PidFile /var/run/cvsd.pid

Listen * 2401

MaxConnections 10

Log /var/log/cvsd.log debug

Repos /rep

```

I've had trouble finding many posts on cvsd...  Any help is greatly appreciated.

Jeff

----------

## hsingh

i'm having the same problem, did you find the solution?

----------

## kottlettstanze

same problem here as well  :Sad:  any solution?

----------

## mattlant

same here, i followed the wiki to the T, i dont use a firewall, no xinetd, nothing, just wanted to use it locally on my network.

----------

## Mine GO BOOM

I too have the same problem as above. Searching shows that most people's problems were fixed via editing iptables (not emerged) or playing with xinetd (not running). I'm not running anything else that I can think of that would prevent outside access, since my Gentoo machine is running on a secured LAN server.

From cvsd.log while using debug recording:

```
cvsd: version 1.0.2 starting

cvsd: debug: binding 0.0.0.0 2401 family=2 socktype=1 protocol=6

cvsd: listening on 0.0.0.0 2401

cvsd: debug: binding :: 2401 family=10 socktype=1 protocol=6

cvsd: debug: socket() failed (ignored): Address family not supported by protocol

cvsd: debug: chroot(/var/lib/cvs) done

cvsd: debug: nice(1) done

cvsd: debug: setgroups(0,NULL) done

cvsd: debug: setgid(409) done

cvsd: debug: setuid(103) done

cvsd: debug: cvs command to execute: '/bin/cvs -f --allow-root=/root pserver'

cvsd: accepting connections

cvsd: connection from 127.0.0.1 53292

cvsd: debug: limit coredumpsize to 0(soft) and 0(hard)

cvsd: debug: fork() succeeded (child pid=24031)

cvsd: debug: select() failed (ignored): Interrupted system call

cvsd: cvs command exited with exit-status 1
```

And the directory structure:

```
/var/lib/cvs:

total 8

drwxrwxr-x  3 cvsd cvsd 4096 Feb  5 19:38 root

drwxrwxr-x  3 cvsd cvsd 4096 Feb  5 19:40 var

/var/lib/cvs/root:

total 4

drwxrwxr-x  3 cvsd cvsd 4096 Feb  5 19:41 CVSROOT

/var/lib/cvs/root/CVSROOT:

total 140

-rw-rw-r--  1 cvsd cvsd  495 Feb  5 19:38 .#checkoutlist

-rw-rw-r--  1 cvsd cvsd  760 Feb  5 19:38 .#commitinfo

-rw-rw-r--  1 cvsd cvsd  991 Feb  5 19:38 .#config

-rw-rw-r--  1 cvsd cvsd  602 Feb  5 19:38 .#cvswrappers

-rw-rw-r--  1 cvsd cvsd 1025 Feb  5 19:38 .#editinfo

-rw-rw-r--  1 cvsd cvsd 1141 Feb  5 19:38 .#loginfo

-rw-rw-r--  1 cvsd cvsd 1151 Feb  5 19:38 .#modules

-rw-rw-r--  1 cvsd cvsd  564 Feb  5 19:38 .#notify

-rw-rw-r--  1 cvsd cvsd  649 Feb  5 19:38 .#rcsinfo

-rw-rw-r--  1 cvsd cvsd  879 Feb  5 19:38 .#taginfo

-rw-rw-r--  1 cvsd cvsd 1026 Feb  5 19:38 .#verifymsg

drwxrwxr-x  2 cvsd cvsd 4096 Feb  5 19:38 Emptydir

-r--r--r--  1 cvsd cvsd  495 Feb  5 19:38 checkoutlist

-r--r--r--  1 cvsd cvsd  694 Feb  5 19:38 checkoutlist,v

-r--r--r--  1 cvsd cvsd  760 Feb  5 19:38 commitinfo

-r--r--r--  1 cvsd cvsd  959 Feb  5 19:38 commitinfo,v

-r--r--r--  1 cvsd cvsd  991 Feb  5 19:38 config

-r--r--r--  1 cvsd cvsd 1190 Feb  5 19:38 config,v

-r--r--r--  1 cvsd cvsd  602 Feb  5 19:38 cvswrappers

-r--r--r--  1 cvsd cvsd  801 Feb  5 19:38 cvswrappers,v

-r--r--r--  1 cvsd cvsd 1025 Feb  5 19:38 editinfo

-r--r--r--  1 cvsd cvsd 1224 Feb  5 19:38 editinfo,v

-rw-rw-rw-  1 cvsd cvsd    0 Feb  5 19:38 history

-r--r--r--  1 cvsd cvsd 1141 Feb  5 19:38 loginfo

-r--r--r--  1 cvsd cvsd 1340 Feb  5 19:38 loginfo,v

-r--r--r--  1 cvsd cvsd 1151 Feb  5 19:38 modules

-r--r--r--  1 cvsd cvsd 1350 Feb  5 19:38 modules,v

-r--r--r--  1 cvsd cvsd  564 Feb  5 19:38 notify

-r--r--r--  1 cvsd cvsd  763 Feb  5 19:38 notify,v

-rw-r--r--  1 cvsd cvsd   52 Feb  5 19:41 passwd

-r--r--r--  1 cvsd cvsd  649 Feb  5 19:38 rcsinfo

-r--r--r--  1 cvsd cvsd  848 Feb  5 19:38 rcsinfo,v

-r--r--r--  1 cvsd cvsd  879 Feb  5 19:38 taginfo

-r--r--r--  1 cvsd cvsd 1078 Feb  5 19:38 taginfo,v

-rw-rw-rw-  1 cvsd cvsd    0 Feb  5 19:38 val-tags

-r--r--r--  1 cvsd cvsd 1026 Feb  5 19:38 verifymsg

-r--r--r--  1 cvsd cvsd 1225 Feb  5 19:38 verifymsg,v

/var/lib/cvs/root/CVSROOT/Emptydir:

total 0

/var/lib/cvs/var:

total 4

drwxrwxr-x  2 cvsd cvsd 4096 Feb  5 19:40 lock

/var/lib/cvs/var/lock:

total 0
```

----------

## theansaname

bump same problem, solution? please add to this tread

----------

## kege

Did anyone above found an answer? I still have this problem.

----------

## thedd

I have the exact same problem.

I have been googling on it quite alot.

everywhere it is brought up there are several people asking the question but no answers.

Anyone got this working please tell us how!

my firewall is not up, i'm not using xinet, the debug (cvsd -d) gives nothing interesting. (no error messages)

I got a feeling there's something wrong with the cvsd-buildroot script.

I get this:

```

ted lib # cvsd-buildroot /var/lib/cvsd/

creating directory structure under /var/lib/cvsd/... done.

installing binaries... cvs.

locating libnsl.so... /lib/libnsl.so.1

locating libnss_compat.so... /lib/libnss_compat.so.2

locating ld-elf.so... not found (probably not fatal)

locating libnss_compat.so.2... /lib/libnss_compat.so.2

locating libnss_files.so.2... /lib/libnss_files.so.2

locating /usr/libexec/ld.so... not found (probably not fatal)

locating /usr/lib/ld.so.1... not found (probably not fatal)

locating nss_files.so.1... not found (probably not fatal)

installing libraries... libnsl.so.1 libnss_compat.so.2 libnss_compat.so.2 libnss_files.so.2 libc.so.6 libcrypt.so.1 libnsl.so.1.

creating /var/lib/cvsd//dev devices... done.

adding users to /var/lib/cvsd//etc/passwd... root nobody cvsd.

WARNING: no passwd file in /var/lib/cvsd/root/CVSROOT

fixing ownership... done.

chrooted system created in /var/lib/cvsd/

if your cvs binary changes (new version) you should rerun cvsd-buildroot

```

I have got a feeling that the following lines are pretty weird:

```

locating /usr/libexec/ld.so... not found (probably not fatal)

locating /usr/lib/ld.so.1... not found (probably not fatal)

```

isn't ld.so really important in order to run stuff in that chrooted environment?

UPDATE:

I found that the problem is that the cvs binary (in the chrooted environment) was not able to start because some really important libraries where missing.

this solved the problem for me:

```

cp /lib/ld-* /path/to/cvsdir/lib/

cp /lib/libdl.so.2 /path/to/cvsdir/lib/

```

So there is something wrong with the cvsd-buildroot script (not copying the libraries).

I have never posted a bug before so I guess that someone should do it, if it's not already done.

I hope you all get your cvsd up and running now!

----------

## .damon

Thank you very much thedd, you solved my problem. I didn't like having to give ssh access to people just for using cvs (I don't know any way to allow ssh in a chroot, maybe it exists..)

On my machine cvsd version is 1.0.2

I went to http://tiefighter.et.tudelft.nl/~arthur/cvsd/ (the homepage of the project, thanks to portage) and it tells me that 1.0.2 release date is 2004-04-17.

There is 1.0.3 in portage that is masked but the latest version is 1.0.6. 

The homepage news say

```

2005-03-05 release 1.0.5

...

work around a problem in some implementations of ldd that produces output which causes cvsd-buildroot to not install a needed library

```

I didn't try to install the newest version yet since the problem is solved for me, but I gess that the bug has been resolved.

Maybe it's time for me to learn how to write .ebuilds  :Smile: 

----------

## ATha1

I had this problem too

cvs login said the Connection wos reset by peer.

But I made the failure in the config file /etc/cvsd/cvsd.conf

in the Tutorial http://gentoo-wiki.com/HOWTO_CVS_Server they took /var/lib/cvs as CVS rootdirectory, and in the config file stands /var/lib/cvsd.

I've also copied the library file to /var/lib/cvs and now the failure is gone.

```

cp /lib/ld-* /var/lib/cvs/lib/

cp /lib/libdl.so.2 /var/lib/cvs/lib/

```

now I have following problem:

```

cvs login

Logging in to :pserver:atha1@localhost:2401/root

CVS password:

cvs login: warning: failed to open /root/.cvspasswd for reading: No such file or directory

```

OK the file doesn't exist, but why want CVS to open this file?

And this warning appeared only the first time.

----------

## KrahnacK

same for me, the trick of copying the libs removed the "Connection reset by peer" error

but then another error occured : 

```

Logging in to :pserver:test@localhost:2401/root

CVS password:

cvs [login aborted]: unrecognized auth response from localhost: cvs: unrecognized option `--allow-root=/root'

```

i do not understand as i followed each step of the http://gentoo-wiki.com/HOWTO_CVS_Server like you all, it seems... and you say it's working for you

i'm pretty noob in gentoo, so is it me, or did i find a bug  :Embarassed:  ?

----------

## bbkr

same error here.

```

ddd@Camel_Emporium ~ $ cvs login

Logging in to :pserver:ddd@localhost:2401/root

CVS password:

cvs [login aborted]: unrecognized auth response from localhost: cvs: unrecognized option `--allow-root=/root'

```

config files and directories location just like in Wiki tutorial: http://gentoo-wiki.com/HOWTO_CVS_Server

already tried:

- use xinetd - same error

- change repository to full path in cvsd config (/var/lib/cvsd/root instead of /root) and switch off jailing

cvs version 1.12.12-r3

----------

## bbkr

RESOLVED:

- build CVS with server flag

- run cvsd-buildroot /my/cvs/dir

- restart cvsd

----------

## JackChan

I am using cvsd 1.0.7 and I also copy the libraries.

But it does not work.

Can someone help me.

here is my message of cvsd-buildroot

creating directory structure under /home/cvsroot/... done.

installing binaries... cvs.

locating libnsl.so... /lib/libnsl.so.1

locating libnss_compat.so... /lib/libnss_compat.so.2

locating /lib/ld-linux.so.2... /lib/ld-linux.so.2

locating /lib64/ld-linux-x86-64.so.2... not found (probably not fatal)

locating ld-elf.so... not found (probably not fatal)

locating libnss_compat.so.2... /lib/libnss_compat.so.2

locating libnss_files.so.2... /lib/libnss_files.so.2

locating /usr/libexec/ld.so... not found (probably not fatal)

locating /usr/lib/ld.so.1... not found (probably not fatal)

locating nss_files.so.1... not found (probably not fatal)

installing libraries... libnsl.so.1 libnss_compat.so.2 ld-linux.so.2 libnss_compat.so.2 libnss_files.so.2 librt.so.1 libcrypt.so.1 libnsl.so.1 libz.so.1 libpam.so.0 libc.so.6 libpthread.so.0 ld-linux.so.2 libdl.so.2.

WARNING: extra (unknown) file found: /home/cvsroot//lib/ld-2.3.2.so

creating /home/cvsroot//dev devices... done.

adding users to /home/cvsroot//etc/passwd....

fixing ownership... done.

chrooted system created in /home/cvsroot/

if your cvs binary changes (new version) you should rerun cvsd-buildroot

Thanks

Jack

----------

## paranonia

 *bbkr wrote:*   

> RESOLVED:
> 
> - build CVS with server flag
> 
> - run cvsd-buildroot /my/cvs/dir
> ...

 

Hi bbkr,

these is no server flag in USE flags?

what did u mean about this flag?

----------

## dylansmrjones

When trying to connect to my cvs-server I get this error:

cvs [login aborted]: connect to localhost(127.0.0.1):2401 failed: Connection refused

I've followed the howto-wiki but it doesn't seem to work for me.

----------

## KrahnacK

if the connection is refused, then your server may not be running

try to run

```
ps ax | grep cvsd

```

if the server is running, you should see a line like this

```
 7192 ?        SNs    0:00 /usr/sbin/cvsd

```

if it's not running try to launch it with just this command

```
/etc/init.d/cvsd start
```

otherwise, you may need to configure your firewall to set the port 2401(or the one you use for cvs)  to open...

paranoia -> don't know if there is or not a server flag in the USE flags, but when i re merged cvs and cvsd with USE="server", it removed the error... (thanks a lot, bbkr  :Very Happy:  )

----------

## sstidman

 *bbkr wrote:*   

> RESOLVED:
> 
> - build CVS with server flag
> 
> - run cvsd-buildroot /my/cvs/dir
> ...

 

Just to clarify what bbkr said, here are the exact commands to run:

```
USE="server" emerge cvs

cvsd-buildroot /var/lib/cvsd

/etc/init.d/cvsd restart
```

If you have already emerged the cvs package, then you need to unmerge it with the following command:

```
emerge unmerge cvs
```

Do that before the other three steps, of course.  I also appended the word "server' to the "USE" variable in the /etc/make.conf file before emerging cvs.  That was redundant and probably not necessary.  Also, the cvs package creates a file called "/etc/xinetd.d/cvspserver".  Since you would typically either want to run as either a standalone server or under inetd but not both, I deleted the "/etc/xinetd.d/cvspserver" file.

----------

## newby

I write second time with this problem, but have null response   :Sad: 

I try install cvsd pserver, server start fine, but when i try import project (with any cvs client) i got following error

```

import phptest

cvs [import aborted]: could not get working directory: Function not implemented

 

Command Aborted.

```

cvsd version 1.0.12 (cvsd 1.0.8 some problem)

cvs version 1.12.12

cvsd-buginfo output

```

cvsd 1.0.12 built with:

 ./configure --prefix=/usr --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --with-libwrap --libdir=/usr/lib64 --build=x86_64-pc-linux-gnu build_alias=x86_64-pc-linux-gnu host_alias=x86_64-pc-linux-gnu CFLAGS=-march=athlon64 -O2 -pipe -fomit-frame-pointer

/etc/cvsd/cvsd.conf:

 RootJail /var/lib/cvsd

 Uid cvsd

 Gid cvsd

 Nice 1

 Umask 027

 Limit coredumpsize 0

 PidFile /var/run/cvsd.pid

 Listen * 2401

 MaxConnections 10

 Log syslog info

 Repos /root

 Repos /test

/var/lib/cvsd:

 drwxr-xr-x root root     328 Jul 26 20:25 .

 -rw-r--r-- root root       0 Jul 26 20:25 .keep_dev-util_cvsd-0

 drwxr-xr-x root root      72 Jul 27  2006 bin

 -rwxr-xr-x root root  644520 Jul 28  2006 bin/cvs

 drwxr-xr-x root root      96 Jul 28  2006 dev

 crwxrwxrwx root root    1, 3 Oct 22  2000 dev/null

 crw-rw-rw- root root    1, 5 Oct 22  2000 dev/zero

 drwxr-xr-x root root      72 Jul 27  2006 etc

 -rw-r--r-- root root     127 Jul 27  2006 etc/passwd

 drwxr-xr-x root root     488 Jul 28  2006 lib

 -rwxr-xr-x root root  134837 Jul 27  2006 lib/ld-2.4.so

 -rwxr-xr-x root root  134837 Jul 28  2006 lib/ld-linux-x86-64.so.2

 -rwxr-xr-x root root  124992 Jul 28  2006 lib/ld-linux.so.2

 -rwxr-xr-x root root 1282128 Jul 28  2006 lib/libc.so.6

 -rwxr-xr-x root root   23216 Jul 28  2006 lib/libcrypt.so.1

 -rwxr-xr-x root root   15464 Jul 28  2006 lib/libdl.so.2

 -rwxr-xr-x root root   83536 Jul 28  2006 lib/libnsl.so.1

 -rwxr-xr-x root root   31976 Jul 28  2006 lib/libnss_compat.so.2

 -rwxr-xr-x root root   44344 Jul 28  2006 lib/libnss_files.so.2

 -rwxr-xr-x root root   34640 Jul 28  2006 lib/libpam.so.0

 -rwxr-xr-x root root  121922 Jul 28  2006 lib/libpthread.so.0

 -rwxr-xr-x root root   38232 Jul 28  2006 lib/librt.so.1

 -rwxr-xr-x root root   81920 Jul 28  2006 lib/libz.so.1

 lrwxrwxrwx cvsd cvsd       3 Jul 27  2006 lib64 -> lib

 drwxrwxr-x cvsd cvsd      72 Jul 27  2006 root

 drwxrwxr-x root root      96 Jul 28  2006 test

 drwxrwxrwt root root      48 Jul 26 20:48 tmp

 drwxr-xr-x root root     144 Jul 27  2006 usr

 lrwxrwxrwx root root       6 Jul 27  2006 usr/bin -> ../bin

 lrwxrwxrwx root root       6 Jul 27  2006 usr/lib -> ../lib

 lrwxrwxrwx root root       6 Jul 27  2006 usr/lib64 -> ../lib

 lrwxrwxrwx root root       6 Jul 27  2006 usr/libexec -> ../lib

 drwxrwxr-x cvsd cvsd      72 Jul 27  2006 var

/usr/bin/cvs:

 -rwxr-xr-x root root 644520 Jul 28  2006 /usr/bin/cvs

/usr/bin/cvs --version:

 Concurrent Versions System (CVS) 1.12.12 (client/server)

/var/lib/cvsd/bin/cvs --version:

 Concurrent Versions System (CVS) 1.12.12 (client/server)

/var/lib/cvsd/etc/passwd: (passwds removed)

 root::0:0::/:/bin/bash

 nobody::65534:65534::/:/bin/false

 cvsd::112:1019::/:/sbin/nologin

/var/lib/cvsd/root/CVSROOT/config:

 UseNewInfoFmtStrings=yes

/var/lib/cvsd/root/CVSROOT/passwd: (passwds removed)

 test::cvsd

 darius::cvsd

/var/lib/cvsd/root/CVSROOT/readers:

 <empty>

/var/lib/cvsd/root/CVSROOT/writers:

 darius

/var/lib/cvsd/test/CVSROOT/config:

 UseNewInfoFmtStrings=yes

/var/lib/cvsd/test/CVSROOT/passwd: (passwds removed)

 darius::cvsd

```

system :

Linux genbox 2.6.15-gentoo #1 Mon Jan 16 20:01:36 GMT 2006 x86_64 AMD Sempron(tm) Processor 3000+ AuthenticAMD GNU/Linux

maybe someone know how fix it ?

----------

## penumbra2000

Disabling the JailRoot seems to be sufficient to make it work properlyish.  This strongly suggests that some library or something isn't in the jail root that the cvs binary needs to be there to make it know all of its commands... now that I think of it, sh is probably a good bet, since it's the current working directory that's lacking implementation.

Anyway, I didn't search to find out what was missing, since I kind of have work to do now, but perhaps I'll look at it in more detail at a later date.  For now, you can get the server working by turning off the JailRoot.

----------

## song706

Hi,

I have a problem with the CVS configure in my ubuntu 6.10 distribution.

I repeat the steps of the link

http://gentoo-wiki.com/HOWTO_CVS_Server

but I have been unable to login.

CVS password:

cvs [login aborted]: reading from server: Connection reset by peer 

Some people said tha the solution is:

cp /lib/ld-* /var/lib/cvsd/lib/

cp /lib/libdl.so.2 /var/lib/cvsd/lib/ 

but the error don't change.

Someone can help me?

Thanks for all

----------

