"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 laterInformation in this document applies to any platform.
Symptoms
Considering an environment composed of:
- One Oracle Data Integrator Cloud Service (ODICS) machine <IP ADDRESS 1>, with ODI Studio installed... and
- Another Database Cloud Service (DBCS) machine <IP ADDRESS 2> with the SMTP server listening on port <PORT>...
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:
- Open /etc/postfix/main.cf
- Search /inet_interfaces line and comment localhost, un-comment all:
- 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 |