I have an existing project using karate-junit5:1.1.0 to test an API. When ran locally from my laptop everything is working as expected. I'm implementing the same test in Jenkins and we need to use a proxy server to connect to external URLs from our Jenkins nodes.
Prior to updating the test to use a proxy I get an error like this attempting to connect to the external URL:
15:17:46.486 [pool-1-thread-4] ERROR com.intuit.karate - karate.org.apache.http.conn.ConnectTimeoutException: Connect to <url redacted>:443 [<url redacted>] failed: connect timed out, http call failed after 30198 milliseconds for url: https://<url redacted>
15:17:46.488 [pool-1-thread-4] ERROR com.intuit.karate - classpath:token/GetAuthToken.feature:16
Using the karate documentation I updated the project to use a proxy globally in the karate-config.js file:
karate.configure('proxy', 'http://<url redacted>');
After making this change, I am now seeing a different error when the test attempts to connect to the external URL:
12:38:57.391 [pool-1-thread-1] ERROR com.intuit.karate - javax.net.ssl.SSLHandshakeException: Received fatal alert: unrecognized_name, http call failed after 1514 milliseconds for url: https://<url redacted>
12:38:57.392 [pool-1-thread-1] ERROR com.intuit.karate - classpath:token/GetAuthToken.feature:16
In searching online I couldn't find much information about this new error. Any idea on how I can resolve this so I can run my tests in external facing environments? Thanks