Your xmpp domain name is as your old fqdn and xmpp client is logging into a domain, not into hostname. It worked before as your xmpp domain and fqdn were the same. You need to change your xmpp domain, but doing this on working server might be problematic (users can have contacts which were added using old domain name and such contacts won't update if you rename the domain).
I opened openfire.xml and changed the setup to "false", then reran the setup and used the domain I wanted and it is working fine now. Thread can be closed.