Link to home
Start Free TrialLog in
Avatar of guzu
guzu

asked on

linux os/400 connection fails at second try

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?
                                                                                          guzu
Avatar of Joakim011300
Joakim011300

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.

/Joakim
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.
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.
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.

/Joakim
ASKER CERTIFIED SOLUTION
Avatar of jbrugman
jbrugman

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Found it !!!
http://www.blarg.net/~mmadore/5250.html

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.
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
../configure
../make
../make check
../make install
startx
in usr/local/bin there should be xt5250,
use the paramaters -s sessionname
-y screenname
ipnumber or hostname


Hope it helps,
Justus
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.
Avatar of guzu

ASKER

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?
Avatar of Asta Cu
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,
Asta
Greetings.
 
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:   https://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
SECOND REQUEST, ADMINISTRATION HAS BEEN ADVISED.

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.
https://www.experts-exchange.com/jsp/qList.jsp?ta=commspt
 
Please click the Help Desk link on the left for Member Guidelines, Member Agreement and the Question/Answer process.  https://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.
https://www.experts-exchange.com/questions/Q.20112210.html
https://www.experts-exchange.com/questions/Q.10263884.html
https://www.experts-exchange.com/questions/Q.20176734.html
https://www.experts-exchange.com/questions/Q.20257119.html
https://www.experts-exchange.com/questions/Q.20138411.html




PLEASE DO NOT AWARD THE POINTS TO ME.  
 
------------>  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 https://www.experts-exchange.com/jsp/qManageQuestion.jsp?ta=commspt&qid=20274643
 
Thank you everyone.
 
Moondancer
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.