[Webinar] Streamline your web hosting managementRegister Today


linux os/400 connection fails at second try

Posted on 2000-01-22
Medium Priority
Last Modified: 2007-10-18
ok. so, i strt a telnet connection to my as400 server wich works just fine. second time i try it, it fails ("Connection closed by foreign host"). more, no one else (as far as i test it) is able to connect using telnet. they stil can connect using client access or other "explorers", and also as400 still can connect to linux using telnet. what's happening here?
Question by:guzu
  • 4
  • 2
  • 2
  • +4

Expert Comment

ID: 2379161
You should check the system values QAUTOCRT and QAUTODEV. The first controls if devices (such as Telnet-display devices) may be created dynamically and the second controls how many devices (in total) may be dynamically created. Your first successful attempt to connect may have been to an already existing device and at your following attempts this device may have been occupied by somebody else. If you look in the AS/400, you may also check what device-types are available. Check with WRKCFGSTS *DEV QVRT* or WRKCFGSTS *DEV QPAD* which are defined and which are currently used. Also check if any are in pending or failed status.
One more comment: If available, use TN5250 - you've got much more control over function keys and the like.


Expert Comment

ID: 2380479
Yes, the device ID of your telnet workstation may be vary off by AS400. so to make it easy, just vary on all device state with QPAD* using wrkcfgsts or wrkdevd.

Expert Comment

ID: 2489021
Joakim, I'm looking for quite some time for a TN5250 for Linux. All there is now, is a Beta emulator.
Good connections between Linux and AS/400 are not quite that easy (if totally not) to make.
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.


Expert Comment

ID: 2489058
Well, that's true. Sorry to say, but I don't know of any TN5250-emulator for Linux - I only know that you you'll hate using VT100 or something similar with an AS/400. Keybord mapping and screen colours will only work if you use TN5250.


Accepted Solution

jbrugman earned 600 total points
ID: 2489164
I'm sure you didn't find any cient access for Linux as well... :|
The only way i connect now, is using perl with odbc on the server, to talk native SQL.
Both machines do talk SQL....

Would like to see this though, since i like the stability of AS/400 and Linux.

Expert Comment

ID: 2572232
Found it !!!

Here you find the only working tn5250 emulator for Linux.

I start it with:
xt5250 -s session -y IBM-3477-FC ipnumber

Where the IBM-3477-FC supports 132 columns.

Expert Comment

ID: 2572250
guzu, your problem might be, that the as/400 has 132 colums, what is not supported under telnet wit 'vt100' screens.
so, download the latest program,
gzip -dc filename | tar -xvf-
go to new directory
../make check
../make install
in usr/local/bin there should be xt5250,
use the paramaters -s sessionname
-y screenname
ipnumber or hostname

Hope it helps,

Expert Comment

ID: 3482272
Make sure that you are not connecting using a named session.  

For example,

  if you connect to the 400 using:
          tn5250 -s mysession  my.400.ip.address

then if you do a WRKACTJOB under QINTER you will see the device mysession logged in with your user id.  If you try to connect to the 400 again, then it will not let you, because it is trying to connect to the same device and it is already in use.

try to connect twice to the 400 just by using telnet from a command line.  To get your function keys use ESC + the number of the keyboard.  ( e.g.  for F11 use ESC + - for F16 use ESC + $ [Shift 4] ).  This will definitely dynamically assign device names for sure and you can then rule out if you are just running out of devices or if it is something simple like a named session.  

Hope this helps.

Author Comment

ID: 6044850
so, it has been proved that tn5250 is a great tool for conneting, also that my connection fails due to as400's telnet server failure... still, i don't know why, under some(?) conditions, the telnet server goes down... the last known example follows: after first try of tn5250, didn't know how to stop it (after logout) and tried Ctrl-C wich shows me a beautiful 'X SYSTEM' on the bottom of the screen, panic was there so i 'killall tn5250' and go home without looking back... the day after, there was no more TELNET server running on as400. i've looked at the logs and surprise! it was down after that Ctrl-C. can anybody tell me why?
LVL 27

Expert Comment

by:Asta Cu
ID: 6096449
This question is still open today and may just have been overlooked.  If you have been helped here, you may choose the comment which served you as the accepted answer to then grade and close so that others seeking help on this may find it in the PAQ database.

If more information is required, please post details here.

Thank you,
LVL 27

Expert Comment

by:Asta Cu
ID: 6143682
This question is still open today, perhaps it was overlooked or just lost in the volumes.  Please return to this question to update it with comments if more information is needed to get your solution.  If you've been helped by the participating expert(s), you may just convert their comment to the accepted answer and then grade and close.  If an answer has ever been proposed you may not have this option to accept the comment as answer, if that is the case, ask the specific expert you wish to award to post an answer.     This benefits others who then search our PAQ for just this solution, and rewards the experts who have provided information.  A win/win scenario.  Please DO NOT accept this comment as an answer,  it is merely a reminder.
If you wish to award multiple participants, you can do so by creating a zero point question in the Community Support topic area, include this link and tell them which experts you'd like to award what amounts.  If you'd like to delete this question, use the same process as above, but explain why you think it should be deleted.  Here is the Community Support link:   http://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
You can always click on your profile to see all your open questions, in the event you also have other open items to be resolved.   If your number of Questions Asked is not equal to the number of Answers Graded, choose to VIEW question history, and you'll quickly be able to navigate to your open items to close them as well.
I've had excellent help from experts-exchange through the years and find the real key to getting what I need is to remain active in all my questions, responding with results to suggestions until my solution is found, and recommend that highly.
Thank you very much for your responsiveness, it is very much appreciated.  
":0)  Asta

Expert Comment

ID: 6853629

Question(s) below appears to have been abandoned. Your options are:
1. Accept a Comment As Answer (use the button next to the Expert's name).
2. Close the question if the information was not useful to you. You must tell the participants why you wish to do this, and allow for Expert response.
3. Ask Community Support to help split points between participating experts, or just comment here with details and we'll respond with the process.
4. Delete the question. Again, please comment to advise the other participants why you wish to do this.

For special handling needs, please post a zero point question in the link below and include the question QID/link(s) that it regards.
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  http://www.experts-exchange.com/jsp/cmtyHelpDesk.jsp

Please click you Member Profile to view your question history and keep them all current with updates as the collaboration effort continues, to track all your open and locked questions at this site.  If you are an EE Pro user, use the Power Search option to find them.

To view your open questions, please click the following link(s) and keep them all current with updates.

------------>  EXPERTS:  Please leave any comments regarding your closing recommendations if this item remains inactive another seven (7) days.  Also, if you are interested in the cleanup effort, please click this link http://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
Thank you everyone.
Moderator @ Experts Exchange

P.S.  For any year 2000 questions, special attention is needed to ensure the first correct response is awarded, since they are not in the comment date order, but rather in Member ID order.

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It's not just another paperwork submission. Serious planning and rigour to managing the whole thought processes need to be put in place. The intent is not on drilling into the details, but to share tips in getting the first thing right to kick-start…
Take advantage of one of the most useful technologies available - virtualization!
Planning to migrate your EDB file(s) to a new or an existing Outlook PST file? This video will guide you how to convert EDB file(s) to PST. Besides this, it also describes, how one can easily search any item(s) from multiple folders or mailboxes…
Free Data Recovery software is an advanced solution from Kernel Tools to recover data and files such as documents, emails, database, media and pictures, etc. It supports recovery from physical & logical drive after a hard disk crash, accidental/inte…
Suggested Courses

612 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question