問題描述
WEBAPP本地運行正常,但是上傳到伺務器 GPS打卡失敗
- 應用後臺報錯
javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate) at com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1972) at com.sun.mail.smtp.SMTPTransport.protocolConnect(SMTPTransport.java:642) at javax.mail.Service.connect(Service.java:317) at javax.mail.Service.connect(Service.java:176) at javax.mail.Service.connect(Service.java:125) at javax.mail.Transport.send0(Transport.java:194) at javax.mail.Transport.send(Transport.java:124)
解決方法總結
1 jdk目錄/jre/lib/security/java.security,去掉jdk.tls.disabledAlgorithm中的SSLv3、TLSv1、TLSv1.1
2 執行以下命令
update-crypto-policies --set LEGACY