I also faced a similar situation. I did the following to resolve this
On my windows machine, I modified the file under %system32%/drivers/etc/hosts to include "openam.example.com" and pointed this host to the IP of my Ubuntu server where I installed OpenAM.
On my Ubuntu machine, changed the hosts file in /etc/hosts. Here, I again added entry for "openam.example.com" and pointed it to the localhost IP.
After doing the above steps, I stopped tomcat and started it again. You might be prompted to cleanup the existing configuration, just follow the instructions in their installation guide for this particular step and then you should be good to go!
Update:
I was able to find the root cause of this issue. Looks like for some reason, the "hostname -A" command was returning a blank string and not a FQDN on my Amazon EC2 instance. On researching a bit more, I found that there was no public DNS assigned to my EC2 instance. Hence, I ended up updating the /etc/hostname file with the FQDN and rebooting the instance. The installation should go through with this fix.