Sidekiq not running in multisite - done rebuild & reboot


(Nick Harrington) #1

I’m running 1.6.0.beta3 on http://magistrates.today/ and cannot get Sidekiq working to then clear 33k email jobs (migrating from Mandrill to SendGrid).

I’ve done an App rebuild with ./launcher rebuild app and a reboot but still cannot get Sidekiq working.
http://magistrates.today/sidekiq/retries reports that the page doesn’t exist.

Has anyone got any suggestions for troubleshooting sidekiq?
How do I manually start Sidekiq?

Nick


(Jeff Atwood) #2

In the Docker-based install, Sidekiq is pre-configured and installed correctly. Are you not using a Docker based install?


(Régis Hanol) #3

Like @codinghorror said, sidekiq is automatically started when using the docker install (which you seem to be using since you’re using the launcher to start/rebuild the application).

Could you post a screenshot of http://magistrates.today/sidekiq and http://magistrates.today/sidekiq/scheduler?


(Nick Harrington) #4

Both display the not found page:


(Régis Hanol) #5

Are you an administrator of this Discourse? Sidekiq is only visible to admins.


(Nick Harrington) #6

Certainly am.


(Jeff Atwood) #7

What are you using for email outgoing support? Is it Mandrill by any chance? What does your email tab say?


(Régis Hanol) #8

Is there anything in http://magistrates.today/logs that could be related?


(Nick Harrington) #9

Were using Mandrill. Attempting to switch over to SendGrid:

Email tab has:

Delivery Method
address smtp.sendgrid.net
port 587
user_name magistratestoday
authentication plain
enable_starttls_auto true

Logs displaying lots of stuff: http://magistrates.today/logs.

This is a Neill Lallonde install so it should be perfect!


(Jeff Atwood) #10

We should have @neil take a look then. I think something is off with the email.


(Neil Lalonde) #11

Ok I see a problem. Magistrates Today is a second site in the multisite setup. Ambay is the primary site, so that’s where sidekiq can be found. I’m rebuilding the container now and will investigate the email issue when it’s done.


(Neil Lalonde) #12

The error is:

Net::SMTPAuthenticationError: 535 Authentication failed: Bad username / password

@nickjharrington Can you check the app.yml file to see if the sendgrid username and password are correct?


(Nick Harrington) #13

Thanks @neil

Authentication is exactly the problem. I cannot find a Discourse definition of the SendGrid credentials to use.

DISCOURSE_SMTP_USER_NAME =
This could be:

  1. the SendGrid USERNAME (used to access SendGrid dashboard)
  2. the NAME given to the API KEY (e.g. discourse-general)
  3. the API KEY ID (description given to the API KEY

DISCOURSE_SMTP_PASSWORD =
4. this is the long API KEY string


(Matt Palmer) #14

Does discourse/INSTALL-email.md at master · discourse/discourse · GitHub help clarify things at all? Specifically:

SMTP server address? smtp.sendgrid.net
SMTP user name? apikey
SMTP password? [SendGrid API Key]
We recommend creating an API Key instead of using your SendGrid username and password.


(Nick Harrington) #15

This is still ambiguous.
Does “apikey” mean API KEY ID or NAME.
A bit trial and error, I’ll try rotating SendGrid values into SMTP_USER_NAME just for fun.


(Matt Palmer) #16

It means the literal string, “apikey”. Anything you’re supposed to replace with something else is in [square brackets].


(Nick Harrington) #17

DISCOURSE_SMTP_USER_NAME = apikey
DISCOURSE_SMTP_PASSWORD = ‘[70 character API KEY]’

Still fails authentication. I think I need someone with a working Discourse / SendGrid to share some tips.