Solved

cvs (pserver) problem

Posted on 2002-06-27
26
739 Views
Last Modified: 2013-12-15
Mandrake 8.1
cvs 1.11.2

hi,
I'm facing a problem with the cvs pserver. after renaming the pc, I'm unable to connect to my cvs server:

>cvs -d :pserver:abc@servername:/data/CVS/bla login
(Logging in to abc@servername )
CVS password:
cvs [login aborted]: connect to servername:2401 failed: Connection refused

testing the connection to pserver with "telnet servername 2401" gives:
unable to connect to remote host: Connection refused

the /etc/services file has the correct entries:
cvspserver    2401/tcp  cvspserver
cvspserver    2401/udp  cvspserver

now I read, that the next (test-)step is to check whether inetd is working correct, with the enty:

2401  stream  tcp  nowait  root /bin/echo echo hello
 
in inetd.conf ...
UNFORTUNATELY my mandrake distribution does not has a inetd.conf
I only have a xinet.d/cvs which looks like:

service cvspserver
{
    disable = no
    sockettype = stream
    protocol = tcp
    wait = no
    user = root
    server = /usr/sbin/cvspserver
}

do I have to modify the xinet.d/cvs to force the echo test?
how to modify the xinet.d/cvs ?
are there other ways to test the pserver?


regards nil_dib





0
Comment
Question by:nil_dib
  • 11
  • 6
  • 6
  • +3
26 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7113406
there is eihter some kind of firewall inbetween your PC and the server, or the server uses a TCP-wrapper.
For the latter, check the server's /etc/hosts.{allow,deny} files.
0
 
LVL 4

Author Comment

by:nil_dib
ID: 7113598
there are no entries in hosts.{allow,deny}
I can't connect even if I try

cvs -d :pserver:abc@servername:/data/CVS/bla login

on the cvsserver pc!
0
 
LVL 40

Expert Comment

by:jlevie
ID: 7114638
I believe that the reason for the connect failure is that you haven't set up the server correctly for remote password operation. The server needs to know where the CVSROOT is located and I don't think you are inoking the correct executable.

Assuming that your copy of the cvs executable is in /usr/bin and that your CVS repository is in /data/CVS, the xinetd config should look like:

service cvspserver
{
   port        = 2401
   socket_type = stream
   protocol    = tcp
   wait        = no
   user        = root
   passenv     = PATH
   server      = /usr/local/bin/cvs
   server_args = -f --allow-root=/data/CVS pserver
}

Note that you'll have to create the user records in /data/CVS/CVSROOT/passwd * /data/CVS/CVSROOT/writers. All of this (and more) is covered in 2.9.3.1 of the CVS documentation (see http://www.cvshome.org/docs/manual/cvs.html)
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7115883
good point jlevie, did see the missing server_args ...
0
 
LVL 4

Author Comment

by:nil_dib
ID: 7121437
hi,

my xinetd config, now looks like you suggested:

service cvspserver
{
  port        = 2401
  disable     = no
  socket_type = stream
  protocol    = tcp
  wait        = no
  user        = root
  passenv     = PATH
  server      = /usr/sbin/cvspserver
  server_args = -f --allow-root=/data/CVS pserver
}

where /usr/sbin/cvspserver is a script which looks like:

#!/bin/sh
#---------------------------------------------------------------
# Project         : Mandrake
# Module          : cvs
# File            : cvspserver
# Version         : $Id$
# Author          : Frederic Lepied
# Created On      : Tue Mar 28 07:49:39 2000
# Purpose       : Launch cvs pserver with the right options
# according to /etc/cvs/cvs.conf.
#---------------------------------------------------------------

set -e

unset HOME || :

CONF=/etc/cvs/cvs.conf

if [ ! -r $CONF ]; then
    echo "No $CONF found" 1>&2
    exit 1
fi

. $CONF

args=""
for d in $CVS_REPOS; do
    if [ -d $d/CVSROOT ]; then
     args="$args --allow-root=$d"
    fi
done

if [ -n "$args" ]; then
    exec /usr/bin/cvs -f $args pserver
else
    echo "no repository configured in $CONF" 1>&2
    exit 2
fi
# cvspserver ends here


