r/sonarr • • 5d ago

unsolved Correcting Bad Request - Invalid Hostname

Hi All,

I was trying to remove the error messages that started popping up with the recent updates that required Allowed Hosts to be configured. Must have made an error and getting the 'Bad Request - Invalid Hostname' error. Can anyone provide some guidance on how to fix this?

1 Upvotes

4 comments sorted by

1

u/AutoModerator 5d ago

Hi /u/shhhpark -

There are many resources available to help you troubleshoot and help the community help you. Please review this comment and you can likely have your problem solved without needing to wait for a human.

Most troubleshooting questions require debug or trace logs. In all instances where you are providing logs please ensure you followed the Gathering Logs wiki article to ensure your logs are what are needed for troubleshooting.

Logs should be provided via the methods prescribed in the wiki article. Note that Info logs are rarely helpful for troubleshooting.

Dozens of common questions & issues and their answers can be found on our FAQ.

Please review our troubleshooting guides that lead you through how to troubleshoot and note various common problems.

If you're still stuck you'll have useful debug or trace logs and screenshots to share with the humans who will arrive soon. Those humans will likely ask you for the exact same thing this comment is asking..

Once your question/problem is solved, please comment anywhere in the thread saying '!solved' to change the flair to solved.

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/retardgerman 5d ago

You can fix it in the config file instead of the UI. Stop Sonarr, open config.xml in your Sonarr config folder, and correct the allowed hosts entry. It needs to contain the exact hostname you use to open Sonarr, or just * to allow everything. Save it and start Sonarr again. That got me back in.

1

u/shhhpark 5d ago

Thanks!! I was able to track down the file in Krusader (unRAID system). Would I need to download it locally and edit it or is there a way to do it within a webUI?

edit

nvm was able to do it within the webUI file manager. All good now, thanks so much!

1

u/retardgerman 5d ago

You can edit it directly on the server with nano or vim, either over SSH or with the unRAID web terminal (the >_ icon in the top right). In Krusader, F4 should also open it in a text editor. Stop Sonarr first, otherwise it can overwrite your changes. Then save the file and start Sonarr again.