471,351 Members | 1,540 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,351 software developers and data experts.

Need help with telnetlib flakiness

I'm trying to use telnetlib to run a Java program on a remote server.
I'm having strange problems, and I'm wondering if anyone might be able
to help.

I have two UNIX servers, A and Z.

I have an application named LATTE that runs on server A. When the
user starts LATTE, the user can choose to create a telnet connection
back to A, or to Z. Then LATTE uses the telnet connection to run a
Java program (run it several times, on different input files) on the
selected server. After each run, it uses read_until() to wait from
the prompt to reappear before running the program on the next input

I have no problems when LATTE is connecting back to A. Everything
works fine. But when connecting to Z, strange things happen. The
program runs fine on the first file, then on subsequent files does
nothing but write a series of beeps (\x07) to the console until the
telnet connection read_until() times out.

I've checked out all the reasonable possibilities : differences in
executables, differences in input files, which file is the first to be
processed, etc. The problem is not in the command itself -- on Z, I
can run the program just fine on each input file if I execute the
identical command from an interactive telnet prompt.

So I appear to be getting the flaky behavior only when running the
program via Python's telnetlib (not interactively from the console),
when connected to the remote server (Z), not the home server (A), only
on the second and subsequent input files (not on the first).

I'm buffaloed. Does anybody have any ideas what might be going on?
Is telnetlib reliable?

-- Steve Ferg

P.S. Here's my code:

cmd = ("java " + classpathSpec
+" " + classfileName
+" " + inFilename
cmd += "\n"


results = argTelnetConnection.read_until(argPromptString,30)
Jul 18 '05 #1
1 1789
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

2 posts views Thread by walala | last post: by
1 post views Thread by ־ | last post: by
3 posts views Thread by Mike Monaghan | last post: by
3 posts views Thread by Svha | last post: by
3 posts views Thread by Wojciech Halicki-Piszko | last post: by
4 posts views Thread by vercingetorix52 | last post: by
5 posts views Thread by Jerry | last post: by
3 posts views Thread by Phoe6 | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.