Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PeerTube does not start if SMTP server is down #3457

Closed
gramakri opened this issue Dec 11, 2020 · 0 comments · Fixed by #3458
Closed

PeerTube does not start if SMTP server is down #3457

gramakri opened this issue Dec 11, 2020 · 0 comments · Fixed by #3458

Comments

@gramakri
Copy link
Contributor

Describe the current behavior

If the SMTP server is down, peertube does not start.

Steps to reproduce:

  1. SMTP server down
  2. Restart peerTube
  3. PeerTube does not start

Describe the expected behavior

PeerTube can log an error on startup

Additional information

This was discovered on PeerTube package on Cloudron but it applies to all deployments. In the case below, it was an authentication failure.

Logs:

[pt.cloudron:443] 2020-12-11 19:29:03.949 info: Testing SMTP server...
[pt.cloudron:443] 2020-12-11 19:29:03.990 info: Connection established to 172.18.0.5:2525 {
  "component": "smtp-connection",
  "sid": "u8aWDNRV4Yw",
  "tnx": "network",
  "localAddress": "172.18.18.229",
  "localPort": 54806,
  "remoteAddress": "172.18.0.5",
  "remotePort": 2525
}
[pt.cloudron:443] 2020-12-11 19:29:05.011 info: User "pt.app@cloudron" failed to authenticate {
  "component": "smtp-connection",
  "sid": "u8aWDNRV4Yw",
  "tnx": "smtp",
  "username": "pt.app@cloudron",
  "action": "authfail",
  "method": "PLAIN"
}
[pt.cloudron:443] 2020-12-11 19:29:05.015 error: Failed to connect to SMTP mail:2525. {
  "err": {
    "stack": "Error: Invalid login: 535 5.7.8 Authentication failed\n    at SMTPConnection._formatError (/app/code/server/node_modules/nodemailer/lib/smtp-connection/index.js:784:19)\n    at SMTPConnection._actionAUTHComplete (/app/code/server/node_modules/nodemailer/lib/smtp-connection/index.js:1523:34)\n    at SMTPConnection.<anonymous> (/app/code/server/node_modules/nodemailer/lib/smtp-connection/index.js:550:26)\n    at SMTPConnection._processResponse (/app/code/server/node_modules/nodemailer/lib/smtp-connection/index.js:942:20)\n    at SMTPConnection._onData (/app/code/server/node_modules/nodemailer/lib/smtp-connection/index.js:749:14)\n    at Socket.SMTPConnection._onSocketData (/app/code/server/node_modules/nodemailer/lib/smtp-connection/index.js:195:44)\n    at Socket.emit (events.js:310:20)\n    at addChunk (_stream_readable.js:286:12)\n    at readableAddChunk (_stream_readable.js:268:9)\n    at Socket.Readable.push (_stream_readable.js:209:10)\n    at TCP.onStreamRead (internal/stream_base_commons.js:186:23)",
    "message": "Invalid login: 535 5.7.8 Authentication failed",
    "code": "EAUTH",
    "response": "535 5.7.8 Authentication failed",
    "responseCode": 535,
    "command": "AUTH PLAIN"
  }
}
@gramakri gramakri changed the title Peertube does not start if SMTP server is down PeerTube does not start if SMTP server is down Dec 11, 2020
gramakri added a commit to cloudron-io/PeerTube that referenced this issue Dec 11, 2020
just log a warning if the SMTP server is down on startup time

fixes Chocobozzz#3457
Chocobozzz pushed a commit that referenced this issue Dec 12, 2020
just log a warning if the SMTP server is down on startup time

fixes #3457
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant