Forum Discussion

LoneWanderer04's avatar
LoneWanderer04
Occasional Contributor
5 years ago

ReadyAPI - "Remote host terminated the handshake" on server with SNI enabled

Hello everybody,


We are setting up a test suite using ReadyAPI 3.3.0.  It's making HTTPS Rest calls, using NTLM authentication which I set up and seems to succeed.  The issue I'm running into is that every other call fails due to the following error:

 

Error getting response; javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake.

I've dug into a lot of solutions at this point, and I'm running out of ideas. I tried editing the ReadyAPI vmoptions in the bin folder to add:
-Dsoapui.https.protocols=SSLv3,TLSv1.2
-Dsoapui.https.ciphers=TLS_RSA_WITH_AES_256_CBC_SHA256

I've tried adding the following to the ready-api.bat file:
set JAVA_OPTS=%JAVA_OPTS% -Dsoapui.https.protocols="TLSv1.2"
set JAVA_OPTS=%JAVA_OPTS% -Djavax.net.debug=all
set JAVA_OPTS=%JAVA_OPTS% -Djdk.tls.client.protocols="TLSv1.2"
set JAVA_OPTS=%JAVA_OPTS% -Dhttps.protocols="TLSv1.2"

But none of these solutions have worked so far.  Is there anybody else that has run into this issue, and how you got around it to fix it?

  • richie's avatar
    richie
    Community Hero

    Hey LoneWanderer04 

     

    Sorry - I read this as though you have a project and there are some REST requests configured to use NTLM auth and there are other executable test steps (what ones?) that when you execute these, you get the handshake reset -  is that correct?

     

    Do you mean that once you'd configured the REST steps to use NTLM - all other steps got a handshake reset?

     

    Can you please clarify?

     

    Cheers,

     

    rich

    • LoneWanderer04's avatar
      LoneWanderer04
      Occasional Contributor

      I'll try to clarify as much as I can.

      We have a test suite where all the REST calls are done via NTLM.  

      The current issue I'm encountering is if I execute an API call, every other run gives me the error I listed.  Nothing changes between attempts, other then I'll get a success, then  "Remote host terminated the handshake" then success, then "Remote host terminated the handshake".  

      The two scenarios I've tried is running each call individually which does the above behavior, and running all the calls together in a full suite of tests, at which point the first API call in the suite gets that error. 

      Example:

      1st run: POST *endpoint 1* - Success, I get a JSON package returned.
      2nd run: POST *endpoint 1* - failure Error getting response; javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake
      3rd run: POST *endpoint 1* - Success, json package from 1st run returned
      4th run: POST *endpoint 1* - failure Error getting response; javax.net.ssl.SSLHandshakeException: Remote host terminated the handshake

      • richie's avatar
        richie
        Community Hero

        Hi LoneWanderer04 

         

        I don't think this is anything to do with ReadyAPI!/SoapUI at all.

         

        To prove this - check the contents of the RAW request - one that is successful and one that fails - I'm betting they are identical.

         

        Considering it fails on every other request, it sounds like the endpoint you're hitting has some rate limiting/SLA that doesn't allow a certain number of requests within a specific timeframe or something like that.

         

        Have you tried inserting a Delay in between steps?

         

        The answer (depending on the level of logging) will probably be reflected in the logs of the app server endpoint you are hitting.

         

        ta

         

        rich