It seems that Grakn can't resolve the hostname of your server properly - this would be ip-172-30-4-49 from the initial error you posted.
The quick fix is to add the following line to your
/etc/hosts (as root):
The second part should be the output of the command
hostname in your terminal.
The actual issue here is your DNS resolution doesn't seem to be configured correctly so that should be fixed if possible.