Closing session due to incorrect hostname in stream header

My warn.log is flooded with the following message

2013.07.29 14:56:35 org.jivesoftware.openfire.net.SocketReader - Closing session due to incorrect hostname in stream header. Host: mg-jabber2. Connection: org.jivesoftware.openfire.net.SocketConnection@15294fd9 socket: Socket[addr=/127.0.0.1,port=35024,localport=5269] session: null

First of, I have tried to change the actual name of the server, but when I did so, I immediately lost LDAP authentication. How do I fix this issue?