S2S - Openfire 3.5.2 / Jabberd14

Hi, I have two XMPP servers on the same network, no firewalls in the way, both can resolve each other’s server name via DNS. Telnet to port 5269 from either server works fine. Openfire - S2S is enabled and the remote server name (remoteserver.domain.co.uk in this example, obviously not its real name) is whitelisted. However I can’t get an S2S connection to it. From the Openfire side if I add a contact’s JID in Spark (2.6.0 Beta 2), the Openfire log shows -

2008.11.04 08:41:11 [org.jivesoftware.openfire.session.LocalOutgoingServerSession.createOutgoingSes sion(LocalOutgoingServerSession.java:259)] Error trying to connect to remote server: remoteserver.domain.co.uk(DNS lookup: remoteserver.domain.co.uk:5269)
java.net.ConnectException: Connection refused
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(Unknown Source)
at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
at java.net.PlainSocketImpl.connect(Unknown Source)
at java.net.SocksSocketImpl.connect(Unknown Source)
at java.net.Socket.connect(Unknown Source)

So that looks like the Jabberd server is bouncing the connection. It then tries again, but this time dropping the “remoteserver” - so just to “domain.co.uk”, and again all the way down to just “uk” - obviously these connections fail with an “unable to resolve” error. No idea why it’s doing this.

There are no arguments in the jabber.xml file so ALL connections should be accepted. This is the s2s section in the jabber.xml file, looks perfectly normal to me.

./dialback/dialback.so 50 50 4 1 -5 50

I realise this is not a question entirely about Openfire but if anyone has any ideas I’d be glad to hear them!


“java.net.ConnectException: Connection refused”, suggests the network connection could not be made. Does tcpdump show network traffic? Do OPF and Jabberd use the same S2S protocol? If, instead of Jabberd, you installed a second instance of OPF and tried S2S communication would that work? That would rule out any kind of network issues, and isolate the problem to being a pure OPF-JBD S2S communication issue. If you are concerned DNS is not resolving, perhaps you could configure it to use the IP addresses instead.

Typically the OPF Server Domain Name setting (aka xmpp.domain), has various services attached to this as a base name. For example if you had the OPF file transfer proxy enabled, chat clients would specify this service as ‘proxy.domain.co.uk’, and similarly for other services (e.g. directory, conference, search, etc.).