1<div id="Connection"></div>
2<div class="header">
3<p>
4Next: [[cvs: Other common problems#Other common problems|Other problems]], Previous: [[cvs: Partial list of error messages#Partial list of error messages|Error messages]], Up: [[cvs: Troubleshooting#Troubleshooting|Troubleshooting]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
5</div>
6
7----
8
9<div id="Trouble-making-a-connection-to-a-CVS-server"></div>
10=== Trouble making a connection to a CVS server ===
11
12This section concerns what to do if you are having
13trouble making a connection to a <small>CVS</small> server.  If
14you are running the <small>CVS</small> command line client
15running on Windows, first upgrade the client to
16<small>CVS</small> 1.9.12 or later.  The error reporting in
17earlier versions provided much less information about
18what the problem was.  If the client is non-Windows,
19<small>CVS</small> 1.9 should be fine.
20
21If the error messages are not sufficient to track down
22the problem, the next steps depend largely on which
23access method you are using.
24
25<div id="index-_003aext_003a_002c-troubleshooting"></div>
26;<code>:ext:</code>
27: Try running the rsh program from the command line.  For example: &quot;rsh servername cvs -v&quot; should print <small>CVS</small> version information.  If this doesn&rsquo;t work, you need to fix it before you can worry about <small>CVS</small> problems.
28
29<div id="index-_003aserver_003a_002c-troubleshooting"></div>
30;<code>:server:</code>
31: You don&rsquo;t need a command line rsh program to use this access method, but if you have an rsh program around, it may be useful as a debugging tool.  Follow the directions given for<nowiki> :</nowiki>ext:.
32
33<div id="index-_003apserver_003a_002c-troubleshooting"></div>
34;<code>:pserver:</code>
35: Errors along the lines of &quot;connection refused&quot; typically indicate that inetd isn&rsquo;t even listening for connections on port 2401 whereas errors like &quot;connection reset by peer&quot;, &quot;received broken pipe signal&quot;, &quot;recv() from server: EOF&quot;, or &quot;end of file from server&quot; typically indicate that inetd is listening for connections but is unable to start <small>CVS</small> (this is frequently caused by having an incorrect path in &lsquo;<tt>inetd.conf</tt>&rsquo; or by firewall software rejecting the connection). &quot;unrecognized auth response&quot; errors are caused by a bad command line in &lsquo;<tt>inetd.conf</tt>&rsquo;, typically an invalid option or forgetting to put the &lsquo;<code>pserver</code>&rsquo; command at the end of the line. Another less common problem is invisible control characters that your editor &quot;helpfully&quot; added without you noticing.
36
37: One good debugging tool is to &quot;telnet servername 2401&quot;.  After connecting, send any text (for example &quot;foo&quot; followed by return).  If <small>CVS</small> is working correctly, it will respond with
38
39<div class="example" style="margin-left: 3.2em">
40 cvs <nowiki>[</nowiki>pserver aborted<nowiki>]</nowiki>: bad auth protocol start: foo
41</div>
42
43: If instead you get:
44
45<div class="example" style="margin-left: 3.2em">
46 Usage: cvs <nowiki>[</nowiki>cvs-options<nowiki>]</nowiki> command <nowiki>[</nowiki>command-options-and-arguments<nowiki>]</nowiki>
47 ...
48</div>
49
50: then you&rsquo;re missing the &lsquo;<code>pserver</code>&rsquo; command at the end of the line in &lsquo;<tt>inetd.conf</tt>&rsquo;; check to make sure that the entire command is on one line and that it&rsquo;s complete.
51
52: Likewise, if you get something like:
53
54<div class="example" style="margin-left: 3.2em">
55 Unknown command: `pserved'
56
57 CVS commands are:
58         add          Add a new file/directory to the repository
59 ...
60</div>
61
62: then you&rsquo;ve misspelled &lsquo;<code>pserver</code>&rsquo; in some way.  If it isn&rsquo;t obvious, check for invisible control characters (particularly carriage returns) in &lsquo;<tt>inetd.conf</tt>&rsquo;.
63
64: If it fails to work at all, then make sure inetd is working right.  Change the invocation in &lsquo;<tt>inetd.conf</tt>&rsquo; to run the echo program instead of cvs.  For example:
65
66<div class="example" style="margin-left: 3.2em">
67 2401  stream  tcp  nowait  root /bin/echo echo hello
68</div>
69
70: After making that change and instructing inetd to re-read its configuration file, &quot;telnet servername 2401&quot; should show you the text hello and then the server should close the connection.  If this doesn&rsquo;t work, you need to fix it before you can worry about <small>CVS</small> problems.
71
72: On AIX systems, the system will often have its own program trying to use port 2401.  This is AIX&rsquo;s problem in the sense that port 2401 is registered for use with <small>CVS</small>.  I hear that there is an AIX patch available to address this problem.
73
74: Another good debugging tool is the &lsquo;<code>-d</code>&rsquo; (debugging) option to inetd.  Consult your system documentation for more information.
75
76: If you seem to be connecting but get errors like:
77
78<div class="example" style="margin-left: 3.2em">
79 cvs server: cannot open /root/.cvsignore: Permission denied
80 cvs <nowiki>[</nowiki>server aborted<nowiki>]</nowiki>: can't chdir(/root): Permission denied
81</div>
82
83: then you probably haven&rsquo;t specified &lsquo;<code>-f</code>&rsquo; in &lsquo;<tt>inetd.conf</tt>&rsquo;. (In releases prior to <small>CVS</small> 1.11.1, this problem can be caused by your system setting the <code>$HOME</code> environment variable for programs being run by inetd.  In this case, you can either have inetd run a shell script that unsets <code>$HOME</code> and then runs <small>CVS</small>, or you can use <code>env</code> to run <small>CVS</small> with a pristine environment.)
84
85: If you can connect successfully for a while but then can&rsquo;t, you&rsquo;ve probably hit inetd&rsquo;s rate limit. (If inetd receives too many requests for the same service in a short period of time, it assumes that something is wrong and temporarily disables the service.) Check your inetd documentation to find out how to adjust the rate limit (some versions of inetd have a single rate limit, others allow you to set the limit for each service separately.)
86
87
88----
89
90<div class="header">
91<p>
92Next: [[cvs: Other common problems#Other common problems|Other problems]], Previous: [[cvs: Partial list of error messages#Partial list of error messages|Error messages]], Up: [[cvs: Troubleshooting#Troubleshooting|Troubleshooting]] &nbsp; |[[cvs: Index#SEC_Contents|Contents]]||[[cvs: Index#Index|Index]]|</p>
93</div>
94This document was generated on <i>a sunny day</i> using [http://www.nongnu.org/texi2html/ <i>texi2html</i>].
95