This situation happened once before (in January), and restarting Discourse “fixed” it. But due to the very nature of the problem, there’s no good way to stay informed about whether there is a problem or not. In this episode, emails have not been sent since March 28, which is not great.
After some Googling, this appears to be a Ruby or a Ruby->Linux issue. However, my expertise is not with Ruby and so I don’t feel optimistic about digging into this one on my own.
Does anyone have a quick fix or at least some things to try? Thanks in advance.
P.S. I am still experiencing another Discourse bug and I had originally thought these 2 problems were unrelated—but maybe that is not the case?
Hi @Falco + @fantasticfears. Thanks a lot for your responses. I got email working again after a little effort today.
Adding the --dns options in /etc/default/docker and restarting docker with sudo service docker restart did work. I was able to open a /bin/bash inside the Discourse container and execute ping smtp.mandrillapp.com successfully. However, I was not able to send a test email within the Discourse web UI.
The next thing I tried was adding the same --dns options to docker_args inside my app.yml. I also added 8.8.8.8 and 8.8.4.4 to /etc/resolv.conf inside the Discourse container as my nameservers. (There were some Linode nameservers in there. I remembered that I followed some Linode-specific instructions when installing Docker in the first place. So, I likely have a nonstandard Docker install…this may be the root of my problems.) After making those changes, I executed /var/discourse/launcher rebuild app on my host.
After Discourse came back up, I was able to send the test email successfully. This also upgraded my Discourse install, solving my other problem as a bonus!
Thanks again for your replies, you definitely got me on the right track.