question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

SMTP notification test fails. "Lost connection to the socket server"

See original GitHub issue

⚠️ Please verify that this bug has NOT been raised before.

  • I checked and didn’t find similar issue

🛡️ Security Policy

Description

When configuring SMTP notification all goes well until I want to perform a test of the connection. This results in the following text showing in a red bar:

Lost connection to the socket server. Reconnecting...

Sometimes (about one in three times) it will also show this after the first one:

Cannot connect to the socket server. [Error: websocket error] Reconnecting...

The notification modal will not progress after this, showing a infinite spinning “save” button: image

It’s possible to close the modal with the ❌ at the right top, but when you reopen it, it’s still spinning. Refreshing the page let’s you try again.

Looking in the browser console I see:

Content Security Policy: This site (https://up.example.com) has a Report-Only policy without a report URI. CSP will not block and cannot report violations of this policy. 2
Content Security Policy: The page’s settings observed the loading of a resource at wss://up.example.com/socket.io/?EIO=4&transport=websocket (“default-src”). A CSP report is being sent. vendor.f2e417fe.js:55:57144

I see a similar issue mentioned in #143 so I checked the TLS versions of NodeJS and the server I’m connecting to. For NodeJS I see this uses openssl: '1.1.1m+quic'. This should support TLSv1.3. The mailserver is also offering a TLSv1.3 certificate.

👟 Reproduction steps

I’m not sure what steps were relevant for coming to this result, so I’ll be a bit broad:

  • Install uptime Kuma via Yunohost
  • create a few monitors
  • create a notification based on SMTP
    • (I tried with both security options, and with “ignore TLS error” checked and unchecked.)
  • Click test

👀 Expected behavior

A test email gets sent. Or a error is shown explaining what went wrong

😓 Actual Behavior

See description

🐻 Uptime-Kuma Version

1.11.3

💻 Operating System and Arch

Debian GNU/Linux 10 (buster)

🌐 Browser

96.0 (64-bit)

🐋 Docker Version

Unsure, I’m using Yunohost

🟩 NodeJS Version

‘16.14.0’

📝 Relevant log output

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
louislamcommented, Feb 15, 2022
0reactions
github-actions[bot]commented, Sep 25, 2022

This issue was closed because it has been stalled for 2 days with no activity.

Read more comments on GitHub >

github_iconTop Results From Across the Web

"Smtp error: Failed to connect to server" - Causes and Fixes
"SMTP ERROR: Failed to connect to server" mainly happens because of mail server connectivity issues, wrong port settings etc.
Read more >
SMTP Connection Problems when delivering Email Notifications
When PaperCut NG tries to deliver email notifications and/or reports, the following error can occur when there are problems connecting to ...
Read more >
How to solve the “SMTP Error: Failed to connect to server” Error?
1. SMTP restrictions on the server. Servers impose restrictions on the programs that can connect directly with remote servers and send an email....
Read more >
SMTP errors and reply codes - turboSMTP
SMTP errors and reply codes ; 111. Connection refused or inability to open an SMTP stream. This error normally refers to a connection...
Read more >
Email Notification Error - TechNet - Microsoft
while testing I get a connect to server failed message. After checking the logs I saw the error message: ERROR: Connect to SMTP...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found