Discourse setup with Digital Ocean - Not sending SparkPost activation email


(Ryan French) #10
Started POST "/finish-installation/register" for 14.201.191.191 at 2016-11-08 08:25:54 +0000
Processing by FinishInstallationController#register as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"OiW5Dzgm3G5OYAvTnRM0429BTpuCfyd5ix/uC83yf5DgEBsRhbIZVtOSzZZCL5BPL24FesOhnSc4o6QQt60Smw==", "email"=>"ryan.lloyd.french@gmail.com", "username"=>"ryanfren
ch", "password"=>"[FILTERED]", "commit"=>"Register"}
Redirected to http://104.131.48.193/finish-installation/confirm-email
Completed 302 Found in 1011ms (ActiveRecord: 66.4ms)
Started GET "/finish-installation/confirm-email" for 14.201.191.191 at 2016-11-08 08:25:56 +0000
Processing by FinishInstallationController#confirm_email as HTML
  Rendered finish_installation/confirm_email.html.erb within layouts/finish_installation (8.4ms)
  Rendered common/_special_font_face.html.erb (0.5ms)
  Rendered layouts/_head.html.erb (9.7ms)
Completed 200 OK in 55ms (Views: 51.8ms | ActiveRecord: 0.0ms)

Started POST "/finish-installation/register" for 14.201.191.191 at 2016-11-08 08:41:37 +0000
Processing by FinishInstallationController#register as HTML
  Parameters: {"utf8"=>"✓", "authenticity_token"=>"5phX2D4swn3tmq7n+qk74w8vR1DiwNawC8zIBXyz/PA8rfXGg7gHRXBoaKIllZ9PTwAMsaMebO64cIIeBuyR+w==", "email"=>"ryan.lloyd.french@gmail.com", "username"=>"frenchy"
, "password"=>"[FILTERED]", "commit"=>"Register"}
Redirected to http://104.131.48.193/finish-installation/confirm-email
Completed 302 Found in 18ms (ActiveRecord: 3.8ms)
Started GET "/finish-installation/confirm-email" for 14.201.191.191 at 2016-11-08 08:41:38 +0000
Processing by FinishInstallationController#confirm_email as HTML
  Rendered finish_installation/confirm_email.html.erb within layouts/finish_installation (11.2ms)
  Rendered common/_special_font_face.html.erb (0.5ms)
  Rendered layouts/_head.html.erb (2.8ms)
Completed 200 OK in 30ms (Views: 27.2ms | ActiveRecord: 0.0ms)
Started GET "/javascripts/jquery_include.js" for 14.201.191.191 at 2016-11-08 08:41:38 +0000
ActionController::RoutingError (No route matches [GET] "/javascripts/jquery_include.js")
/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/actionpack-4.2.7.1/lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call'
Processing by ExceptionsController#not_found as */*
  Rendered exceptions/not_found.html.erb within layouts/no_ember (19.7ms)
  Rendered layouts/_head.html.erb (1.2ms)
  Rendered common/_special_font_face.html.erb (0.7ms)
  Rendered common/_discourse_stylesheet.html.erb (0.7ms)
  Rendered application/_header.html.erb (0.7ms)
  Rendered text template (0.1ms)
Completed 404 Not Found in 78ms (Views: 1.0ms | ActiveRecord: 34.0ms)
Started PUT "/finish-installation/resend-email" for 14.201.191.191 at 2016-11-08 08:42:06 +0000
Processing by FinishInstallationController#resend_email as HTML
  Parameters: {"authenticity_token"=>"CgBN0dhoSsa1/nfTHEOxEjBuFelFEKcPcEbrqoVZFlTQNe/PZfyP/igMsZbDfxW+cEFeCATOHVHD+qGx/wZ7Xw=="}
  Rendered finish_installation/resend_email.html.erb within layouts/finish_installation (2.9ms)
  Rendered common/_special_font_face.html.erb (0.5ms)
  Rendered layouts/_head.html.erb (3.8ms)
Completed 200 OK in 90ms (Views: 38.3ms | ActiveRecord: 8.7ms)

