473,387 Members | 1,619 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 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 1884
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: walala | last post by:
Dear all, I recently came across a Python program which used "telnetlib" to automate things in the several unix machines in our local networks; I attached the script as follows; I wonder if...
by: ־ | last post by:
code below cannt work import getpass import sys import telnetlib import select tn = telnetlib.Telnet() print tn.open("",23)
by: Mike Monaghan | last post by:
I'm rather new to python but a long time programmer. I think I've covered my bases so I hope this isn't somthing obvious. I'm running ActiveState PythonWin 2.3.2 (#49, Nov 13 2003, 10:34:54) ...
by: Svha | last post by:
Greetings I'd like to do some tweaks on a telnet session as I have no control over the server side what so ever. However I cannot correctly negotiate a telnet connection to the server. I've...
by: Wojciech Halicki-Piszko | last post by:
How to know if connection is active after telnetlib.Telnet.open(host,port)?
by: vercingetorix52 | last post by:
I'm trying to use a python script to access an embedded computer running linux and connected via a crossover ethernet cable using the following script... ....and I realize the username and...
by: Jerry | last post by:
Can anyone tell me if the telnetlib module is thread-safe? I've done some looking, but don't know, and I don't know how to tell from reading the module code.
by: Phoe6 | last post by:
Hi All, I am trying to use the telnetlib module. Manually when I do telnet I get: Login: (I type root) Password: ( I type Password) And it enters to the Telnet Session:
by: Samuel | last post by:
Hi, I am trying to automate a telnet session (currently using Python's telnetlib) and would like to echo any response of the remote host to stdout, as soon as it arrives on telnetlib's open TCP...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.