/usr/share/doc/lprng-doc/LPRng-Reference-Multipart/x10800.htm is in lprng-doc 3.8.A~rc2-3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta name="generator" content=
"HTML Tidy for Linux/x86 (vers 6 November 2007), see www.w3.org">
<title>It was working normally, then I get connection refused
errors</title>
<meta name="GENERATOR" content=
"Modular DocBook HTML Stylesheet Version 1.79">
<link rel="HOME" title=" LPRng Reference Manual" href=
"index.htm">
<link rel="UP" title="The Most Frequently Asked Questions " href=
"faq.htm">
<link rel="PREVIOUS" title="The Most Frequently Asked Questions "
href="faq.htm">
<link rel="NEXT" title=
"Job is not in print queue, but it gets printed!" href=
"x10832.htm">
</head>
<body class="SECT1" bgcolor="#FFFFFF" text="#000000" link="#0000FF"
vlink="#840084" alink="#0000FF">
<div class="NAVHEADER">
<table summary="Header navigation table" width="100%" border=
"0" cellpadding="0" cellspacing="0">
<tr>
<th colspan="3" align="center">LPRng Reference Manual: 24
Sep 2004 (For LPRng-3.8.28)</th>
</tr>
<tr>
<td width="10%" align="left" valign="bottom"><a href=
"faq.htm" accesskey="P">Prev</a></td>
<td width="80%" align="center" valign="bottom">Chapter 20.
The Most Frequently Asked Questions</td>
<td width="10%" align="right" valign="bottom"><a href=
"x10832.htm" accesskey="N">Next</a></td>
</tr>
</table>
<hr align="left" width="100%">
</div>
<div class="SECT1">
<h1 class="SECT1"><a name="AEN10800" id="AEN10800">20.2. It was
working normally, then I get connection refused errors</a></h1>
<p>This message usually appears when you have been sending a
large number of jobs to a network printer or a remote system.
The reason for this is a combination the above port 721-731
restriction and the TCP/IP timeouts. For details, see <a href=
"rfc1179ref.htm">RFC1179 and <b class=
"APPLICATION">LPRng</b></a>, but here is a quick
explanation.</p>
<p>A TCP/IP connection is usually specified as between
<tt class="LITERAL">srchost:srcport, desthost:destport</tt>,
although in practice the order of source (src) and destination
(dest) is not important.</p>
<p>When a connection is established, each end of the connection
exchanges the necessary flow control and error control
information. When a connection is terminated, each end of the
connection will not accept another connection from the same
<tt class="LITERAL">host:port</tt> that was previously active
for a specified timeout period, usually 10 minutes.</p>
<p>Some TCP/IP implementations go further: they will not allow
<acronym class="ACRONYM">ANY</acronym> connection to be
<span class="emphasis"><i class=
"EMPHASIS">originated</i></span> (via the <code class=
"FUNCTION">bind()</code> system call or API) from a port that
was active, or accepted on a port that was active for this
timeout period.</p>
<p>Now let us see what happens when we have a client program,
which must originate a connection on port 721-731, connect to
the server, which waits for a connection on port 515. We first
try to make a connection from host:port <tt class=
"LITERAL">1.1.1.1:721</tt> to <tt class=
"LITERAL">1.1.1.2:515</tt>. The first time that we make the
connection (or the first connection) we succeed. We can
transfer a file, etc., and then close the connection. When we
try to reconnect from <tt class="LITERAL">1.1.1.1:721</tt> to
<tt class="LITERAL">1.1.1.2:515</tt> we get an error such as
"address already in use" or "connection refused".</p>
<p>Luckily, we can use port 722 to originate a connection, and
we can connect from <tt class="LITERAL">1.1.1.1:722</tt> to
<tt class="LITERAL">1.1.1.2:515</tt>. We continue on, until we
come to port 731, and then we need to wait for our
timeouts.</p>
<p>SOLUTION:</p>
<p>It appears that most RFC1179 implementations do not check
for the exact port range 721-731, but only that the connection
originates from a reserved port, i.e. - in the range 1-1023.
You can extend the range of ports used by <b class=
"APPLICATION">LPRng</b> by changing the</p>
<div class="INFORMALEXAMPLE">
<a name="AEN10824" id="AEN10824"></a>
<pre class="SCREEN">
originate_port=721 731
</pre>
</div>value in the defaults (<tt class=
"FILENAME">LPRng/src/common/defaults.c</tt>) file or in the
<tt class="FILENAME">lpd.conf</tt> file. I recommend the
following:
<div class="INFORMALEXAMPLE">
<a name="AEN10828" id="AEN10828"></a>
<pre class="SCREEN">
originate_port=512 1022
</pre>
</div>This is, in fact, now the default in <b class=
"APPLICATION">LPRng</b> software. If you get the infamous
<tt class="LITERAL">malformed from address</tt> error message
from your spooler, then you will have to set originate_port=721
731, and live with a delayed throughput.
</div>
<div class="NAVFOOTER">
<hr align="left" width="100%">
<table summary="Footer navigation table" width="100%" border=
"0" cellpadding="0" cellspacing="0">
<tr>
<td width="33%" align="left" valign="top"><a href="faq.htm"
accesskey="P">Prev</a></td>
<td width="34%" align="center" valign="top"><a href=
"index.htm" accesskey="H">Home</a></td>
<td width="33%" align="right" valign="top"><a href=
"x10832.htm" accesskey="N">Next</a></td>
</tr>
<tr>
<td width="33%" align="left" valign="top">The Most
Frequently Asked Questions</td>
<td width="34%" align="center" valign="top"><a href=
"faq.htm" accesskey="U">Up</a></td>
<td width="33%" align="right" valign="top">Job is not in
print queue, but it gets printed!</td>
</tr>
</table>
</div>
<p align="center"></p>
</body>
</html>
|