Incoming mail lost & 2 errors in log


(Carlo Kok) #1

I’ve got a support mail (after updating from earlier this week) that didn’t get processed. It doesn’t show under received or rejected, but there are two weird new errors in the log (which migth or might not be related):


Job exception: undefined method `body' for [#<SidekiqLogsterReporter:0x007f3b20424228>]:Array
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:31:in `rescue in process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:24:in `process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:94:in `block (2 levels) in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:688:in `block in delete_all'
/usr/local/lib/ruby/2.0.0/net/pop.rb:687:in `each'
/usr/local/lib/ruby/2.0.0/net/pop.rb:687:in `delete_all'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:93:in `block in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:531:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:92:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:15:in `execute'
/var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'





Job exception: code converter not found (unicode-1-1-utf-7 to UTF-8)
/var/www/discourse/lib/email/receiver.rb:158:in `try_to_encode'
/var/www/discourse/lib/email/receiver.rb:149:in `fix_charset'
/var/www/discourse/lib/email/receiver.rb:120:in `select_body'
/var/www/discourse/lib/email/receiver.rb:57:in `process_internal'
/var/www/discourse/lib/email/receiver.rb:38:in `process!'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:27:in `process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:94:in `block (2 levels) in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:688:in `block in delete_all'
/usr/local/lib/ruby/2.0.0/net/pop.rb:687:in `each'
/usr/local/lib/ruby/2.0.0/net/pop.rb:687:in `delete_all'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:93:in `block in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:531:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:92:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:15:in `execute'
/var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'

what can I do? as always I can send it privately if needed.


(Carlo Kok) #2

Sidekiq says:

Jobs::PollMailbox	minder dan een minuut geleden	FAILED	173		2 minuten van nu

however I can’t seem to find any log entry related to that.

Checked the mailbox: looks like nothing is getting lost, but nothing is getting processed either.


(Jeff Atwood) #3

Something for @zogstrip to look at.


(Régis Hanol) #4

Thanks for reporting this. I just pushed a fix :mouse:


(Carlo Kok) #5

One thing that would be cool for some time in the future: Discourse doesn’t currently tell if the email poller is failing, we only found out after 24 hours of not having new support, maybe some kind of indicator when it goes down?


(Régis Hanol) #8

How did the mail poller fail?

I added a new admin dashboard check about a month ago which shows up whenever we fail to authenticate to the POP server.


(Carlo Kok) #9

It got stuck because of the issue in this thread. It didn’t process messages after this one till I deleted it


(Régis Hanol) #10

Just added another admin dashboard check, but this time it will show up when the email polling generates errors in the past 24 hours :clock1:


"Email polling has generated an error" - But Nothing in the Logs
#11

I had this same problem before you pushed the fix, but deleted the email that was causing the hold up (it was spam) and everything went back to working. When I saw that @zogstrip had pushed a fix I updated discourse. Well I think the problem reoccurred on Friday night. Another email caused incoming email to halt. Without thinking I went into the email account and deleted the oldest message. Almost immediately discourse started reading/posting/deleting the rest of the emails. In hindsight I should have kept the offending email for troubleshooting. Here are what I think are the relevant log entries…

  Message
      (150 copies reported)
  
  Job exception: undefined method `body' for [#<SidekiqLogsterReporter:0x007fbf5c726488>]:Array


  Backtrace
    /var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:31:in `rescue in process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:24:in `process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:94:in `block (2 levels) in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:688:in `block in delete_all'
/usr/local/lib/ruby/2.0.0/net/pop.rb:687:in `each'
/usr/local/lib/ruby/2.0.0/net/pop.rb:687:in `delete_all'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:93:in `block in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:531:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:92:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:15:in `execute'
/var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'

      Env
      hostnametalk-app
process_id11727
application_version67a5fc39ded9f661974b6e06b109c75b50d3a1b1
current_dbdefault
current_hostnametalk.makerspace.ca
jobJobs::PollMailbox
problem_dbdefault

opts

and

  Message
      (2993 copies reported)
  
  Job exception: undefined method `body' for [#<SidekiqLogsterReporter:0x007f76e2aa47a8>]:Array


  Backtrace
    /var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:31:in `rescue in process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:24:in `process_popmail'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:94:in `block (2 levels) in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:688:in `block in delete_all'
/usr/local/lib/ruby/2.0.0/net/pop.rb:687:in `each'
/usr/local/lib/ruby/2.0.0/net/pop.rb:687:in `delete_all'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:93:in `block in poll_pop3'
/usr/local/lib/ruby/2.0.0/net/pop.rb:531:in `start'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:92:in `poll_pop3'
/var/www/discourse/app/jobs/scheduled/poll_mailbox.rb:15:in `execute'
/var/www/discourse/app/jobs/base.rb:154:in `block (2 levels) in perform'

      Env
      hostnametalk-app
process_id93
application_version14a77aa1e0a0dec1ed378173cf4e5793f052857e
current_dbdefault
current_hostnametalk.makerspace.ca
jobJobs::PollMailbox
problem_dbdefault

opts

(Régis Hanol) #12

Thanks for reporting that, I just pushed another fix :wink: