#1408 z/OS: Error accepting on server socket, socket RC: 122

Unix
open-accepted
5
2014-08-28
2011-08-09
No

On z/OS, after STAFProc has been running for a while, sometimes for weeks, we start getting a zillion of the following errors logged in STAFProc's output:

20110809-07:09:00;21474836488;00000100;Error accepting on server socket, socket RC: 122
20110809-07:09:00;21474836488;00000100;Error accepting on server socket, socket RC: 122
20110809-07:09:00;21474836488;00000100;Error accepting on server socket, socket RC: 122
20110809-07:09:00;21474836488;00000100;Error accepting on server socket, socket RC: 122

This results in high CPU utilization until STAFProc is terminated.

Discussion

  • Sharon Lucas

    Sharon Lucas - 2011-08-09

    On z/OS, socker RC 122 indicates an EIO error. The basic cause of an EIO error is the TCP/IP stack being terminated and subsequently restarted.

    I addded a close of the client socket when this error occurs to try to prevent it from getting into a continuous error loop, using up all CPU. As this problem is hard to recreate, I haven't been able to verify yet if this change fixed the continuous logging of the error problem.

    Here's a cvs diff of the change:

    Index: connproviders/tcp/STAFTCPConnProvider.cpp

    RCS file: /cvsroot/staf/src/staf/connproviders/tcp/STAFTCPConnProvider.cpp,v
    retrieving revision 1.56
    diff -r1.56 STAFTCPConnProvider.cpp
    595a596,608
    >
    > if (STAFSocketGetLastError() == EIO)
    > {
    > // On z/OS, if get error 122 (EIO) then end up in
    > // a continuous loop logging this trace error
    > // message. The basic cause of an EIO error is
    > // the TCP/IP stack being terminated and
    > // subsequently restarted.
    >
    > // Close client socket to try to prevent this
    > STAFSocketClose(connImpl.clientSocket);
    > }
    >
    854,857c867,884
    < STAFTrace::trace(kSTAFTraceError,
    < STAFString("Error accepting on server socket"

    < ", socket RC: ") +
    < STAFString(STAFSocketGetLastError()));
    ---
    > STAFTrace::trace(
    > kSTAFTraceError,
    > STAFString("Error accepting on server socket, "
    > "socket RC: ") +
    > STAFString(STAFSocketGetLastError()));
    >
    > if (STAFSocketGetLastError() == EIO)
    > {
    > // On z/OS, if get error 122 (EIO) then end up in
    > // a continuous loop logging this trace error
    > // message. The basic cause of an EIO error is
    > // the TCP/IP stack being terminated and
    > // subsequently restarted.
    >
    > // Close client socket to try to prevent this
    > STAFSocketClose(connImpl.clientSocket);
    > }
    >

     
  • Sharon Lucas

    Sharon Lucas - 2011-08-11
    • status: open --> closed-fixed
     
  • Sharon Lucas

    Sharon Lucas - 2011-08-19

    This did not fix the problem so re-opening.

     
  • Sharon Lucas

    Sharon Lucas - 2011-08-19
    • status: closed-fixed --> open-accepted
     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks