Troubleshooting
Problem
By default there is a 10 second timeout configured for the SMTP server used by API Connect.
In cases when the mail server is slower to respond, the timeout triggers invalidating the invitation. The mail might still deliver to the recipient, but the invitation link is broken due to the timeout.
Symptom
When the mail is sent, you might see a notification like
“A Server Error occurred Error sending mail message using server named Name-of-the-mail-server (Name of the mail server) with host example.mailserver.com and port nn (timeout) 400”
Similar logs also appear in the apim pod log:
For example
2020-10-15T07:31:22.448Z bhendi:error [transaction ID] Error in POST post:/api/consumer-orgs/:org/:catalog/:consumerorg/member-invitations (member_invitation.js:create) - status : 400 - message: Error sending mail message using server named Name-of-the-mail-server (Name of the mail server) with host example.mailserver.com and port nn (Timeout). - stack : Error: Error sending mail message using server named Name-of-the-mail-server (Name of the mail server) with host example.mailserver.com and port nn (Timeout). ... - errors : undefined: { "status": 400, "message": [ "Error sending mail message using server named Name-of-the-mail-server (Name of the mail server) with host example.mailserver.com and port nn (Timeout)." ]
After you click the Activation link for an invitation that timed out, you might see a notification message like: 'Invitation not accepted Not found 400'.
Resolving The Problem
If you have a mail server that responds slower than 10 seconds, you can modify the timeout associated with the SMTP server with the following steps by using the API Connect toolkit CLI:
1. Log in to the admin console:
./apic login -s <mgmt-server-name> -r admin/<user-registry> -u <admin-user>
2. Get the name of the smtp server:
./apic mail-servers:list -s <mgmt-server-name> -o admin --fields name
3. Retrieve the mail server configuration. This action creates a yaml file in the directory where you ran the command.
./apic mail-servers:get <mail-server-name> -s <mgmt-server-name> -o admin
4. Edit the <mail-server-name>.yaml file and change the timeout value.
5. Update the configuration with the modified yaml file.
./apic mail-servers:update <mail-server-name> <mail-server-name>.yaml -s <mgmt-server-name> -o admin
6. Verify that the change was taken into account:
./apic mail-servers:list -s <mgmt-server-name> -o admin --fields name,timeout
Further information about installing the toolkit is documented in the knowledge center page Installing the Toolkit:
https://www.ibm.com/support/knowledgecenter/SSMNED_2018/com.ibm.apic.toolkit.doc/tapim_cli_install.html
Document Location
Worldwide
Was this topic helpful?
Document Information
Modified date:
02 March 2020
UID
ibm15222541