You are viewing [info]daredavil2014's journal

Previous Entry

Openfire 3.7.0 S2S problem resolved

Hello every one.
Sorry for my english, but the scence of the post is worth reading.
Many people expirience troubles with Openfire jabber server 3.7.0, when they are trying to make server to server connections.

In error Log you could see something like this:
at org.jivesoftware.openfire.net.BlockingReadingMode.run(BlockingReadingMode.java:76)
at org.jivesoftware.openfire.net.SocketReader.run(SocketReader.java:137)
at java.lang.Thread.run(Unknown Source)
2011.09.13 12:04:58 Can't process DNS lookup!
javax.naming.CommunicationException: DNS error [Root exception is java.net.SocketTimeoutException: Receive timed out]; remaining name '_jabber._tcp.*'

And very many errors about DNS reccords. But no DNS configuration could help.

In warning log you could see something like:
2011.09.14 12:44:38 Error trying to connect to remote server: com(DNS lookup: com:5269)


The main problem is next:
http://issues.igniterealtime.org/browse/OF-443

But today it is not fixed yet, and when it should be fixed i don't know :(
There is few opinions what need to do, what patch could fix this bug, and after quite a bit debug i fixed it on my version, tested on Centos 5.6.


So manual what to do is next (if you have linux, and you are lazy, don't read first 5 steps, just download file in link):

0. install ant and java package (on centos #yum install ant java)
1. download source code from a site (version 3.7.0)
2. unzip it
3. find file ./src/java/jivesoftware/openfire/ServerDialback.java
4. On line 216 change source code, after changing it should be:

            // Send to the Receiving Server a stream header
            StringBuilder stream = new StringBuilder();
            stream.append("<stream:stream");
            stream.append(" xmlns:stream=\"http://etherx.jabber.org/streams\"");
            stream.append(" xmlns=\"jabber:server\"");

            stream.append(" to=\"").append(remoteDomain).append("\"");
            stream.append(" from=\"").append(localDomain).append("\"");
            stream.append(" xmlns:db=\"jabber:server:dialback\">");

            connection.deliverRawText(stream.toString());


5. Buld project, to do this go to the root of archive, and find directory build. there should be file build.xml. You need to be in the directory with file build.xml, and run (from root)
        
            #ant

After that in the directory target should appear openfire.jar.
6. You need to copy this file into you openfire directory (by default /opt/openfire/lib/).
And restart openfire service.
For all worked fine, all messages to another servers goes without a problem.

And one more, those from you who disabled dialback, you need to enable it.

I hope someone helped my post.

Already compiled file openfire.jar for linux:
http://depositfiles.com/files/dn2krhqqj

If the links wouldn't work, please, write a letter to devil@softcom.lv, and i'll send you this file.

Profile

[info]daredavil2014
daredavil2014

Latest Month

September 2011
S M T W T F S
    123
45678910
11121314151617
18192021222324
252627282930 
Powered by LiveJournal.com
Designed by Lilia Ahner