Mastodon error 422 Mastodon::HostValidationError Trying to Connect to PeerTube Instance on the same server

I have searched the forum for similar issues

on

This category is for issues regarding specific apps, NOT general issues with YunoHost.

on

This form is written in English :uk: but feel free to write in French :fr: if you’re more comfortable!

on

What type of hardware are you using

Old laptop or computer

What YunoHost version are you running

11.2.31

What app is this about

Mastodon

Describe your issue

Using Mastodon, I am trying to follow my account on PeerTube. Both, of course, are on the same server. But Mastodon returns the error:

422 Mastodon::HostValidationError

I tried the solution posted in Trouble following WriteFreely blog from Mastodon instance on same server and added the following string to my /var/www/mastodon/live/.env.production:

ALLOWED_PRIVATE_ADDRESSES=xx.xx.xx.xx

Where the x’s are my actual ip address, of course. That didn’t change anything for me; I received the same 422 error.

Share relevant logs or error messages

Mastodon error 422 Mastodon::HostValidationError

Just to be sure, did you restart Mastodon services?

I hadn’t, because I’m kind of new to all of this. So I looked up how to do that, and I did the following:

  • systemctl start mastodon-sidekiq.service
  • systemctl start mastodon-streaming.service
  • systemctl start mastodon-web.service
    

… with hopeful anticipation. But sadly, same result. :frowning_face:

for your information you can also use the webadmin to restart services : Tools → services → Mastodon → Restart

lol… I can’t believe I missed that! But I’m newish, so thank you for that. Still the same results though.

Okay, adding back 127.0.0.1 and THEN restarting services did the trick. I’m learning! Thanks for the pointer!

So, to summarize, /var/www/mastodon/live/.env.production needs the following line added, where xx.xx.xx.xx is your actual IP address:

ALLOWED_PRIVATE_ADDRESSES=xx.xx.xx.xx,127.0.0.1

Then restart all three mastodon services in Tools → services → Mastodon → Restart

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.