Could not connect to SMTP host: mail.address.com, port: 25;

0 Likes

StarTeam Notification Agent appears to be working but when attempting to send a mail triggered by a change in the workflow, the following error occurs and no emails are sent.

javax.mail.MessagingException: Could not connect to SMTP host: mail.address.com, port: 25;

nested exception is:
java.net.SocketException: Network is unreachable: connect

Sending mail through the CPC is successful, using the same mail server address.

The reason this occurs is that the machine running the Notification Agent is using Java 7. Java 7 defaults to use IPv6 which results in the Notification Agent never finding the mail server. 

To resolve this make the following changes to the notificationagent.stjava64 file;

  1. Locate the line

    options=-Xmx256m
     
  2. Amend this line to be

    options=-Xmx256m -Djava.net.preferIPv4Stack=true
     
  3. Save the file

This switch forces Java and the Notification Agent to search using IPv4.

Comment List
Related
Recommended