The /etc/cvs/cvs.conf:
CVS_REPOS="/data/CVS/repos1 /data/CVS/repos2"


anyhow:
1. the mandrake control center says: cvs service - not started / unrecognized service

2. 'telnet $HOSTNAME 2401' gives:
trying 192.168.11.34 ...
telnet: unable to connect to remote host: Connection refused

any other suggestions?
thanks!
nil_dib

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7121445
1. needs to be fixed first
   did you restart xinetd after making changes?
2. is a followup of 1.

0
 
LVL 4

Author Comment

by:nil_dib
ID: 7121523
>.. did you restart xinetd after making changes?
yes, several times.
0
 
LVL 4

Author Comment

by:nil_dib
ID: 7121578
>.. did you restart xinetd after making changes?
yes, several times.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 7121702
I don't think you can have the target of an inetd/xinetd process be a script because of the way inetd/xinetd works. My recollection is that the inbound request is received by xinetd, and if it has a registered service for that port it will invoke the service and pass it the open socket pair. A script wouldn' know what to do with the socket pair and it wouldn't know to pass them to the cvs executable. To get this to work I believe you'll have to invoke the cvs executable directly from xinetd.

It looks to me like the script that you are trying to use is intended to be used to run the cvs server in standalone mode (not under the control of xinetd).
0
 
LVL 4

Author Comment

by:nil_dib
ID: 7121818
ok, I changed the line
server      = /usr/sbin/cvspserver
to
server      = /usr/bin/cvs
where my cvs (client/server) is located.
unfortunately nothing changed :-(

1. mandrake control center says: cvs service - not started / unrecognized service

2. ps -ef does NOT show any 'cvs' process

3. ps -ef DOES show a 'cvs' process when directly calling the /usr/sbin/cvspserver script from a xterm

thanks for your help!
any other suggestions ... Im really struggling with this **** thing ...?
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7121876
silly question: do you have
   includedir /etc/xinetd.d
in /etc/xinetd.conf ?

1. please check /var/log/messages after restarting xinetd, there should be more hints
2. that's exactly what you should get
   you only see the processes when a connection is established, that's the purpose of (x)inetd
   
0
 
LVL 40

Expert Comment

by:jlevie
ID: 7121982
After you changed the xinetd configuration did you also reboot or tell xinetd to re-read its configuration? If not do a 'killall -HUP xinetd' and check /var/log/messages to see if xinetd complained about anything (e.g. 'tail /var/log/messages').

Also note that you won't see a cvs process except when a client has an open CVS session. The whole purpose of having xinetd manage a service is to not have to run a daemon all the time. When properly configured, a cvs process will be started for each client session and those processes will go away when the client disconnects.
0
 
LVL 4

Author Comment

by:nil_dib
ID: 7122030
>silly question
no, I'm really not a linux expert and I belive more and more that I'm missing a fundumental "entry" somewhere.

>do you have includedir /etc/xinetd.d in /etc/xinetd.conf ?
I searched /etc/xinetd.conf for 'xinet', but found nothing!

>please check /var/log/messages
the last change on 'messages.1' was at the 26.6.2002! The date I changed the computer name! Since then I did not found any entries (file 'messages' with date 30.6.2002, has size 0kB!)




0
Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

 
LVL 4

Author Comment

by:nil_dib
ID: 7122044
>... did you also reboot ...?
yes, I always reboot - I m a M$ kid ;-)
0
 
LVL 40

Expert Comment

by:jlevie
ID: 7122740
How about posting the contents of /etc/xinetd.conf so we can tell exactly what we are dealing with. Also it would be good to see the output from 'chkconfig --list xinetd'.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7122823
.. I'm still waiting for the messages from /var/log/messages ...
0
 
LVL 4

Author Comment

by:nil_dib
ID: 7124013
1. /var/log/messages is 0 kB

2. chkconfig --list xinetd
xinetd          0:On 1:Off 2:Off 3:On 4:On 5:On 6:Off

3. /etc/xinetd.conf (the file ends with a '{' ????)

