473,378 Members | 1,209 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,378 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
file.

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"

argTelnetConnection.write(cmd)

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

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

Similar topics

2
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...
1
by: ÕÅÖ¾Ã÷ | last post by:
code below cannt work import getpass import sys import telnetlib import select tn = telnetlib.Telnet() print tn.open("162.105.31.222",23)
3
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) ...
3
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...
3
by: Wojciech Halicki-Piszko | last post by:
How to know if connection is active after telnetlib.Telnet.open(host,port)?
4
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...
5
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.
3
by: Phoe6 | last post by:
Hi All, I am trying to use the telnetlib module. Manually when I do telnet 172.31.128.244 I get: Login: (I type root) Password: ( I type Password) And it enters to the Telnet Session:
1
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
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...
0
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
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...
0
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 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.