2

Am using Java SDK and Horizon Testnet.

Issue is when i submit a transaction using server.submitTransaction method i get following exception, please let me know if you need any more information

javax.net.ssl.SSLException: Received fatal alert: protocol_version

    at sun.security.ssl.Alerts.getSSLException(Unknown Source)
    at sun.security.ssl.Alerts.getSSLException(Unknown Source)

1 Answer 1

3

It looks like your problem is related to the SSL protocol versions mismatch. Stellar official Testnet Horizon instance has only TLSv1.2 enabled, while TLSv1.1, TLSv1.0, SSLv3, SSLv2 are disabled (you can check it here).

Consider switching to Java 8, they made TLSv1.2 the default SSL protocol starting with Java 8, it was TLSv1.0 in Java 7. Or you can use -Djdk.tls.client.protocols=TLSv1.2 flag to specify the protocol explicitly.

Check additional info regarding Java SSL support here.

2
  • Thank you for your reply! I am using Java 7 in the code when i have set System.setProperty("https.protocols", "TLSv1.2"); which fixed most of the stellar related issues in my code except the SubmitTransaction
    – Sang
    Commented Apr 5, 2018 at 10:38
  • 1
    It sounds like the answer helped you and might even have solved your issue. Don't forget to upvote helpful answers and if an answer solves your issue, click the ✓
    – Synesso
    Commented Apr 5, 2018 at 11:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.