1825578 Members
2290 Online
109682 Solutions
New Discussion

telnet issue

 
ASR
Contributor

telnet issue

We have an application that in 'c' code opens 2 pipes and forks telnet to login to our application. Since this can all run on the same
physical server, this telnet could be back to the same physical server.

What we see happen is everything is running along smoothly, ie we are
sending and receiving data back and forth, and then we "lock-up".

What I mean is that we have a protocoled message passing from our
applications 2 processes so one side sends data and waits for an ack
before sending the next data. On the receiving side, it reads data, and sends an ack after each.

We have used tusc to watch the 3 processes and what we see happen is that telnet "recvs"
from the one side but doesn't write the data into the pipe towards our
other process, so all of the processes are just sitting on reads.

During correct operation, telnet is "recv"ing from one side and
"write"ing to the other but for some reason, at random times, it stops "write"ing.
2 REPLIES 2
Steven E. Protter
Exalted Contributor

Re: telnet issue

Shalom,

Lets see the process data.

http://www.hpux.ws/?p=6

I would need more data to assist you.

Your system may be configured to prevent the same user from telneting twice. That is possible. Lets see inetd.conf

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Matti_Kurkela
Honored Contributor

Re: telnet issue

Does the data sent by your application contain anything that might be interpreted as Telnet escape character (ASCII 0x1d, or Ctrl-])? Or has this been disabled by a command-line option to the telnet process?

You say there are 3 processes in this setup. Your client application is one of them, then there is the "telnet" process and the last would be the server application.

I guess there is no "telnetd" involved, and your application is making telnet connect to something that is not really a telnet server and does not really follow the requirements of the Telnet protocol. This may cause all kinds of problems.

The question you should be asking is: "It takes just two system calls to initiate a TCP connection directly from your client application. Why on earth is telnet used here???"

One of the possible answers might require getting your C programmer on a good "Basics of UNIX network programming" course as soon as possible.

MK
MK