免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1119 | 回复: 4
打印 上一主题 下一主题

[SCO UNIX] 错误 提示问题(急!!!!!!!!!!!!!!!!!!!) [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2004-08-24 14:09 |只看该作者 |倒序浏览
我的系统日志里经常出现这样的错误
gjbg telnetd[变化的数字] :ttloop: peer died: unknown error
一秒出现5次
ttloop:connection reset by peer
can't find utmp entry for line ttyp0
这两条就没有规律了。
请问这是什么原因引起的呢?怎么解决,有不用重起系统的方法么??

论坛徽章:
1
15-16赛季CBA联赛之北控
日期:2022-03-04 22:35:50
2 [报告]
发表于 2004-08-24 15:35 |只看该作者

错误 提示问题(急!!!!!!!!!!!!!!!!!!!)

这个应该与具体的应用程序有关吧。

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
3 [报告]
发表于 2004-08-24 20:32 |只看该作者

错误 提示问题(急!!!!!!!!!!!!!!!!!!!)

Problem
  Commands such as who(C), finger(C), and ps(C) may show established telnet sessions when the client end of the TCP connection no longer exists, for example, when the client computer crashes, is powered off or reset without first closing the telnet session. Established sessions may also be shown when network connectivity to the client has failed. There may also be errors in /usr/adm/syslog:

                   telnetd: ttloop peer died


The telnet server daemon, telnetd(ADMN), arranges to use TCP transport-level keepalive probes to distinguish an inactive client from a TCP connection for which the remote end of the connection no longer exists. When TCP finds a connection has been inactive for a specified period of time, it sends a keepalive probe to the client, and listens for a response. If there is no response to the probe, additional probes are sent at a specified frequency. If there is no response from the client after a specified number of probes have been sent, it is assumed that the connection has been lost, and the telnet session is closed. If the client responds to a probe, the session is kept alive. This sequence of events is repeated if the session remains or again becomes idle. The timing for the sequence of events is determined by the three parameters just mentioned: idle interval, probe frequency, and number of probes. These values may be specified by telnetd, or left at the system-wide defaults.
When the who and ps commands both show a telnet login as active, it is likely that they are correctly reporting a session that hasn't been closed by the client, and for which the sequence of events leading to automatic closing of the connection by the server, hasn't completed. That will be the case for an ordinary established connection over a properly functioning network. That will also be the case when keepalive probing hasn't yet completed for a client that has failed to disconnect properly, or with which connectivity has been lost. In the most insidious case, the client's TCP may not respond correctly to keepalive probes after failing to disconnect properly, and then rebooting. Rather than sending a reset response, the client sends an acknowledgement, causing the connection to be kept alive when it should have been closed. This article addresses the above cases. In particular, the "Solution" section of this article addresses how telnetd's keepalive parameters can be modified to minimize problems due to telnet clients that fail to disconnect properly.

When who shows a telnet user logged in, while ps shows that the session has in fact been closed, it is possible that /etc/utmp and related files have stale entries. Output from who and related commands is based on these files. The stale entries may be due to corruption in files that are read by utilities that update utmp, or to faulty third-party software. These cases are addressed in other technical articles in the SCO Support Library, listed at the end of this article. Note that it is possible to have both types of problem appear on the same system.



  Solution
  Use the following diagnostic to distinguish the two problem types just mentioned ("#" indicates the root command line prompt):

             # kill -0 `who -u | awk '{print $7;}'`


Any output indicates a stale /etc/utmp entry associated with that process id. Consult other technical articles in this database, listed at the end of this article, for guidance in dealing with stale utmp entries. This article applies in cases for which the diagnostic produces no output.
The sending of keepalive probes can be configured to reduce the problem of telnet sessions that haven't been disconnected properly. Some experimentation may be necessary to find the configuration that works best with the clients on a given network. The parameters that may be configured are described in the Keepalives section of the telnetd(ADMN) man page:

Keepalives ++++++++++

Transport-level keepalive messages are enabled unless the -n option is present. The use of keepalive messages allows sessions to be timed out if the client crashes or becomes unreachable.

If keepalives are being used, several parameters may be controlled using the following options:


-k n    The argument n specifies the time (in seconds) that a connection
        must be idle before the first keepalive probe will be sent.

-K n    The argument n specifies the interval (in seconds) between
        keepalive probes if no response is received.

-N n    The argument n specifies the number of unanswered keepalive probes
        that will be sent prior to dropping the connection.


The default keepalive values corresponding to these options are controlled by the parameters tcp_keepidle (7200 seconds), tcp_keepintvl (75 seconds), and tcp_nkeep (. These can be tuned on a system-wide basis using inconfig (ADMN). These options exist solely to provide finer control of keepalives on per application basis.

Note
The last paragraph of the man page excerpt above refers to system- wide defaults. The keepalive options provided by the telnet server daemon allow these system-wide keepalive parameters to be overridden for telnet connections, without affecting keepalive behavior of other applications.
The minimum value of 10 for -k is not documented in the man page. Values less than 10 for the -k flag will be ignored, and the default value will be used.

Because telnetd(ADMN) is started by inetd(ADMN), the keepalive flags need to be appended to the telnet line in /etc/inetd.conf.

As an example, the line:


telnet  stream  tcp     nowait  NOLUID  /etc/telnetd    telnetd


would be edited with vi(C) to read:

telnet  stream  tcp     nowait  NOLUID  /etc/telnetd    telnetd -k 30 -K 1 -N 6


Execute the following command to apply the new configuration:

             # kill -1 `cat /etc/inetd.pid`


The values given in this example are chosen so that a session will be idle thirty seconds (-k 30) before the first probe is sent, will probe every second (-K 1) until a response is received, or will close the session if no response is received during five seconds of probing (-N 6 and -K 1).
The values in this example might apply for an intranet with fast and reliable connectivity, and a problem client that answers keepalive probes incorrectly. If the client reboots quickly, these aggressive values may be of no avail. A shorter idle time may be configured, down to the minimum value of 10 for -k, but this will further burden the network with keepalive probe traffic, possibly leading to network performance problems.

A second example illustrates possible values for a slower and less reliable Internet connection, with a client that correctly responds to keepalive probes:


telnet  stream  tcp     nowait  NOLUID  /etc/telnetd   telnetd -k 60 -K 30 -N 5


In this case, a session will be idle one minute (-k 60) before the first probe is sent, will probe every thirty seconds (-K 30) until a response is received, or will close the session if no response is received during two minutes of probing (-N 5 and -K 30).
The number of seconds of probing is given by:


             K * ( N -1 )


The number of seconds from the last activity to the last probe is given by:

             k + ( K * ( N -1 ))


This is over two hours using the system defaults, and 35 seconds and three minutes, respectively, in the examples.
A third example illustrates an alternative approach: putting multiple telnet services on different ports, with different sets of keepalive parameters, and configuring only misbehaved clients to come in through a fast-timeout port.

A fast-timeout telnet port is set up in /etc/services on a port not already in use (823 in this example):


telnet2       823/tcp         # fast-timeout telnet port


A corresponding entry is made in /etc/inetd.conf, with keepalive values appropriate for the clients that will be configured to use the fast-timeout telnet port:

telnet  stream  tcp     nowait  NOLUID  /etc/telnetd    telnetd
telnet2 stream  tcp     nowait  NOLUID  /etc/telnetd    telnetd -k 30 -K 1 -N 6


Apply the server configuration as in the other examples, and configure the misbehaved telnet clients to use port 823 instead of 23. It is important to note that some telnet clients cannot be configured to connect to ports other than the default port 23. The approach suggested in this third example cannot be used with such clients.
The examples are intended to be illustrative; the values chosen will depend on the specific situation. Some experimentation may be required to determine the best values.

论坛徽章:
0
4 [报告]
发表于 2004-08-24 23:34 |只看该作者

错误 提示问题(急!!!!!!!!!!!!!!!!!!!)

这个应该就是解决的办法了,楼上的兄弟,是从那里找来的?

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
5 [报告]
发表于 2004-08-25 21:42 |只看该作者

错误 提示问题(急!!!!!!!!!!!!!!!!!!!)

从这找到的
http://support.sco.com/rn_cgi/install.cfg/php/enduser/std_alp.php?p_li=&p_sp=
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP