Closing session due to incorrect hostname in stream header

All my warn logs are full of:

Closing session due to incorrect hostname in stream header. Host: messenger. Connection: socket: Socket[addr=/,port=58469,localport=5269] session: null

It looks like a S2S error, but gmail and a few independent jabber domains are working fine with our server…

I found an old archived thread with an unanswered post, and wanted to bring this up again.

As far as i can tell it’‘s not affecting the server but i’'d like to have it resolved…

Thanks again,


I see these in my logs too. About 3-12 per hour. I have just setup a test system with very little usage on it so far. Is this anything to be concerned about?


Have you all read Server To Server HowTo’s and find anything helpful there?

Hi everyone

I got the same problem too. After an Upgrade of my system I guess.

Here is the error:

2010.05.16 11:57:22 Accepting self-signed certificate of remote server: [ejabberd]
2010.05.16 11:58:51 Closing session due to incorrect hostname in stream header. Host: Connection: socket: Socket[addr=/,port=46931,localport=5269] session: null
2010.05.16 11:58:51 Error returning error to sender. Original packet:

org.jivesoftware.openfire.PacketException: Cannot route packet of type IQ or Presence to bare JID:

at org.jivesoftware.openfire.spi.RoutingTableImpl.routePacket(RoutingTableImpl.jav a:217)
at org.jivesoftware.openfire.server.OutgoingSessionPromise$PacketsProcessor.return ErrorToSender(
at org.jivesoftware.openfire.server.OutgoingSessionPromise$

Do you have any idea why ?

Now, I cannot connect to any server or even within my server in local…

Thank you for your help.


I don’t think that you have the same problem and posting a new thread instead of reviving an old one may be much better.

Who does use “localhost” as the server name? A packet containing `from="morgan@localhost"´ may cause trouble.



Yes may be I should.

If don’t resolve my problem soon, I will post a new thread.

Who use morgan@localhost…well, it’s my account, but normally it is as usually…The configuration of my account in Pidgin seems fine…