Finished a large migration and "password recovery" doesn't work for my users / Test email yes

email

(Cy) #1

I’ve finished a 1M posts VB migration which I am intending to do a tutorial for :slight_smile: since it took me a good research time that I want to minimize for others…

Anyways, straight to the point is that when I do the test emails, it works (using Mandrill) but when my user(s) try to recover their emails, those emails never reach. Checking mandrill and discourse log and nothing there either… It’s like these never get tried to be sent as I can see the test emails on the log but not the other recovery ones.

Where could I look to diagnose?

Best regards,


(Cy) #2

In addition when I try to grant administration or moderation to any of the users in the database I get an error saying that it wasn’t possible to do that.

I also tried a rebuild of discourse but that didn’t help.

New user registrations doesn’t trigger an email either… it just works when you test send one.

I appreciate any hint where to look at.


(Jeff Atwood) #3

Check /logs in the browser


(Cy) #4

Thank you @codinghorror but in there I get only errors of these type:

Failed to pull hotlinked image: http://img530.imageshack.us/img530/8976/jtaob3.jpg 404 Not Found /usr/local/lib/ruby/2.0.0/open-uri.rb:353:in `open_http' /usr/local/lib/ruby/2.0.0/open-uri.rb:709:in `

No trace of an additional error… it’s like phantom as it doesn’t shows there nor in the ADMIN-EMAIL-SENT


(Cy) #5

Is there anything else I could try or look at, please? My desk is full of pulled out hair. It actually worked before the import since I gained admin like that… but not now. Nothing has been added like plugins, hacked in etc…


(Cy) #6

Still trying to figure out what’s the problem. To me this could be a bug because of the following facts:

1.- Email is perfectly configured with Mandrill. It works when sending out a test mail. It also did work perfectly to send out the recover email for the password of the admin.
2.- After two days of continuous import while the emails where automatically disabled by Discourse.
3.- After a successful import without the recover email doesn’t works, but it does the test emails at all times.
4.- In addition to that, I can’t grant admin or moderator to any users. It troughs an error via web saying that the task can’t be performed.
5.- I’ve also tried rebuilding the app with launcher rebuild app without any luck
6.- web logs and email logs under admin don’t show error or sucess or anything related to the email but it does with the recovery email.


(Sam Saffron) #7

Is sidekiq working are jobs queued and not processed


(Cy) #8

Thanks for your reply @sam

Seems you hit the nail in the head

I guess that’s a post process of the import?

Are test emails not sidekiq’ed? How could I check if my emails are queued there?


(Sam Saffron) #9

give it time to empty its queue, 500k jobs should only take 12 hours, depending.

your email jobs are very likely at the end of the queue.


(Cy) #10

That’s excellent. Thanks for this Sam.


(Sam Saffron) #11

Feel free to test out the “accept answer” button :smile:


(Cy) #12

I will Sam, let me wait until the queue finishes if that’s OK and I’ll update the topic and accept. Additionally I’ll add this to my tutorial.


(Cy) #13

It did work Sam! The issue was that the queue never ended as the large migration was causing async additional queries that were added to the queue. I stopped the “crawl remote images” and that queue started to clearup.

The problem with the “set administrator/moderator” still persists and when I check the logs I get the following:

ActiveRecord::RecordInvalid (Validation failed: Name has already been taken)

Any idea why?


(Cy) #14

You can close this. I can open a new topic for this query. Many thanks for the help


(RĂ©gis Hanol) #15