Email Transport Error trustAnchors parameter must be non-empty

Trying to setup email alerts, but encountered a weird error:

An error occurred while trying to send an email! (triggered 7 minutes ago)

The Graylog server encountered an error while trying to send an email. This is the detailed error message: org.apache.commons.mail.EmailException: Sending the email to the following server failed : smtp.gmail.com:587 (javax.mail.MessagingException: Could not convert socket to TLS; nested exception is: javax.net.ssl.SSLException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty)

Here is my server.conf email section:

# Email transport
transport_email_enabled = true
transport_email_hostname = smtp.gmail.com
transport_email_port = 587
transport_email_use_auth = true
transport_email_auth_username = email@gmail.com
transport_email_auth_password = pass
transport_email_subject_prefix = [Log Alerts]
transport_email_from_email = reports@domain.com

# Encryption settings
#
# ATTENTION:
#    Using SMTP with STARTTLS *and* SMTPS at the same time is *not* possible.

# Use SMTP with STARTTLS, see https://en.wikipedia.org/wiki/Opportunistic_TLS
transport_email_use_tls = true

Can anyone tell me what that error means?

Hi @erasedhammer

“trustAnchors parameter must be non-empty” is a slightly generic message in java.

Possible problems that cause this error is:

  • empty
  • not found
  • couldn’t be opened
    • (due to wrong/missing trustStorePassword
      or
    • file access permissions

Hope it helps :slight_smile:

1 Like

Interesting.
I have no idea how to fix this.

UPDATE:
Accidentally left the java trust store in my java options in /etc/default/graylog-server
Removed that and restarted, now the email works :+1:

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.