Operating System - HP-UX
1836581 Members
1441 Online
110102 Solutions
New Discussion

telnet session times out after an hour

 
Jim Hendrick
Advisor

telnet session times out after an hour

but an ssh connection does not.

I have checked and TMOUT=0 in the users' environments (although it is not getting set in ~/.profile, ~/.login or /etc/profile so I'm assuming that this is the shell's built-in default)

This is happening on all our HP-UX systems (11.00).

Are there known problems with telnetd doing this? It leaves no error messages in syslog that I can tell.

I have put inetd into connection logging mode, and don't see any messages that indicate anything other than the telnet session being established.

At the moment, I have "tusc" tracing the telnetd of a session that will (I assume ) time out in about an hour. (I am *that* confused...)

Any thoughts?

Thanks,

Jim
10 REPLIES 10
hpuxrox
Respected Contributor

Re: telnet session times out after an hour

Jim,

Do you use a firewall? We have our firewall set to timeout all idle telnet sessions after a peroid of time.

It also could be a pore network connection.

hpuxrox
Respected Contributor

Re: telnet session times out after an hour

Also,

Here is a little secret that is not supported by HP.

inetd -b

this will enable detailed connection debugging
but be sure to turn it backoff or it will fill your syslog in no time.

Jim Hendrick
Advisor

Re: telnet session times out after an hour

 
kish_1
Valued Contributor

Re: telnet session times out after an hour

try changing the MTU parameter
by

lanadmin -M 1440 0
share the power of the knowledge
Jim Hendrick
Advisor

Re: telnet session times out after an hour

More info:

I tried the inetd -b and here is the entry that accompanied a telnetd process going away (pid 27966 obviously):

dev_web1 > grep 27966 syslog.log
Apr 25 10:45:25 dev_web1 inetd[27966]: fork returned = 0
Apr 25 10:45:25 dev_web1 inetd[27966]: Pid=0, child
Apr 25 10:45:25 dev_web1 inetd[27966]: Child becoming leader
Apr 25 10:45:25 dev_web1 inetd[27966]: resetsignals() called...resetting to SIG_
DFL
Apr 25 10:45:25 dev_web1 inetd[27966]: telnet/tcp: Connection from unknown (141.
114.150.56) at Thu Apr 25 10:45:25 2002
Apr 25 10:45:25 dev_web1 inetd[27966]: Child getting stuff
Apr 25 10:45:25 dev_web1 inetd[27966]: Child got stuff
Apr 25 10:45:25 dev_web1 inetd[578]: fork returned = 27966
Apr 25 10:45:25 dev_web1 inetd[27966]: 2. About to execl(/usr/lbin/telnetd,@)
Apr 25 12:57:18 dev_web1 inetd[578]: reapchild(): wait3 returned pid=27966
dev_web1 >

so it may not be telnetd, but inetd itself that is timing out the sesssions (which would be consistent with ssh not doing it, since it is not spawned by inetd).


Babu,
I checked and the MTU is 1500. Care to elaborate on why you recommend 1440?

Jim

Sandip Ghosh
Honored Contributor

Re: telnet session times out after an hour

Try to set the tcp timeout through nettune. If you give nettune it will show you the present, min and max setting you can go.
Look at man nettune for more.

Sandip
Good Luck!!!
hpuxrox
Respected Contributor

Re: telnet session times out after an hour


nettune is no longer supported in 11.0.

try ndd

see the following thread,

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x23631012aa92d5118ff10090279cd0f9,00.html
Jim Hendrick
Advisor

Re: telnet session times out after an hour

Several of you seem to be indicating you believe this is a problem with a network connection or parameter.

Would you tell me why?

I (naievely perhaps) thought that since ssh<->sshd was *not* timing out, and that telnet->inetd spawning telnet<->telnetd *was* timing out that it indicated the problem was not with a network connection, but rather with either telnet, telnetd or inetd (and not the shell or the network).

If I am on the wrong track here would someone please help me understand what you think is happening on the network side? I would be more than happy to make changes to those parameters if I understood what the potential problem was...

Thanks again!

Jim H.

Sachin Patel
Honored Contributor

Re: telnet session times out after an hour

Hi Jim,

I might be off track but add following line in your .cshrc file
set autologout=0

Sachin
Is photography a hobby or another way to spend $
Sandip Ghosh
Honored Contributor

Re: telnet session times out after an hour

Tcp,udp,ip everyone is having there default value what you can set accordiing to your requirements. I don't have any HP-UX 11.0 M/C around. So I am attaching the nettune output. ON HP-UX 11.00 ndd would do the same.

arp_killcomplete = 1200 default = 1200 min = 60 max = 3600 units = seconds
arp_killincomplete = 600 default = 600 min = 30 max = 3600 units = seconds
arp_unicast = 300 default = 300 min = 60 max = 3600 units = seconds
arp_rebroadcast = 60 default = 60 min = 30 max = 3600 units = seconds
icmp_mask_agent = 0 default = 0 min = 0 max = 1
ip_check_subnet_addr = 1 default = 1 min = 0 max = 1
ip_defaultttl = 255 default = 255 min = 0 max = 255 units = hops
ip_forwarding = 1 default = 1 min = 0 max = 1
ip_intrqmax = 50 default = 50 min = 10 max = 1000 units = entries
pmtu_defaulttime = 20 default = 20 min = 10 max = 32768
tcp_localsubnets = 1 default = 1 min = 0 max = 1
tcp_receive = 32768 default = 32768 min = 256 max = 262144 units = bytes
tcp_send = 32768 default = 32768 min = 256 max = 262144 units = bytes
tcp_defaultttl = 64 default = 64 min = 0 max = 255 units = hops
tcp_keepstart = 7200 default = 7200 min = 5 max = 12000 units = seconds
tcp_keepfreq = 75 default = 75 min = 5 max = 2000 units = seconds
tcp_keepstop = 600 default = 600 min = 10 max = 4000 units = seconds
tcp_maxretrans = 12 default = 12 min = 4 max = 12
tcp_urgent_data_ptr = 0 default = 0 min = 0 max = 1
udp_cksum = 1 default = 1 min = 0 max = 1
udp_defaultttl = 64 default = 64 min = 0 max = 255 units = hops
udp_newbcastenable = 1 default = 1 min = 0 max = 1
udp_pmtu = 0 default = 0 min = 0 max = 1
tcp_pmtu = 1 default = 1 min = 0 max = 1
tcp_random_seq = 0 default = 0 min = 0 max = 2
so_qlimit_max = 4096 default = 4096 min = 1 max = 8192
sb_max = 262144 default = 262144 min = 10240 max = 4294967295
hp_syn_protect = 0 default = 0 min = 0 max = 1
so_qlimit_min = 500 default = 500 min = 0 max = 8192
high_port_enable = 0 default = 0 min = 0 max = 1
high_port_max = 65535 default = 65535 min = 49153 max = 65535
ip_forward_directed_broadcasts = 1 default = 1 min = 0 max = 1

Sandip
Good Luck!!!