Session Creation Request with BOSH

I'm trying to connect to my ejabberd-Server from a custom client (ruby with xmpp4r) and have some connection Problems.

If i try to run the client on my server's machine everthing works fine. If i run the client on another machine my eJabberd Servers returns "BOSH module not started" to the first Session Creation request, which looks like this:

body rid='1628' content='text/xml; charset=utf-8' hold='1' wait='20' to='10.0.1.1' secure='true' xmlns='http://jabber.org/protocol/httpbind'/

10.0.1.1 is my Server's IP.

now if i change this body on the machine which is 10.0.1.2 manually like this:

body rid='1628' content='text/xml; charset=utf-8' hold='1' wait='20' to='localhost' secure='true' xmlns='http://jabber.org/protocol/httpbind'/

everthing works. So it seems that in the body's "to" field has to be a "localhost" even if i am not on the servers machine.

Where's my problem?

Syndicate content