Sent mail to ryan.lloyd.french@gmail.com (1121.6ms)
no implicit conversion of nil into String subscribe failed, reconnecting in 1 second. Call stack ["/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/connection/hiredis.rb:19:in `conn
ect'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/connection/hiredis.rb:19:in `connect'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:33
6:in `establish_connection'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:101:in `block in connect'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/l
ib/redis/client.rb:293:in `with_reconnect'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:100:in `connect'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3
.3.1/lib/redis/client.rb:364:in `ensure_connected'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:221:in `block in process'", "/var/www/discourse/vendor/bundle/ruby/2
.3.0/gems/redis-3.3.1/lib/redis/client.rb:306:in `logging'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:220:in `process'", "/var/www/discourse/vendor/bundle/ruby/2.
3.0/gems/redis-3.3.1/lib/redis/client.rb:134:in `block in call_loop'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:280:in `with_socket_timeout'", "/var/www/discourse
/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:133:in `call_loop'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/subscribe.rb:43:in `subscription'", "/var/www/d
iscourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/subscribe.rb:12:in `subscribe'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:2760:in `_subscription'", "/var/ww
w/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:2138:in `block in subscribe'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:58:in `block in synchronize'",
 "/usr/local/lib/ruby/2.3.0/monitor.rb:214:in `mon_synchronize'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis.rb:58:in `synchronize'", "/var/www/discourse/vendor/bundle/ruby/2
.3.0/gems/redis-3.3.1/lib/redis.rb:2137:in `subscribe'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus/backends/redis.rb:304:in `global_subscribe'", "/var/www/discou
rse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:513:in `global_subscribe_thread'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:461:in `bl
ock in new_subscriber_thread'"]
Job exception: no implicit conversion of nil into String

(Ryan French) #11

Any update on this issue?


(Jay Pfaffman) #12

I had a similar problem with an install that I did a few days ago. It would not send mails to users, but the test mail was delivered.

I did a

./launcher rebuild app

And it started working


(Ryan French) #13

Ive run a rebuild multiple times now :frowning:

Maybe setup again…?


(cpradio) #14

Does the test email functionality work? (Admin > Emails)

If it doesn’t, does your email password have a # in it? As # is used for comments, so you’d have to put your password in single quotes to get around that (IIRC)


(mountain) #15

Possibly related.


(Jeff Atwood) #16

Excellent observation. That implies he is not on the absolute latest version. Are you on “tests-passed”? If not then you will have problems with Sparkpost.


Problems with Sparkpost email on install
(mountain) #17

@Ryan_French needs to stop the container, back up his app.yml file (if he added any changes from the default), then–as root–delete the /var/discourse folder.

Also delete the container and all images.

docker rm $(docker ps -a -q)
docker rmi $(docker images -q)

That was how I was able to fix my problem. Since this has to do with a new install perpetually in lock-out via this (fixed) Sparkpost bug; he cannot check the admin panel, cannot even login to view anything. One can obliterate the entire install without losing that anything (sans any edits to the app.yml file).

After, he can go through the process anew of making the /var/discourse folder, re-download the app and bootstrap it, launch the container. That way you know for sure the codebase is latest, with the fixed bug.


(Jeff Atwood) #18

↑ ↑ what he said.

Thank you so much for connecting the dots here @purldator I was not seeing it and this helped tremendously.


(mountain) #19


(Ryan French) #20

Just did a completely fresh build and still not working :frowning:

Followed @purldator instructions.

Any idea’s?


(Jeff Atwood) #21

Hmm too bad, that would have described your symptoms perfectly. Perhaps try switching mail providers just to see what happens?


(Ryan French) #22

Sure, that’s the next step :slight_smile:


(Ryan French) #23

Setup and correctly configured Mailgun and still not working :frowning: @codinghorror


(Régis Hanol) #24

I think a simple “rake admin:create” would have fixed that issue, wouldn’t it?

@Ryan_French did you try sending a test email like @cpradio suggested?
I think you might have misconfigured your app.yml.

If you can’t log in, just create a new admin account via

cd /var/discourse
./launcher enter app
rake admin:create

(mountain) #25

Hah. Touché.

I would still have this very particular, edge-case bug either way and would have affected all users thereafter, however.

Either direction requires the app codebase to be re-downloaded and the app itself rebuilt.

I am the type to scorch the fields first and then re-cultivate. Gets rid of any doubts to the presence of the original pestilence. *grin* (Much obliged for dispatchin’ that bug, by the way; I be likin’ the cut of yer helm there.)


(Ryan French) #26

Hey guys,

So unfortunately new users are not being sent emails for activation…

Still not sure why this is not working with Mailgun…

Please help.


(Jeff Atwood) #27

Sorry, we just don’t know, and I can’t think of anything else to try.


#28

just a thought, did you validate your sending domain?


(Jay Pfaffman) #29

What do you see here:

/admin/email/sent

and here:

/admin/email/rejected

Does SparkPost have logs that you can check?