Mastodon app not accessable after setup (DNS/newbie issue?)

This is actually the first time running an instance on Linode, so this is probably caused by something obvious I forgot/overlooked:

I created a Linode app for Mastodon; the instance was deployed and is running. I'm referring to its IPv4 address from my own name servers: mastodon.offerman.com
However, when trying to access https://mastodon.offerman.com/ over the web I get an 'Unable to connect' as it's apparently not there.

I checked DNS using dig: all fine and pointing to the IP address of the instance.

The only thing I've found is this tail in /var/log/stackscript.log:

TASK [mastodon : check DNS propogation]
FAILED - RETRYING: [localhost]: check DNS propogation (5 retries left).
FAILED - RETRYING: [localhost]: check DNS propogation (4 retries left).
FAILED - RETRYING: [localhost]: check DNS propogation (3 retries left).
FAILED - RETRYING: [localhost]: check DNS propogation (2 retries left).
FAILED - RETRYING: [localhost]: check DNS propogation (1 retries left).
fatal: [localhost]: FAILED! => {"attempts": 5, "changed": true, "cmd": "dig @8.8.8.8 +short mastodon.offerman.com", "delta": "0:00:00.053413", "end": "2022-12-20 22:42:17.648826", "msg": "", "rc": 0, "start": "2022-12-20 22:42:17.595413", "stderr": "", "stderr_lines": [], "stdout": "5.39.185.162", "stdout_lines": ["5.39.185.162"]}

NO MORE HOSTS LEFT *

PLAY RECAP *
localhost : ok=35 changed=27 unreachable=0 failed=1 skipped=0 rescued=0 ignored=0

  • cleanup
  • '[' -d /tmp/oca-deployment ']'
  • rm -rf /tmp/oca-deployment

But I think that's an issue from the time of deployment/activation, after which I configured my name server.

Any ideas/hints?

Tnx

6 Replies

I can see that your Mastodon website mastodon.offerman.com is now available and serving the nginx test page. This indicates that your Linode is effectively serving a page, but more configuration is needed. Since you are using Mastodon, you might find this Reddit thread helpful, or this guide.

From the output you provided, it seems likely that it just took some time for DNS Propagation to occur. When you update your DNS records, the changes may take up to 48 hours to take effect (although it usually happens much sooner).

As for https://mastodon.offerman.com/ not loading, this is almost certainly an issue with your SSL certificate. If you are using certbot, you should investigate any known issues with it when used with Mastodon/Nginx. You may find this thread helpful.

I was able to recreate these same error messages in my test Mastodon deployment:

TASK [mastodon : check DNS propogation] ****************************************
FAILED - RETRYING: [localhost]: check DNS propogation (5 retries left).
FAILED - RETRYING: [localhost]: check DNS propogation (4 retries left).
FAILED - RETRYING: [localhost]: check DNS propogation (3 retries left).
FAILED - RETRYING: [localhost]: check DNS propogation (2 retries left).
FAILED - RETRYING: [localhost]: check DNS propogation (1 retries left).
fatal: [localhost]: FAILED! => {"attempts": 5, "changed": true, "cmd": "dig @8.}

NO MORE HOSTS LEFT *************************************************************

PLAY RECAP *********************************************************************
localhost                  : ok=35   changed=27   unreachable=0    failed=1

+ cleanup
+ '[' -d /tmp/oca-deployment ']'
+ rm -rf /tmp/oca-deployment

I found the root cause to be a mismatch of where my DNS records were being hosted. Because my domain is being hosted on namecheap.com's default name servers, the subdomain I'm trying to use on the Linode name servers for my Mastodon instance will not propagate correctly.

root@localhost: dig ns +short pizzaparty.cool
dns1.namecheaphosting.com.
dns2.namecheaphosting.com.

root@localhost: dig ns +short masto.pizzparty.cool
[no output]

The solution to this is to host your domain with Linode. Once you've changed your domain's name servers your subdomain will then resolve properly and you will be able to connect to your Mastodon instance.

My suggestion would be to delete the Linode with the broken configurations and create a new one. It should save you some time.

Thank you both for your replies. Turned out that the initialization was interrupted by the correct DNS records being not yet available (since I had to wait for the IP address of the instance to come back).

Setting a delegation specifically for the mastodon host from my zone to the Linode name servers did the job. After deleting/recreating the instance everything works fine now.

Thanks again!

It is possible to fix this after your DNS records have been updated with your normal hosting provider. After the Marketplace installation fails, follow these steps:

  • Open this link to the Linode script used by the Mastodon Marketplace install: https://github.com/linode-solutions/mastodon-oca/blob/main/deployment_script/stackscript.sh
  • Inside your Linode dashboard, click StackScripts on the left sidebar, then Create StackScript in the top right corner.
  • Give your script a label, select Debian 11 as your target image, and then paste the contents from the stackscript.sh link above into the field labeled Script.
  • Open your broken Linode instance, and choose Rebuild.
  • In the first field, choose From Account StackScript.
  • Choose the script you created earlier, then follow the Mastodon prompts that appear below.
  • Rebuild, wait, then your Mastodon instance should be ready.

I'm confused by what this means:

"Setting a delegation specifically for the mastodon host from my zone to the Linode name servers did the job."

Does this mean that instead of following Linode's instructions on how to add a Domain here, we wait to find out the IP address of our Linode (the one that gets created when we run StackScript to install Mastodon) and put that somewhere else?

Reply

Please enter an answer
Tips:

You can mention users to notify them: @username

You can use Markdown to format your question. For more examples see the Markdown Cheatsheet.

> I’m a blockquote.

I’m a blockquote.

[I'm a link] (https://www.google.com)

I'm a link

**I am bold** I am bold

*I am italicized* I am italicized

Community Code of Conduct