Not getting registration email with sparkpost

(Gina Patterson) #1

Hi there -
I have run through everything in the troubleshooting guide and still cannot get that registration email to send.

In Sparkpost mail, it shows that an email was blocked last night when I tried to register, but nothing today (I have tried twice to register). The reason it shows is:
550 5.7.1 Unconfigured Sending Domain <>

I changed the custom commands at the end of app.yml to this:
## If you want to set the ‘From’ email address for your first registration, uncomment and change:
## After getting the first signup email, re-comment the line. It only needs to run once.
- exec: rails r “SiteSetting.notification_email=‘’”

When I look at the production log, I see this:

Sent mail to (509.7ms)
Error connecting to Redis on localhost:6379 (Errno::ECONNREFUSED) subscribe failed, reconnecting in 1 second. Call stack ["/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/r
edis/client.rb:345:in `rescue in establish_connection'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/redis-3.3.1/lib/redis/client.rb:331:in `establish_connection'", "/var/www/discours
e/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/lib/redis/client.rb:293:in `with_re
connect'", "/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/clien
t.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/g
ems/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.r
b:43:in `subscription'", "/var/www/discourse/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/www/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/mess
age_bus-2.0.2/lib/message_bus/backends/redis.rb:304:in `global_subscribe'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:513:in `global_subscribe_t
hread'", "/var/www/discourse/vendor/bundle/ruby/2.3.0/gems/message_bus-2.0.2/lib/message_bus.rb:461:in `block in new_subscriber_thread'"]

Sparkpost mail shows sending domain is “ready to send”.

DNS is configured

Haaaaalp! I’m soooo close!

(Sam Saffron) #2

This is concerning, are you out of memory? Discourse will not function correctly if redis is not running.

(Gina Patterson) #3

How would I check that?

(Sam Saffron) #4

running free -h on the host is a good start, there should be quite a few topics on meta regarding memory.

(Gina Patterson) #5
              total        used        free      shared  buff/cache   available
Mem:           992M        611M         89M         21M        291M        164M
Swap:          2.0G         47M        2.0G

(Gina Patterson) #6

I destroyed my droplet and started over. It’s working now!

(Andrew Gervais) #7

Hey All

Sorry to necro this thread, but I am also getting the same error 6379 in my log, I destroyed my droplet and started over like @Gina_Patterson but I’m still getting the same message. My free -h check reads

total used free shared buff/cache available
Mem: 992M 575M 107M 19M 309M 196M
Swap: 2.0G 38M 2.0G

I have gone through the email registration trouble shooting guide - no avail…

Curiously my sparkpost records show my emails having 100% rejection because:

“550 5.7.1 Unconfigured Sending Domain”

I HAVE verified the domain via DKIM and abuse@/postmaster@… however I’m not sure what I still need to configure. I’m using alternate SMTP port 2525 in the app.yml because I heard google blocks 587. (I’m trying to send my registration email to a paid g suite account).

Any help would be greatly appreciated. I did try to exhaust all other options before asking for help here thanks.


(Andrew Gervais) #8

I destroyed my droplet and rebuilt it using mailgun for a smtp server, works fine now! Cheers all.