The error javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
in SOAP UI indicates that there was a problem during the SSL handshake process when trying to establish a secure connection with the server. This issue typically occurs due to one of the following reasons:
Incompatible SSL/TLS Version: The client and server may be using incompatible SSL/TLS versions or cipher suites. Ensure that the client (SOAP UI) and the server support compatible versions and cipher suites.
Server Certificate Issues:
Hostname Mismatch: The hostname in the server certificate does not match the hostname of the server you are trying to connect to. Ensure that the hostname in the server certificate matches the hostname in the URL you are using.
SSL Inspection: If there is a proxy or firewall performing SSL inspection, it may be intercepting and modifying SSL traffic, causing the handshake to fail. Try disabling SSL inspection or adding an exception for the server.
Here are some steps you can take to resolve the SSLHandshakeException
:
Check SSL/TLS Configuration:
Inspect Server Certificate:
Hostname Verification:
Proxy and Firewall Configuration:
Debug SSL Handshake:
Here's an example of how you can configure SOAP UI to trust a self-signed server certificate:
server.crt
).server.crt
file and import it.The javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
error in SOAP UI indicates a problem during the SSL handshake process. By following the troubleshooting steps and solutions outlined above, you should be able to identify and resolve the issue causing the handshake failure.
"SOAP UI SSLHandshakeException handshake_failure enable TLS"
Description: Ensure that SOAP UI is configured to use TLS by enabling TLS protocols.
Implementation:
<!-- In SOAP UI, edit the SoapUI-5.x.x.vmoptions file --> -Dsoapui.https.protocols=TLSv1.2 -Dsoapui.https.protocols=TLSv1.1 -Dsoapui.https.protocols=TLSv1
"SOAP UI SSLHandshakeException handshake_failure disable SSLv3"
Description: Disable SSLv3 in SOAP UI to avoid using outdated and insecure protocols.
Implementation:
<!-- In SOAP UI, edit the SoapUI-5.x.x.vmoptions file --> -Dsoapui.https.protocols=TLSv1.2,TLSv1.1,TLSv1 -Dsoapui.https.disableSsl3=true
"SOAP UI SSLHandshakeException handshake_failure update Java version"
Description: Update Java to a version that supports the necessary TLS protocols.
Implementation:
# Download and install the latest version of Java (e.g., OpenJDK 11) sudo apt update sudo apt install openjdk-11-jdk # Update the JAVA_HOME environment variable to point to the new Java installation export JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
"SOAP UI SSLHandshakeException handshake_failure set SSLContext"
Description: Programmatically set the SSLContext to use TLS in SOAP UI.
Implementation:
import javax.net.ssl.SSLContext; import java.security.NoSuchAlgorithmException; public class SSLConfiguration { public static void main(String[] args) { try { SSLContext context = SSLContext.getInstance("TLS"); context.init(null, null, new java.security.SecureRandom()); SSLContext.setDefault(context); } catch (NoSuchAlgorithmException | java.security.KeyManagementException e) { e.printStackTrace(); } } }
"SOAP UI SSLHandshakeException handshake_failure use custom truststore"
Description: Use a custom truststore in SOAP UI to trust specific certificates.
Implementation:
<!-- In SOAP UI, edit the SoapUI-5.x.x.vmoptions file --> -Djavax.net.ssl.trustStore=/path/to/custom/truststore.jks -Djavax.net.ssl.trustStorePassword=yourPassword
"SOAP UI SSLHandshakeException handshake_failure configure JVM options"
Description: Configure JVM options to specify TLS protocols.
Implementation:
<!-- In SOAP UI, edit the SoapUI-5.x.x.vmoptions file --> -Dsoapui.https.protocols=TLSv1.2 -Dhttps.protocols=TLSv1.2
"SOAP UI SSLHandshakeException handshake_failure import server certificate"
Description: Import the server's SSL certificate into the Java truststore.
Implementation:
# Export the server certificate echo -n | openssl s_client -connect yourserver.com:443 | sed -ne '/-BEGIN CERTIFICATE-/,/-END CERTIFICATE-/p' > server-cert.pem # Import the certificate into the Java truststore keytool -import -alias yourserver -keystore $JAVA_HOME/jre/lib/security/cacerts -file server-cert.pem
"SOAP UI SSLHandshakeException handshake_failure configure SSL debug logs"
Description: Enable SSL debug logs to troubleshoot SSL handshake failures.
Implementation:
<!-- In SOAP UI, edit the SoapUI-5.x.x.vmoptions file --> -Djavax.net.debug=all
"SOAP UI SSLHandshakeException handshake_failure configure client certificate"
Description: Configure SOAP UI to use a client certificate for mutual SSL authentication.
Implementation:
<!-- In SOAP UI, configure the client certificate in Preferences --> <sslOptions> <keyStore>path/to/keystore.jks</keyStore> <keyStorePassword>yourPassword</keyStorePassword> <keyAlias>yourKeyAlias</keyAlias> </sslOptions>
ios9 tmx tableau-api file-io collision retrofit2 kendo-template tablecellrenderer color-scheme window-soft-input-mode