In hostfile
It's like
Ip fqdn hostname
I believe that should work if maintained correctly.
Ping your fqdn and check the ip returned.
The errors that you are getting, share that too.
Make sure you have maintained them in correct profiles.
check this thread for reference: how to set fqdn name for 7.1
Regards