ine_expand "movhi"
  [(set (match_operand:HI 0 "general_operand" "")
      (match_operand:HI 1 "general_operand" ""))]
  ""
  "
{
  /* One of the ops has to be in a register */
  if (!register_operand (operand1, HImode)
      && !register_operand (operand0, HImode))
    operands[1] = copy_to_mode_reg (HImode, operand1);
}")

(define_insn ""
  [(set (match_operand:HI 0 "general_operand"
"=dx,*a,dx,*a,dx,*a,dx,*a,dx,m")
      (match_operand:HI 1 "general_operand" "0,0,I,I,a,dx,dxi,ia,m,dx"))]
  "register_operand (operands[0], HImode)
   || register_operand (operands[1], HImode)"
  "*
{
  switch (which_alternative)
    {
    case 0:
    case 1:
      return \"nop\";
    case 2:
      return \"clr %0\";
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
      if (GET_CODE (operands[1]) == CONST_DOUBLE)
      {
        rtx xoperands[2];
        xoperands[0] = operands[0];
        xoperands[1] = GEN_INT (CONST_DOUBLE_LOW (operands[1]));
        output_asm_insn (\"mov %1,%0\", xoperands);
        return \"\";
      }
      return \"mov %1,%0\";
    case 8:
    case 9:
      return \"movhu %1,%0\";
    }
}"
  [(set_attr "cc"

"none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])

;; movsi and helpers

;; We use this to handle addition of two values when one operand is the
;; stack pointer and the other is a memory reference of some kind.  Reload
;; does not handle them correctly without this expander.
(define_expand "reload_insi"
  [(set (match_operand:SI 0 "register_operand" "=a")
      (match_operand:SI 1 "impossible_plus_operand" ""))
   (clobber (match_operand:SI 2 "register_operand" "=&r"))]
  ""
  "
{
  if (XEXP (operands[1], 0) == stack_pointer_rtx)
    {
      if (GET_CODE (XEXP (operands[1], 1)) == SUBREG
        && (GET_MODE_SIZE (GET_MODE (XEXP (operands[1], 1)))
            > GET_MODE_SIZE (GET_MODE (SUBREG_REG (XEXP
(operands[1], 1))))))
      emit_move_insn (operands[2],
                  gen_rtx (ZERO_EXTEND, GET_MODE (XEXP
(operands[1], 1)),
                         SUBREG_REG (XEXP (operands[1], 1))));
      else
      emit_move_insn (operands[2], XEXP (operands[1], 1));
      emit_move_insn (operands[0], XEXP (operands[1], 0));
    }
  else
    {
      if (GET_CODE (XEXP (operands[1], 0)) == SUBREG
        && (GET_MODE_SIZE (GET_MODE (XEXP (operands[1], 0)))
            > GET_MODE_SIZE (GET_MODE (SUBREG_REG (XEXP
(operands[1], 0))))))
      emit_move_insn (operands[2],
                  gen_rtx (ZERO_EXTEND, GET_MODE (XEXP
(operands[1], 0)),
                         SUBREG_REG (XEXP (operands[1], 0))));
      else
      emit_move_insn (operands[2], XEXP (operands[1], 0));
      emit_move_insn (operands[0], XEXP (operands[1], 1));
    }
  emit_insn (gen_addsi3 (operands[0], operands[0], operands[2]));
  DONE;
}")

(define_expand "movsi"
  [(set (match_operand:SI 0 "general_operand" "")
      (match_operand:SI 1 "general_operand" ""))]
  ""
  "
{
  /* One of the ops has to be in a register */
  if (!register_operand (operand1, SImode)
      && !register_operand (operand0, SImode))
    operands[1] = copy_to_mode_reg (SImode, operand1);
}")

(define_insn ""
  [(set (match_operand:SI 0 "general_operand"
                        
"=dx,ax,dx,a,dxm,dxm,axm,axm,dx,dx,ax,ax,axR,y")
      (match_operand:SI 1 "general_operand"
                        
"0,0,I,I,dx,ax,dx,ax,dixm,aixm,dixm,aixm,xy,axR"))]
  "register_operand (operands[0], SImode)
   || register_operand (operands[1], SImode)"
  "*
{
  switch (which_alternative)
    {
    case 0:
    case 1:
      return \"nop\";
    case 2:
      return \"clr %0\";
    case 3:
    case 4:
    case 5:
    case 6:
    case 7:
    case 8:
    case 9:
    case 10:
    case 11:
    case 12:
    case 13:
      if (GET_CODE (operands[1]) == CONST_DOUBLE)
      {
        rtx xoperands[2];
        xoperands[0] = operands[0];
        xoperands[1] = GEN_INT (CONST_DOUBLE_LOW (operands[1]));
        output_asm_insn (\"mov %1,%0\", xoperands);
        return \"\";
      }
      return \"mov %1,%0\";
    }
}"
  [(set_attr "cc"

"none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")])

(define_expand "movsf"
  [(set (match_operand:SF 0 "general_operand" "")
      (match_operand:SF 1 "general_operand" ""))]
  ""
  "
{

0
 
LVL 40

Expert Comment

by:jlevie
ID: 7124561
I don't know what the file is that you show as being the contents of xinetd.con, but it certainly isn't anythink like what should be in xinetd.conf. One from a RedHat system would look like:

#
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/

defaults
{
        instances               = 60
        log_type                = SYSLOG authpriv
        log_on_success          = HOST PID
        log_on_failure          = HOST
        cps                     = 25 30
}

includedir /etc/xinetd.d

And the one on a Mandrake system should be similar. I'd hazard a guess that something is corrupt. It could be because someone copied a file to the wrong target, or it might be the symptom of a filesystem or disk problem.

I'd suggest forcing a file system check ('touch /forcefsck' and reboot) and then removing and reinstalling the xinetd package.
0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 7125437
wasn't shure about Mandrake, so I didn't say (but assumed) what jlevie said
0
 
LVL 20

Expert Comment

by:Gns
ID: 7129608
CC jim, the contents of /etx/xinetd.conf on a Mandrake 8.1 should look exactly the same as for RedHat... Hey, it's the same package (more or less).

Concur on all other points too.

What I wonder is how the "namechange" was done.

-- Glenn
0
 
LVL 4

Author Comment

by:nil_dib
ID: 7131187
yep, the content of /etx/xinetd.conf was completely bullshit ...
I reinstalled xinetd and it looks now like you supposed.
I believe this was the problem (don't know who rewrote my xinetd).  
unfortunately after reinstalling I could not get any tcp/ip connection. the worse is yet to come: my xserver crashed, so I currently have only the mouse cursor (no icons on desktop, no start menue ...)

will be back when the xserver and the tcp/ip connection problem is fixed.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 7132130
The plot thinkens... Your X server hasn't crashed, but rather the desktop configuration has gotten stuffed. That and the other faults could be a symptom of a bad disk or a corrupt file system. It would be a good thing to force a full file system check (touch /forcefsck) and reboot.

The dektop problem, assuming the filesystem check succeeds can be fixed by removing all of the desktop related files and dirs from your home dir. The next time you log in they'll be recreated.

The tcp/ip connectivity problem is likely to be from the stock xinetd config files being installed. Check those and reenable the services you need.
0
 
LVL 4

Author Comment

by:nil_dib
ID: 7132224
ok, will check that on thursday, next week ...
hope you guys can get your points then :-)
thanks!
0
 

Expert Comment

by:maxjr
ID: 7147937
One other possability sound like your networking config is not set up quite right. How did or what did you do to change the name of the host?

also what does the command 'hostname' report back? is it the same as what you changed it to?  

also run a ping on the hostname you have changed it to. does it find the host?

You might want to run a check to see if you have .cvspass file  in the remote system that may not have the correct config for the new server name.
0
 
LVL 4

Author Comment

by:nil_dib
ID: 7179851
thx for you help.
anyhow Im at the point to do something like >format c  .... :-(

I would like to share the points between jlevie and ahoffmann (look in the Linux Administration topic).

regards
nil_dib
0
 
LVL 5

Accepted Solution

by:
Netminder earned 0 total points
ID: 7181637
Points refunded and question closed.

Netminder
CS Moderator
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

rdate is a Linux command and the network time protocol for immediate date and time setup from another machine. The clocks are synchronized by entering rdate with the -s switch (command without switch just checks the time but does not set anything). …
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now