Problem Sending Email

Hello,

I am trying to send an email using Siren platform 10.3.3. In the investigate.yml I have added this configuration:

sentinl:
#app_name: ‘Siren Alert’
settings:
email:
active: true
user: ddelpozo@dxc.com
password: xxxxxxxxx
host: smtp.office365.com
port: 25
ssl: false
tls: false
authentication: [‘PLAIN’, ‘LOGIN’, ‘CRAM-MD5’, ‘XOAUTH2’]
timeout: 35000 # mail server connection timeout

I use port 25 as is the only port opened for mails in the customer server. When I try to send an email with a customized watcher I get this error:

{
  "@timestamp": "2020-01-31T04:28:21.151Z",
  "error": true,
  "report": false,
  "watcher": "Report_Diario_Prueba",
  "action": "Email alarm",
  "level": "high",
  "message": "ActionError: email action:send email:connection encountered an error",
  "type": "sentinl-alarm",
  "_index": "watcher_alarms-2020.01.31",
  "id": "4Vfb-W8Bqgx00yH1Xykj"
}

Anyone knows if I need to install XPACK plugin or how can I solve this problem?

Thank you in advance for your answers.

Best regards,
David.

Hi David,

Can you please share the server logs? Specifically, the logs around the time when this error occurred.

Hello,

This is the log at the time when I try to execute an email action in a watcher:

log [07:10:00.002] [info][Siren Alert][scheduler] watcher 03824ea0-4762-11ea-a381-c5eba2cdeeaf: executing
log [07:10:00.014] [info][Siren Alert][scheduler] watcher 2e43c870-4763-11ea-a381-c5eba2cdeeaf: executing
log [07:10:00.016] [info][Siren Alert][watcher_handler] executing
log [07:10:00.036] [info][Siren Alert][watcher_handler] successfully applied condition
log [07:10:00.043] [info][Siren Alert][watcher_handler] successfuly executed
log [07:10:00.062] [warning][Siren Alert][watcher_handler] no data satisfy condition
log [07:10:00.244] [info][Siren Alert] processing html email
log [07:10:10.471] [error][Siren Alert] Prueba: html email action:send email:timedout while connecting to smtp server: Error: timedout while connecting to smtp server
at module.exports (C:\Program Files\siren-platform-no-data-no-security-10.3.3-windows-x86_64\siren-investigate\siren_plugins\sentinl\node_modules\emailjs\smtp\error.js:3:13)
at Socket.timedout (C:\Program Files\siren-platform-no-data-no-security-10.3.3-windows-x86_64\siren-investigate\siren_plugins\sentinl\node_modules\emailjs\smtp\response.js:32:29)
at Object.onceWrapper (events.js:273:13)
at Socket.emit (events.js:182:13)
at Socket.EventEmitter.emit (domain.js:441:20)
at Socket._onTimeout (net.js:453:8)
at ontimeout (timers.js:436:11)
at tryOnTimeout (timers.js:300:5)
at listOnTimeout (timers.js:263:5)
at Timer.processTimers (timers.js:223:10)

I have tried many different configurations but I have not been able to send it.

Thank you for your help.

Best regards,
David.

The error suggests that application times out while connecting to the smtp server. I see that you are using smtp.office365.com as the host and tls is set to false. I am not sure if that’s correct. I tried using the same host and I set the tls to true and I removed the port config (so that it defaults to port 587) and I could successfully send an email. (Reference: https://www.saleshandy.com/smtp/office-365-smtp-settings/)

That is why I think its problem with the configuration you are using. If the tls configuration doesn’t work for you, can you also try ports 465 and 25 with ssl set to true.

Also, out of curiosity, are you able to send emails using the same config from any other application in your infrastructure?

Hello,

I have been finally able to send an email with a SMTP server configured locally in the server where I have installed Siren. My problem is now trying to send a report action. My question is:

  • In the configuration for reports:
    active: true
    executable_path: 'C:\Program Files (x86)\Google\Chrome # path to Chrome v59+ or Chromium v59+
    timeout: 5000

This executable path is the path where I have Google Chrome installed but I can not launch now Siren with this configuration. Should I put Chrome in another path?

Thank you in advance for your support.

Best regards,
David.

Hello,

Sorry, the problem here was on me. I have been able to launch Siren with the correct configuration for report.

Anyway, the report action doesn’t work, I get this error:

When I go to: https://github.com/puppeteer/puppeteer/blob/master/docs/troubleshooting.md

In can found this information:

Chrome headless doesn’t launch on Windows

Some chrome policies might enforce running Chrome/Chromium with certain extensions.

Puppeteer passes --disable-extensions flag by default and will fail to launch when such policies are active.

To work around this, try running without the flag:

const browser = await puppeteer.launch({ ignoreDefaultArgs: [’–disable-extensions’], });

I don’t if this could solve my problem but I don’t know where puppertees is launched.

Do you know something about how to solve this problem?

Thank you for your help.

Best regards,
David.

Hi,

This issue has been resolved in version 10.4.0, thanks.

Kind regards,
Daniel.