"Closing session due to incorrect hostname in stream header."

I’‘ve been setting up Wildfire for finesse.ac.uk, and have hit a snag; while it’‘s not a major issue for this install, it’'s something I want to know why is happening, as it will be an issue for other installs we have planned.

I added SRV records to the DNS, for xmpp-client and xmpp-server pointing to jabber.finesse.ac.uk. On the server jabber.finesse.ac.uk, I told Wildfire it was handling the domain finesse.ac.uk (specifically, set the xmpp.domain property to “finesse.ac.uk”). Connected to the server, and noticed the following showing up in warn.log:

2006.08.30 16:04:53 Closing session due to incorrect hostname in stream header. Host: jabber.finesse.ac.uk. Connection: org.jivesoftware.wildfire.net.SocketConnection@1b06a21 socket: Socket[addr=/,port=47844,localport=5269] session: null

2006.08.30 16:06:05 Closing session due to incorrect hostname in stream header. Host: jabber.finesse.ac.uk. Connection: org.jivesoftware.wildfire.net.SocketConnection@15af049 socket: Socket[addr=/,port=60455,localport=5269] session: null

2006.08.30 16:09:59 Closing session due to incorrect hostname in stream header. Host: jabber.finesse.ac.uk. Connection: org.jivesoftware.wildfire.net.SocketConnection@5b28c9 socket: Socket[addr=/,port=60457,localport=5269] session: null

So, apparently the server is connecting from itself, to itself. Not only that, but it’‘s sending jabber.finesse.ac.uk as the to. I could be wrong (in fact, the question here really is, am I wrong), but shouldn’'t Wildfire be:

  1. Realising that it’'s servicing finesse.ac.uk, and therefore not attempt to connect to a different server for the domain?

  2. Sending finesse.ac.uk as the to part of the header?

Or is it just me?

Message was edited by: rnicoll

Hey J Ross,

So your Wildfire’'s domain is finesse.ac.uk and you have a DNS SRV entry that points finesse.ac.uk to jabber.finesse.ac.uk. In that case users accounts will be of the form johndoe@finesse.ac.uk. Wildfire will treat JIDs whose domain is finesse.ac.uk as local entities and anything else as a remote entity (except for local components that are a mix). Based on the logged info I would say that someone is using a JID like this johndoe@jabber.finesse.ac.uk thus Wildfire tries to establish a remote connection to that server. Just as a coincidence jabber.finesse.ac.uk is resolved to jabber.finesse.ac.uk so it ends up in the same server but Wildifire will reject the operation saying that (from the XMPP point of view) he is not jabber.finesse.ac.uk but finesse.ac.uk.

In summary, make sure that local JIDs are using finesse.ac.uk and not jabber.finesse.ac.uk as their domain.


– Gato

Good idea, had a similar thought, but it’‘s definitely showing up when I connect, and I’'m telling Spark to use finesse.ac.uk as server, so unless Spark is being odd…

I’‘ll have a dig around, see if I can find any more hints about what’'s going wrong…

Edited to add - nevermind, you were, basically, right. Looks like a Spark bug, not a Wildfire one; telling Spark not to auto-determine the server, or using a different client, both appear to solve the problem.

Message was edited by: rnicoll