legacy-knowledge-base
公開されました Jul. 2, 2025

Forms の電子メール通知で見られる「ソケットを TLS に変換できませんでした」というエラーを解決する方法

written-by

Tony Ng

How To articles are not official guidelines or officially supported documentation. They are community-contributed content and may not always reflect the latest updates to Liferay DXP. We welcome your feedback to improve How To articles!

While we make every effort to ensure this Knowledge Base is accurate, it may not always reflect the most recent updates or official guidelines.We appreciate your understanding and encourage you to reach out with any feedback or concerns.

legacy-article

learn-legacy-article-disclaimer-text

問題

  • フォームの電子メール通知が有効になっている場合、フォームの送信後に電子メールが受信されません。
  • ログに次のエラーが表示されます。
2021-08-02 14:10:29.458 ERROR [liferay/mail-1][MailEngine:128] Unable to send message: Could not convert socket to TLS
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at sun.security.provider.certpath.SunCertPathBuilder.build(SunCertPathBuilder.java:141)
at sun.security.provider.certpath.SunCertPathBuilder.engineBuild(SunCertPathBuilder.java:126)
at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:280)
at sun.security.validator.PKIXValidator.doBuild(PKIXValidator.java:392)
at sun.security.validator.PKIXValidator.engineValidate(PKIXValidator.java:302)
at sun.security.validator.Validator.validate(Validator.java:260)
at sun.security.ssl.X509TrustManagerImpl.validate(X509TrustManagerImpl.java:324)
at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:229)
at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:124)
at sun.security.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1596)
at sun.security.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:216)
at sun.security.ssl.Handshaker.processLoop(Handshaker.java:1052)
at sun.security.ssl.Handshaker.process_record(Handshaker.java:987)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1072)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1385)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1413)
at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1397)
at com.sun.mail.util.SocketFetcher.configureSSLSocket(SocketFetcher.java:626)
at com.sun.mail.util.SocketFetcher.startTLS(SocketFetcher.java:553)
at com.sun.mail.smtp.SMTPTransport.startTLS(SMTPTransport.java:2150)

Environment

  • DXP 7.0
  • DXP 7.1
  • DXP 7.2

解決策

  • 回避策 - TLS が正しく構成されておらず、サーバー管理のメール設定で「StartTLS を有効にする」がチェックされている場合、上記のエラーがスローされます。 「StartTLS を有効にする」のチェックを外すと、暗号化がバイパスされ、電子メールを受信できるようになります。
  • 「StartTLS を有効にする」が機能するためには、TLS が適切に構成されていることを確認してください。 一般的なチェックは、メール サーバー証明書が有効であるか、有効期限が切れていないことを確認することです。
      1. 証明書プロバイダーから信頼チェーンを取得し、証明書をサーバーに保存します。
      2. 次のコマンドを使用して (証明書ごとに)、証明書を Java キーストア * にインポートします。
          • <JAVA_HOME>/keytool -import -alias <aliasname> -keystore /path/to/keystore -file /path/to/certificate
          • * デフォルトの場所は <JAVA_HOME>/jre/lib/security/cacertsです
      3. キーストアにパスワードを提供する
  • TLS が適切に構成されたら、「StartTLS を有効にする」を再度有効にして、暗号化を許可できます。

追加情報

  • セキュリティの脆弱性に関する懸念から、 Liferay はインバウンド接続 に対して TLS 1.0 を無効にし、TLS 1.1 以降をサポートすることを決定しました。 そのため、サーバー管理者は展開構成を確認し、必要に応じて調整して、より高い TLS プロトコル バージョンを有効にする必要がありました。

did-this-article-resolve-your-issue

legacy-knowledge-base