E-mail errors - log duplication & two /log errors

So, I’ve grouped these because they seem to be related, but if I need to split this up let me know, I won’t be offended.

I am on latest as of now (i.e. post @zogstrip’s commit from here: Duplicate Meta digest emails this morning), using Mandrill with generally no problems, and am seeing the following issues:

As shown in the first 10 entries above, duplication of logs. This in in admin/email/sent. I’m trying to verify right now whether or not duplicate emails are being sent out as well (found while writing this: it looks like it’s just a duplicate log, not actually a duplicate email). The duplicate entry has a blank user field. Duplicate log entries don’t appear in admin/email/skipped, but sporadic blank user fields do.

The blank entries below those ten are all digest emails, all missing a user but with appropriate email addresses.

Prior to zogstrip’s commit referenced above, all of the email logs were showing up with blank user fields. This started happening after I received this error in /logs late Wednesday (with 4 corresponding failed email jobs in sidekiq):

Message (4 copies reported)

Job exception: SSL_connect SYSCALL returned=5 errno=0 state=SSLv3 read finished A
Backtrace

/usr/local/lib/ruby/2.0.0/net/smtp.rb:586:in `connect'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:586:in `tlsconnect'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:563:in `do_start'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:520:in `start'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/mail-2.6.3/lib/mail/message.rb:2141:in `do_delivery'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/mail-2.6.3/lib/mail/message.rb:236:in `block in deliver'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.5.1/lib/action_mailer/base.rb:543:in `block in deliver_mail'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.5.1/lib/action_mailer/base.rb:541:in `deliver_mail'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/mail-2.6.3/lib/mail/message.rb:236:in `deliver'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.5.1/lib/action_mailer/message_delivery.rb:85:in `deliver_now'
/var/www/discourse/lib/email/sender.rb:131:in `send'
/var/www/discourse/app/jobs/regular/user_email.rb:42:in `execute'
/var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'
Env

hostname	sih.onemadogre.com-app
process_id	22034
application_version	8aea75edecc468d04918e13db6924b7da6b1107b
current_db	default
current_hostname	sih.onemadogre.com
job	Jobs::UserEmail
problem_db	default
opts	
type	digest
user_id	[225, 114, 216, 105]
current_site_id	default

I also have this error sitting around, which caused again a Sidekiq UserEmail job to fail:

Message

Job exception: end of file reached
Backtrace

/usr/local/lib/ruby/2.0.0/net/protocol.rb:153:in `read_nonblock'
/usr/local/lib/ruby/2.0.0/net/protocol.rb:153:in `rbuf_fill'
/usr/local/lib/ruby/2.0.0/net/protocol.rb:134:in `readuntil'
/usr/local/lib/ruby/2.0.0/net/protocol.rb:144:in `readline'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:932:in `recv_response'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:918:in `block in getok'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:942:in `critical'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:916:in `getok'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:824:in `helo'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:604:in `do_helo'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:556:in `do_start'
/usr/local/lib/ruby/2.0.0/net/smtp.rb:520:in `start'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/mail-2.6.3/lib/mail/message.rb:2141:in `do_delivery'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/mail-2.6.3/lib/mail/message.rb:236:in `block in deliver'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.5.1/lib/action_mailer/base.rb:543:in `block in deliver_mail'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `block in instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.1/lib/active_support/notifications/instrumenter.rb:20:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/activesupport-4.2.5.1/lib/active_support/notifications.rb:164:in `instrument'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.5.1/lib/action_mailer/base.rb:541:in `deliver_mail'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/mail-2.6.3/lib/mail/message.rb:236:in `deliver'
/var/www/discourse/vendor/bundle/ruby/2.0.0/gems/actionmailer-4.2.5.1/lib/action_mailer/message_delivery.rb:85:in `deliver_now'
/var/www/discourse/lib/email/sender.rb:131:in `send'
/var/www/discourse/app/jobs/regular/user_email.rb:69:in `execute'
/var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'
Env

hostname	sih.onemadogre.com-app
process_id	4733
application_version	5b8817cc70377ffc1f806a6bb005a5d7d667dee2
current_db	default
current_hostname	sih.onemadogre.com
job	Jobs::UserEmail
problem_db	default
opts	
type	user_posted
user_id	115
notification_id	21710
current_site_id	default

But this appears to occur and clear sporadically (e.g. not just this week) and happened earlier in the week, so possibly not related.

Please let me know if there’s any more information I can provide to improve this report, or if these issues were actually (largely) fixed by the now thrice referenced zogstrip commit and I just need to chill. Last few days have been hectic and without a lot of sleep so a bit fading in and out of consciousness at the moment, feel like I’m forgetting something. :slight_smile:

3 Likes

Thanks for the report :+1:. My fix was indeed creating unnecessary email logs…

https://github.com/discourse/discourse/commit/96380bfd3803cb7c6b1d26e5b48b7a3dfb40b8ce

4 Likes