Pentaho

 View Only

 PDI mail component error with TLS1.2

Ram Ch's profile image
Ram Ch posted 10-18-2023 01:06

Hi Team,

I am getting below error while sending email in Kettle 8.2..

javax.mail.AuthenticationFailedException: 220 Ready to start TLS

javax.mail.MessagingException: Could not convert socket to TLS;
  nested exception is:
    javax.net.ssl.SSLHandshakeException: No appropriate protocol (protocol is disabled or cipher suites are inappropriate)

Recently my company has changed smtp from TLS 1 to TLS1.2.. and based on what I have read TLS1.2 is not supported in kettle.

I have tried after changing Secure Connection type to TLS as well but still same error.

Appreciate your inputs.

-Ram

Petr Prochazka's profile image
Petr Prochazka

Hi,

IMHO this is about configuration of JRE. Client and server can not agree on used cipher.

Which version of JRE are you used?

You can try run job with debug level. Java mail transport set debugging and you can be see more information in log file.

Or you need enable SSL logging in JRE and check what it's wrong.

Ram Ch's profile image
Ram Ch

I have enabled detailed log and don't see anything else apart from the error indicate above.

Please note smtp server is setup on AWS.

Petr Prochazka's profile image
Petr Prochazka

Detailed log level is not enough. You have to set Debug log level. If not see any info in log file (as default Java Mail logs to standard out), try run PDI in console via SpoonConsole.bat.

Or set system property for enable TLS logging. You can start here howto.

David Hurtado's profile image
David Hurtado
Good day,
Solve the problem.
It had the PDI 8.0 version and used the "mail-1.4.7.jar" library, apparently it is outdated for the new version of the SMTP mail servers.
I tested the same email sending KTR in PDI 9 version and the email was sent without errors.
In PDI 9.0 and find the mailer JAR in the LIB folder of the Pentaho installation directory "javax.mail-1.6.1.jar", delete the file "mail-1.4.7.jar" from PDI 8 and Copy the file "javax.mail-1.6.1.jar" to the lib folder of POI 8.
Restart Pentaho and run ktr with no mail sending errors.
I attach the Jar that worked for me.

Spanish Versión
Buen día, 
Solucione el inconveniente.
Tenía la versión PDI 8.0 y utilizaba la librería  "mail-1.4.7.jar" al parecer esta desactualizada para la nueva versión de los SMTP de servidores de correo.
Probé el mismo KTR de envió de correos en la versión PDI 9 y se envió el correo sin errores.
En el PDI 9.0 y busque el JAR de envió de correos en la carpeta LIB del directorio de instalación de Pentaho "javax.mail-1.6.1.jar", elimine el archivo "mail-1.4.7.jar" del PDI 8 y copie el archivo "javax.mail-1.6.1.jar" en la carpeta lib del PDI 8.
Reinicie Pentaho y ejecute el ktr sin errores de envío de correo. 
Adjunto el Jar con el que me funciono