• The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
Menu
  • The Four Hundred
  • Subscribe
  • Media Kit
  • Contributors
  • About Us
  • Contact
  • Keeping 5250 Alive

    June 11, 2008 Tom Van Looy

    Some time ago, we had problems with Client Access sessions being reset. It seemed that these connections were traveling over a VPN that got disconnected after being idle for a while. Because we were not in charge of the VPN, I used TCP keepalive as a workaround for this problem.

    Keepalive

    A TCP connection can set the SO_KEEPALIVE option with the setsockopts() system call. When the TCP connection is idle for a specified period of time, a keepalive packet will be sent to keep the connection open. (In practice, this keepalive packet is a request for acknowledgement of the previous packet.) Most programming languages provide a library routine to activate the keepalive option. For example, Java provides the setKeepAlive() method, which can be invoked after socket construction.

    There are three parameters that can be configured for keepalive messages. On a Windows machine, these are registry values in HKLMSYSTEMCurrentControlSetServicesTcpIpParameters. KeepAliveInterval (default 1 second), KeepAliveTime (default 2 hours) and TcpMaxDataRetransmission (default 5 seconds). On a Linux machine these are sysctl values in net.ipv4 (or procfs in /proc/sys/net/ipv4), tcp_keepalive_intvl (default 75s), tcp_keepalive_time (default 2h), and tcp_keepalive_probes (default 9).

    TCP keepalive messages are described in RFC1122. The RFC also points out some disadvantages of sending keepalive messages.

    5250 Keepalive

    It is possible to activate keepalive messages on the 5250 emulator. The startup file for a System i connection (.WS file) must be edited with a text editor. These files reside by default in C:Program FilesIBMClient AccessEmulatorPrivate. Below the [Telnet5250] option you add the option KeepAlive=Y. This is enough to activate keepalive messages on a 5250 session.

    The IBM Client Access suite delivers a command line tool, CWBCOPWR, that can configure some of the keepalive parameters. For example, to set KeepAliveTime to 10 seconds and KeepAliveInterval to 1 second, use the command “cwbcopwr/MKA:1,10”.

    Tom Van Looy started out his IT career as an ILE/RPG developer in 2005 and moved over to the position of i5/OS system engineer in 2007. He is currently employed by Lisis nv in Belgium. Although a Unix enthusiast, he also has great affinity with GNU/Linux and *BSD. Tom can be reached by email at tom@ctors.net.



                         Post this story to del.icio.us
                   Post this story to Digg
        Post this story to Slashdot

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Tags:

    Sponsored by
    ARCAD Software

    Join us for a webinar on August 25, 2022, with a presentation on how Git uses concurrent development and how it can scale to fit your development needs. You’ve heard mention of Git and now it’s time to answer the question. What is Git and Why? This should be a very informative and interesting webinar that could relate to you!

    Register Here

    Share this:

    • Reddit
    • Facebook
    • LinkedIn
    • Twitter
    • Email

    Sponsored Links

    COMMON:  Join us at the Focus 2008 workshop conference, October 5 - 8, in San Francisco, California
    Profound Logic Software:  Web-enable in less than a day with Genie
    Vision Solutions:  System i Management Tips Blog - Free i5/OS Tips Each Week!

    IT Jungle Store Top Book Picks

    Easy Steps to Internet Programming for AS/400, iSeries, and System i: List Price, $49.95
    Getting Started with PHP for i5/OS: List Price, $59.95
    The System i RPG & RPG IV Tutorial and Lab Exercises: List Price, $59.95
    The System i Pocket RPG & RPG IV Guide: List Price, $69.95
    The iSeries Pocket Database Guide: List Price, $59.00
    The iSeries Pocket Developers' Guide: List Price, $59.00
    The iSeries Pocket SQL Guide: List Price, $59.00
    The iSeries Pocket Query Guide: List Price, $49.00
    The iSeries Pocket WebFacing Primer: List Price, $39.00
    Migrating to WebSphere Express for iSeries: List Price, $49.00
    iSeries Express Web Implementer's Guide: List Price, $59.00
    Getting Started with WebSphere Development Studio for iSeries: List Price, $79.95
    Getting Started With WebSphere Development Studio Client for iSeries: List Price, $89.00
    Getting Started with WebSphere Express for iSeries: List Price, $49.00
    WebFacing Application Design and Development Guide: List Price, $55.00
    Can the AS/400 Survive IBM?: List Price, $49.00
    The All-Everything Machine: List Price, $29.95
    Chip Wars: List Price, $29.95

    Zend Taps System i-PHP Guru, Pushes the i Platform Happy 20th Birthday, AS/400!

    Leave a Reply Cancel reply

Volume 8, Number 23 -- June 11, 2008
THIS ISSUE SPONSORED BY:

Help/Systems
Group8 Security
COMMON

Table of Contents

  • Creating an RPG-based Web Service Using WDSC, Part 1
  • SQL May Be Catching Up with DDS
  • Admin Alert: Redundancy is Good, Redundancy is Good, Re…
  • Keeping 5250 Alive
  • Seeking Advice on REXX
  • Admin Alert: All About the System i Attention Light

Content archive

  • The Four Hundred
  • Four Hundred Stuff
  • Four Hundred Guru

Recent Posts

  • The Cloud’s Future Is So Bright, So Why Are You So Glum?
  • Most App Modernization Projects a Struggle, Survey Finds
  • COMMON Launches IBM i Security Conference
  • Four Hundred Monitor, August 17
  • A Slew Of Add-On Services For Power10 Systems
  • Power10 Midrange Machine: The Power E1050
  • IBM Puts The Finishing Touches On PowerHA For IBM i 7.5
  • Guru: Regular Expressions, Part 2
  • Get Your Security Education, And Not From The School Of Hard Knocks
  • IBM i PTF Guide, Volume 24, Number 33

Subscribe

To get news from IT Jungle sent to your inbox every week, subscribe to our newsletter.

Pages

  • About Us
  • Contact
  • Contributors
  • Four Hundred Monitor
  • IBM i PTF Guide
  • Media Kit
  • Subscribe

Search

Copyright © 2022 IT Jungle

loading Cancel
Post was not sent - check your email addresses!
Email check failed, please try again
Sorry, your blog cannot share posts by email.