Jobs::HandledExceptionWrapper: Wrapped SocketError: getaddrinfo: Name or service not known

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.

5 Likes