IBM i Global

 View Only
Expand all | Collapse all

HTTP_POST Resulting in GSKit Error is 5 - An operation which is not valid for the current TLS session state was attempted.

  • 1.  HTTP_POST Resulting in GSKit Error is 5 - An operation which is not valid for the current TLS session state was attempted.

    Posted Tue November 29, 2022 03:06 PM

    Can anyone point me to documentation or a possible resolution for GSKit Error 5 from an HTTP_POST?  

    The full response message is:

    HTTPTransportException: Input streaming error while reading from channel. GSKit Error is 5 - An operation which is not valid for the current TLS session state was attempted.


    This is using QSYS2.HTTP_POST.



    ------------------------------
    Amy Vozza
    ------------------------------


  • 2.  RE: HTTP_POST Resulting in GSKit Error is 5 - An operation which is not valid for the current TLS session state was attempted.

    Posted Wed November 30, 2022 05:35 AM
    Edited by Satid Singkorapoom Wed November 30, 2022 06:38 AM
    Dear Amy

    Since the error you provided appears to be related to TLS, I see that you should try to obtain more information about this error from IBM i.  Please generate the error again and notice the system time it happens. Then immediately run DSPMSG QSYSOPR and browse for any IBM i messages about TLS and TCP/IP that match the time your error occurs.  You can also try running DSPLOG PERIOD( specify start time about 1 minute before the error) to check if you can see additional messages that may provide more information of your error that you can use further to identify possible cause.

    Assuming you use HTTPS for the URL, did you set up certificate in DCM yet? I find in an IBM Technote that by default, the QSYS2 HTTP functions use the system default certificate store (/QIBM/USERDATA/ICSS/CERT/SERVER/DEFAULT.KDB). You need to create the required certificate store and add certificates with the Digital Certificate Manager (DCM). 

    ------------------------------
    Right action is better than knowledge; but in order to do what is right, we must know what is right.
    -- Charlemagne

    Satid Singkorapoom
    ------------------------------



  • 3.  RE: HTTP_POST Resulting in GSKit Error is 5 - An operation which is not valid for the current TLS session state was attempted.

    Posted Wed November 30, 2022 11:32 AM
    Thanks for your help.

    Yes, I'm using HTTPS for the URL.  I did initially think the error was due to a missing certificate, so I tried loading that to the certificate store, but at import I received a message that a certificate with the same label or public key already existed in the certificate store.  I've generated the error again and found nothing in QSYSOPR or DSPLOG for that.  

    Before being directed to post this question here, I'd posted it to the SQL group, and have since received another suggestion there for contacting support.  


    ------------------------------
    Amy Vozza
    ------------------------------