Unable to connect (bad_namespace_prefix) when XMPP domain != system hostname!

Hi,

I just setup my Openfire 3.4.2 (also tried with Openfire 3.4.1 yesterday) server using a MySQL DB. It runs on a server with the hostname vz102.igowo.de and should handle the XMPP-Domain igowo.de, so I can create a user like user@igowo.de.

Unfortunately I can’t connect using Miranda or Spark 2.4.8 - I always get the following error in the Openfire log:

2007.12.07 11:07:09

Closing session due to bad_namespace_prefix in stream header. Prefix: jabber:client. Connection: org.jivesoftware.openfire.net.SocketConnection@102c002 socket: Socket[http://addr=/123.123.123.123,port=50075,localport=5269] session: null

I made a Wireshark packet trace:

Spark sends:

<stream:stream to=“igowo.de” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams” version=“1.0”>

Openfire answers:

<?xml version=‘1.0’ encoding=‘UTF-8’?>

<stream:stream from=“igowo.de” id=“4nm5d” xmlns=“jabber:client” xmlns:stream=“http://etherx.jabber.org/streams” version=“1.0”>

<stream:error xmlns:stream=“http://etherx.jabber.org/streams”>

<bad-namespace-prefix xmlns=“urn:ietf:params:xml:ns:xmpp-streams”/>

</stream:error>

</stream:stream>

xmpp.domain is setup to “igowo.de”, SRV-Records are all setup on the domain and igowo.de even resolves to the same IP as vz102.igowo.de, so why do I get this error?

Thank you in advance,

Philipp

bump

We really want to use Openfire and evaluate the Enterprise Plug-in but we can’t even connect to the server (I tried with every client I could find).

Okay, some additional information:

Version: Openfire Enterprise 3.4.2

Server Directory: /opt/openfire-3.4.2

Server Name: igowo.de

Java Version: 1.6.0_03 Sun Microsystems Inc. – Java HotSpot™ Server VM

Operating system: Debian Etch 4.0 32bit

I still get the error and can’t evaluate my Enterprise Evaluation License

Okay, I reinstalled now and used the hostname of the computer (vz102.igowo.de) as XMPP-domain. Now it works perfectly. But I don’t want to use the jabber server with such a domain. This has to be a bug and I’m willing to help you debug it, but atleast an answer would be nice

Hi,

the xmpp.domain has nothing to do with the hostname. And the hostname seems to be fine, otherwise you would get an error like “Closing session due to incorrect hostname in stream header. Host: …”.

The namespace “jabber:client” is fine but still Opefire logs that it’s not so I wonder what’s going on. I have no idea about the XML Pull Parser which is used there, maybe it has a timing problem. But this would not explain why the full host name works for you.

LG

What do you mean with the xmpp.domain has nothing to do with the hostname? If I change the xmpp.domain to igowo.de and connect to vz102.igowo.de, I get the “Closing session due to incorrect hostname in stream header. Host: …” error. The only constellation which works is xmpp.domain = vz102.igowo.de and then connecting to vz102.igowo.de.

I couldn’t figure the real problem out yet and it seems that no one of the developers cares about it. I searched Google for this message, some people also came across it but no one knew a solution.

I’ll monitor this thread for new messages and try proposed solutions. Openfire Enterprise + Spark would be exactly what we need, but if it doesn’t work, it’s of no help

Hi,

my “hostname” command returns “xxxxxxxx.xxxxxx.xxx” while my xmpp.domain within Openfire is set to “xx.xx.xx” (every x represents one random character).

Using the wrong name as the xmpp domain returns indeed the “Closing session due to incorrect hostname in stream header. Host: …” error. But this is according to your first post not the problem. You are using “igowo.de” as xmpp.domain and the client uses it. So you don’t get this error but “Closing session due to bad_namespace_prefix in stream header. Prefix: jabber:client. …”.

I did take a look at the source code http://www.igniterealtime.org/fisheye/browse/svn-org/openfire/trunk/src/java/org /jivesoftware/openfire/net/SocketReader.java?r=7872#l387 - xpp.getNamespace(null) in lines 402 and 413 return “jabber:client” but it seems that it returns something else when called in line 391. It may help to debug this.

I also wonder why line 353 looks like “String host = reader.getXPPParser().getAttributeValue(”", “to”);" and not like “String host = xpp.getAttributeValue(”", “to”);" but this should not be related to this problem.

LG