My Oracle Support Banner

"com.sun.mail.util.MailConnectException: Couldn't connect to host" Is Received when Invoking OdiSendMail from ODICS Server, while the SMTP Server is on a Different Machine (Doc ID 2569418.1)

Last updated on APRIL 01, 2024

Applies to:

Oracle Data Integrator Cloud Service - Version 17.2.1 and later
Information in this document applies to any platform.

Symptoms

Considering an environment composed of:

The following error is received when trying to send mail from ODICS using the OdiSendMail tool and SMTP server from DBCS:

com.sun.mail.util.MailConnectException: Couldn't connect to host, port: <IP ADDRESS 2>, <PORT>; timeout -1;

During investigation, it has been identified that on the DBCS machine when running "sudo netstat -plunt", in the output for port <PORT> only the localhost 127.0.0.1:<PORT> is showing as used.

So the following actions have been performed to resolve the above:

  1. Open  /etc/postfix/main.cf
     
  2. Search /inet_interfaces line and comment localhost, un-comment all:
       
  3. Restart the SMTP server using terminal command "service postfix restart"

However, after these changes, a new error is received when re-attempting to send mail from ODICS using the OdiSendMail tool:

Caused By: javax.mail.SendFailedException: Invalid Addresses;
nested exception is:
com.sun.mail.smtp.SMTPAddressFailedException: 554 5.7.1 <MAIL ADDRESS>: Relay access denied

Changes

 

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.