I used to get this same “Unable to resolve host” error a lot, when setting up debian servers (not so much anymore). I used to get this error so often, I made a development note about it, in my Apple Notes app. When I opened that note, I was reminded that there used to be a script you needed to run, after changing:
However, I believe that script has now been replaced with the following command:
sudo service hostname start
…which should allow you to test by issuing the following command:
…which should output your newly assigned hostname. I suggest though, you may need to test the output of the last command, after restarting your server.