Project

General

Profile

Cannot connect to Tigase Server via BOSH

David Pilkington
Added over 3 years ago

I have the default installation of Tigase XMPP server installed, literally nothing but the name of the server was changed. I can connect to it via an XMPP client but as soon as I try a web client like Sure.im and Tigase.im, it doesnt connect.

I also cannot find the config file anywhere to check the settings.

Please, any help will be appreciated.


Replies (8)

Added by Daniel Wisnewski IoT 1 Cloud over 3 years ago

Hello David,

BOSH connections should be enabled by default so as long as the BOSH url is correct is should connect. However, looking at the logs can be handy to see if you are making a connection.

Tigase has a few config and log files

in /etc folder there is init.properties, and tigase.conf. Init.properties has a number of internal settings for Tigase, I would recommend adding the line 'debug=server' to enable debug logging, which is usually enabled by default, but can create verbose logs to get some information from. Tigase.conf is more like external environment settings, although less important to your issue, it's still something to pay attention too if there are more errors.

Under /logs, you will have tigase.log.0 (which will grow until it reaches it's max size, then will be tigase.log.1 and so on) which logs the output you would see in a console window. For more verbose details, look at tigase-console.log these might give you some information (in pretty plain language) to what is happening in the server when you try to connect VIA BOSH.

Added by David Pilkington over 3 years ago

Thank you for the reply.

Could you give me an idea what the BOSH URL is meant to look like?

I have tried

http://<>:5280

http://<>:5280/http-bind

http://<>:5280/xmpp-http-bind

I cant find it anywhere in the documentation or the config

Added by Daniel Wisnewski IoT 1 Cloud over 3 years ago

http://<>:5280/http-bind is the standard format for a BOSH URL.

if you can monitor the traffic (via an XML console) for that, you should see an open connection request like the one here

http://xmpp.org/extensions/xep-0206.html#initiate

that should give you some feedback either serverside or clientside.

Added by David Pilkington over 3 years ago

Is there a tool that I can use to monitor these connections? Is there one built into Tigase or a third party one that you can recommend?

Added by David Pilkington over 3 years ago

I used wireshark and this is what I get from Sure.im

it seems to be missing the "from" parameter. Why would this be the case?

My xmpp domain name is tigase and my username is admin so I am attempting to login as admin@tigase

Is this correct?

Avatar?id=6023&size=32x32

Added by Artur Hefczyc TigaseTeam over 3 years ago

If you use sure.im/tigase.im web service to connect to your installation then using domain "tigase" will not work. You need a publicly accessible domain with a public IP address, otherwise the sure.im service have no way to make a network connection to your server.

Please note, if you installed Tigase form our dist-max binaries, the web client is included in the installation by default and you can use it to connect to your local system.

Added by David Pilkington over 3 years ago

so the domain needs to resolve to a public IP and I need to provide the BOSH URL as well? What is the point of the URL if the domain needs to resolves?

I have attached a screengrab of what I am trying to log in with.

Added by Andrzej Wójcik IoT 1 CloudTigaseTeam over 3 years ago

As I saw on screenshot that you used domain name I used telnet to connect to your Tigase XMPP Server using BOSH port 5280 and sent what catched using Wireshark.

In response I received following stanza:

<body xmlns="http://jabber.org/protocol/httpbind" xmlns:stream="http://etherx.jabber.org/streams" from="tigase" hold="1" polling="10" xmpp:version="1.0" xmlns:xmpp="urn:xmpp:xbosh" inactivity="10" host="tigase.tigase.a5.internal.cloudapp.net" requests="2" sid="c27e8dba-4627-4dfa-8fb8-ea82f0434d9b" ack="7856466" authid="7b6910a9-17ef-4ad8-8f7f-84cf2bce5949" wait="30" ver="1.6" maxpause="10" secure="true"/>

In this body element you can see that server sent tigase.tigase.a5.internal.cloudapp.net as host attribute. This attribute is used only by Tigase XMPP Server and Jaxmpp-GWT library used by Sure.IM/Tigase.IM sites. If value of host attribute do not match name of server which sent this body stanza then next request is sent to server which name is host attribute's value. This is used mostly in clustered environments to implement functionality similar to see-other-host but for BOSH.

In your case Tigase XMPP Server sent name/hostname of server which it gets from DNS or from system setting (this is in your case tigase.tigase.a5.internal.cloudapp.net@). Due to this fact Sure.IM/Tigase.IM are trying to sent next requests to @tigase.tigase.a5.internal.cloudapp.net which I suppose they cannot be reached from your web browser. This is root cause of this issue.

To fix this you can:

  • change hostname of server running Tigase XMPP Server to name which would be resolvable by DNS and accessible from web browser*

  • add following line to etc/init.properties file of Tigase XMPP Server to stop server from sending host attribute which will stop Sure.IM/Tigase.IM from being redirected

bosh/send-node-hostname[B]=false

    (1-8/8)