Why does my CLI JAR or WAR file deployment fail with an SSLException?

Issue

Deploying with the heroku war:deploy or heroku jar:deploy commands fails with an error like:

Exception in thread "main" javax.net.ssl.SSLException: Received fatal alert: protocol_version
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:208)
        at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
        at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)
        ...

Resolution

This error happens because your locally Java environment is trying to connect to the Heroku API with TLS v1.0, which is no longer supported. You'll need to update your local Java Development Kit (JDK) to either Java 8 or a newer build of Java 7.

Oracle has ended its support for Java 7 and no longer provides public updates. However, you can use the open source Zulu distribution from Azul (which is built from OpenJDK) if you wish to remain on Java 7.

Ask on Stack Overflow

Engage with a community of passionate experts to get the answers you need

Ask on Stack Overflow

Heroku Support

Create a support ticket and our support experts will get back to you

Contact Heroku Support