SSL_connect SYSCALL on e-mail confirmation message

Hello!

I am new to Discourse and have just recently installed it on my server. I’m using an external SMTP provider for sending e-mails and have verified to 100% that the input credentials in the configuration file are correct.

However, upon sending the message I get this error in the production log:

Job exception: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A

I need help pinpointing where it breaks (as google results are difficult to relate to Discourse). Is this something related to the server side regarding SSL or is it an error on the SMTP provider’s part? What actions should I take? I have set TLS to true and my SMTP provider supports this.

Thanks for your help!

What’s your e-mail configuration look like? There’s a mismatch in SSL settings between you and your provider. It’s important to remember that TLS (SMTPS) and STARTTLS are very different things.

1 Like

Hey again,

Okay, then I understand. I have verified that my provider supports STARTTLS. What exactly do you mean by my e-mail configuration? I’m not really sure how Discourse sends its messages so it’s probably indeed something wrong on my side. What TLS version does Discourse require?

Discourse makes no particular demands around TLS versions; whatever OpenSSL supports, we’ll use. Your e-mail configuration is all of the env vars starting with DISCOURSE_SMTP in your container definition (/var/docker/containers/*.yml, typically app.yml).

A little curious on this, I see the exact same error in my logs, except it’s only about once a week

Job exception: SSL_connect SYSCALL returned=5 errno=0 state=SSLv2/v3 read server hello A

This is the stack trace:

/usr/local/lib/ruby/2.5.0/net/protocol.rb:44:in `connect_nonblock'
/usr/local/lib/ruby/2.5.0/net/protocol.rb:44:in `ssl_socket_connect'
/usr/local/lib/ruby/2.5.0/net/pop.rb:553:in `do_start'
/usr/local/lib/ruby/2.5.0/net/pop.rb:531:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:41:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:16:in `execute'
/var/www/discourse/app/jobs/base.rb:137:in `block (2 levels) in perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/rails_multisite-2.0.4/lib/rails_multisite/connection_management.rb:63:in `with_connection'
/var/www/discourse/app/jobs/base.rb:127:in `block in perform'
/var/www/discourse/app/jobs/base.rb:123:in `each'
/var/www/discourse/app/jobs/base.rb:123:in `perform'
/var/www/discourse/app/jobs/base.rb:185:in `perform'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_scheduler-0.8.1/lib/mini_scheduler/manager.rb:81:in `process_queue'
/var/www/discourse/vendor/bundle/ruby/2.5.0/gems/mini_scheduler-0.8.1/lib/mini_scheduler/manager.rb:29:in `block in initialize'

It appears to be related to a the pop3 mailbox (which is gmail). Any idea what this might be?