SXI Forum

A place to collect usefull tips, tricks and implementation strategies.

You are not logged in.

#1 26-06-2020 10:47:25

StephanB
Member
Registered: 21-11-2018
Posts: 39

"Exception reading response" Error with SMTP Connector

I came across the following issue on the SMTP Connector after making the "Non Recoverable Error" to a "Recoverable Error" in the <ReturnCodes>.

The Error was gone, but sending the mails was taking a log time to got out.
After investigating the issue. I released why I got the issues.

In the SMTP connector the FromAddress is <sxi:FromAddress>noreply@ourservicedesk.com</sxi:FromAddress> and in the Data Definition the "From" was "xlayer@Client.co.za" clearly not the same. roll
I have removed the Field "From" in the Data Definition, that fixed the issue.

Log with ERROR:
06:37:31.495 - WARN  - Non Recoverable error detected but will reset connector and retry operation one more time
06:37:31.495 - WARN  - Recoverable error while creating data using connector 'SMTP' and Data Definition 'ClientEscalationEmail': javax.mail.MessagingException: Exception reading response;
  nested exception is:
java.net.SocketTimeoutException: Read timed out
06:37:31.495 - WARN  - Retrying transaction in 10 seconds (Attempt 1)
06:37:51.506 - ERROR - Got the error javax.mail.MessagingException: Exception reading response;
  nested exception is:
java.net.SocketTimeoutException: Read timed out
exceptions.ErrorProcessingException: javax.mail.MessagingException: Exception reading response;
  nested exception is:
java.net.SocketTimeoutException: Read timed out

at bin.ProcessRc.processError(ProcessRc.java:158)
at plugins.connectors.SMTP.createData(SMTP.java:378)
at plugins.connectors.SMTP.createDataAndApplyRules(SMTP.java:155)
at plugins.workflows.StandardWorkflow.processCreateData(StandardWorkflow.java:723)
at plugins.workflows.StandardWorkflow.processMappings(StandardWorkflow.java:306)
at plugins.workflows.StandardWorkflow.applyAction(StandardWorkflow.java:203)
at plugins.workflows.StandardWorkflow.access$6000(StandardWorkflow.java:56)
at plugins.workflows.StandardWorkflow$SignalRegistryProcessor.monitoredRun(StandardWorkflow.java:1740)
at za.co.sxi.concurrent.MonitoredTimerTask.run(MonitoredTimerTask.java:25)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
Caused by: javax.mail.MessagingException: Exception reading response
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2460)
at com.sun.mail.smtp.SMTPTransport.issueSendCommand(SMTPTransport.java:2337)
at com.sun.mail.smtp.SMTPTransport.finishData(SMTPTransport.java:2110)
at com.sun.mail.smtp.SMTPTransport.sendMessage(SMTPTransport.java:1316)
at plugins.connectors.SMTP.createData(SMTP.java:354)
... 9 common frames omitted
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.socketRead(Unknown Source)
at java.net.SocketInputStream.read(Unknown Source)is as fo
at java.net.SocketInputStream.read(Unknown Source)
at com.sun.mail.util.TraceInputStream.read(TraceInputStream.java:126)
at java.io.BufferedInputStream.fill(Unknown Source)
at java.io.BufferedInputStream.read(Unknown Source)
at com.sun.mail.util.LineInputStream.readLine(LineInputStream.java:106)
at com.sun.mail.smtp.SMTPTransport.readServerResponse(SMTPTransport.java:2440)
... 13 common frames omitted
06:37:51.506 - ERROR - Message for action 'SendEscalation' and connectorId 'SMTP' with ID 'X-ServiceBroker~Client_Escalation~393862490446336.71.xml'. Error: javax.mail.MessagingException: Exception reading response;
  nested exception is:
java.net.SocketTimeoutException: Read timed out
06:37:51.506 - INFO  - Marking record as processed with error
06:37:51.508 - ERROR - One or more required mappings failed, cannot process the transaction

The Field in the Data Definition:

        <sxi:Field name="From">
          <sxi:Rules>
            <sxi:Default>xlayer@Client.co.za</sxi:Default>
          </sxi:Rules>
          <sxi:OutputField>From</sxi:OutputField>
        </sxi:Field>

SMTP Connector id:

    <Connector id="SMTP" type="SMTP">
      <Connection xsi:type="sxi:SMTP">
        <sxi:Server>165.233.54.12</sxi:Server>
        <sxi:User/>
        <sxi:Password/>
        <sxi:RetryDelay>10</sxi:RetryDelay>
        <sxi:AuthType>Basic</sxi:AuthType>
        <sxi:Port>25</sxi:Port>
        <sxi:FromAddress>noreply@ourservicedesk.com</sxi:FromAddress>
      </Connection>
      <sxi:ReturnCodes>
        <sxi:Success/>
        <sxi:RecoverableError>
          <sxi:Code>^Could\snot\sconnect\sto\sSMTP\shost.*</sxi:Code>
          <sxi:Code>^.*Exception reading response.*$</sxi:Code>
        </sxi:RecoverableError>
      </sxi:ReturnCodes>
    </Connector>

I don't think you need the "From" in the Data Definition, if the FromAddress is specified in the SMTP Connector.
smile

Last edited by StephanB (27-02-2022 09:46:02)

Offline

Board footer

Powered by FluxBB