Skip navigation
9582 Views 19 Replies Latest reply: Jun 30, 2010 3:34 PM by hollowpt RSS
amullen Bronze 19 posts since
Aug 28, 2008
Currently Being Moderated

Aug 28, 2008 7:19 AM

Pidgin randomly disconnecting from Openfire

Hello,

 

We're having a handful of users who are reporting random disconnects from our Openfire server. The common theme seems to be that they're all using pidgin. This was happening in both Openfire 3.5.2 and the newest version of Openfire 3.6.0. Here's the stack trace I see in the logs when someone gets disconnected:

 

java.lang.IllegalArgumentException: IQ must be of type 'set' or 'get'. Original IQ: <iq type="result" id="xxx-xxx" to="servername.xxx.com" from="user@server.xxx.com/Home"><query xmlns="http://jabber.org/protocol/disco#info"><identity category="client" type="pc" name="pidgin"/><feature var="jabber:iq:last"/><feature var="jabber:iq:oob"/><feature var="jabber:iq:time"/><feature var="xmpp:urn:time"/><feature var="jabber:iq:version"/><feature var="jabber:x:conference"/><feature var="http://jabber.org/protocol/bytestreams"/><feature var="http://jabber.org/protocol/disco#info"/><feature var="http://jabber.org/protocol/disco#items"/><feature var="http://jabber.org/protocol/muc"/><feature var="http://jabber.org/protocol/muc#user"/><feature var="http://jabber.org/protocol/si"/><feature var="http://jabber.org/protocol/si/profile/file-transfer"/><feature var="http://jabber.org/protocol/xhtml-im"/><feature var="urn:xmpp:ping"/><feature var="http://www.xmpp.org/extensions/xep-0199.html#ns"/><feature var="http://jabber.org/protocol/mood"/><feature var="http://jabber.org/protocol/mood+notify"/><feature var="http://jabber.org/protocol/nick"/><feature var="http://jabber.org/protocol/nick+notify"/><feature var="http://jabber.org/protocol/tune"/><feature var="http://jabber.org/protocol/tune+notify"/><feature var="http://www.xmpp.org/extensions/xep-0084.html#ns-metadata"/><feature var="http://www.xmpp.org/extensions/xep-0084.html#ns-data"/><feature var="http://www.xmpp.org/extensions/xep-0084.html#ns-metadata+notify"/></query></iq>
        at org.xmpp.packet.IQ.createResultIQ(IQ.java:355)
        at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:104)

        at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:68)
        at org.jivesoftware.openfire.net.StanzaHandler.processIQ(StanzaHandler.java:311)
        at org.jivesoftware.openfire.net.ClientStanzaHandler.processIQ(ClientStanzaHandler .java:79)
        at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:276)
        at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:175)
        at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:133)
        at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:570)
        at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)
        at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)
        at org.apache.mina.common.IoFilterAdapter.messageReceived(IoFilterAdapter.java:80)

        at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)
        at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)
        at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:58)
        at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:185)
        at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:299)
        at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:53)
        at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:648)
        at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :239)
        at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:283)

        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
        at org.apache.mina.util.NamePreservingRunnable.run(NamePreservingRunnable.java:51)
        at java.lang.Thread.run(Unknown Source)

 

Any ideas?

  • Daryl Herzmann KeyContributor 849 posts since
    Mar 12, 2005
    Currently Being Moderated
    Aug 28, 2008 10:32 AM (in response to amullen)
    Re: Pidgin randomly disconnecting from Openfire

    Hi,

     

    I routinely see that error with my pidgin users, but I don't believe it produces a disconnection.  Are you sure about that association?

     

    Wanna try setting xmpp.client.idle to -1 on the Server settings of the admin console and see if that helps your disconnects?

     

    daryl

      • Daryl Herzmann KeyContributor 849 posts since
        Mar 12, 2005
        Currently Being Moderated
        Aug 28, 2008 4:24 PM (in response to amullen)
        Re: Pidgin randomly disconnecting from Openfire

        Hi,

         

        The server config setting will only take effect for *new* connections.  Are you still seeing disconnects after clients newly connect after the config setting change?

         

        Otherwise, please consider starting one of your pidgin clients with the -d flag and see if you can trace what is happening.

         

        daryl

          • Daryl Herzmann KeyContributor 849 posts since
            Mar 12, 2005
            Currently Being Moderated
            Sep 4, 2008 8:14 AM (in response to amullen)
            Re: Pidgin randomly disconnecting from Openfire

            Hi,

             

            There are some issues that can cause trouble with Pidgin and Openfire.  In fact, you will find my name a lot in the Pidgin bug trac referencing some of these problems.  Invariably, the Pidgin devels point their finger at Openfire for causing the troubles and the openfire devels are more keen on supporting issues with spark[web].  I don't believe the pidgin devels test against openfire for various reasons, so what's my point...

             

            If you have troubles, try to open up the XML debug console on Pidgin and see if you can catch the disconnect in action.  Putting openfire into debug mode may help as well...

             

            I have an install base of 2900 users, with most of them running Pidgin, but for the most part, things work just great! If they continue to look bad for you, check out other clients, like Spark (hi winsrev ).  Thankfully, there are many quality options out there.

             

            HTH,

              daryl

          • wroot KeyContributor 5,278 posts since
            Jan 24, 2005
            Currently Being Moderated
            Sep 4, 2008 9:02 PM (in response to amullen)
            Re: Pidgin randomly disconnecting from Openfire

            amullen wrote:

             

            Hi Daryl,

             

            Your suggestions, along with the new release of Pidgin

             

            You mean, you already tried 2.5.1? Cause i saw in the changelog:

             

            * Avoid disconnecting from XMPP servers on parse errors that are non-fatal.
              • pidfire Bronze 2 posts since
                Dec 19, 2008
                Currently Being Moderated
                Dec 19, 2008 8:09 AM (in response to amullen)
                Re: Pidgin randomly disconnecting from Openfire

                Same issue here with Pidgin, random disconnects after upgrading the version of Pidgin to 2.5.2 from 2.3.1.  The old version works fine but the new version disconnects.  It looks like the main change in Pidgin was the way it handles SSL certificates.  Any ideas?

                • hollowpt Bronze 9 posts since
                  Jun 24, 2009
                  Currently Being Moderated
                  Aug 17, 2009 7:21 AM (in response to pidfire)
                  Re: Pidgin randomly disconnecting from Openfire

                  Openfire: 3.6.4

                  Pidgin: 2.5.8

                   

                  I have the xmpp.idle set to -1 for my server settings as well.  When the disconnects occur it does not do all users at once, but tons of users get disconnected and eventually reconnect...sometimes dozens of times. I have TLS as well.

                   

                  Debug from Openfire while the disconnect dance was going on:

                   

                   

                  2009.08.17 08:23:03 ConnectionHandler: Closing connection that has been idle: org.jivesoftware.openfire.nio.NIOConnection@11a1774 MINA Session: (SOCKET, R: /10.135.200.149:1249, L: /10.135.210.50:5222, S: 0.0.0.0/0.0.0.0:5222)


                  2009.08.17 08:24:05 309638 (01/05/00) - #48 registered a statement as closed which wasn't known to be open. This could happen if you close a statement twice.
                  2009.08.17 08:24:05 309638 (01/05/00) - Connection #48 tested: OK
                  2009.08.17 08:24:12 ConnectionHandler: Closing connection that has been idle: org.jivesoftware.openfire.nio.NIOConnection@1dbbfb8 MINA Session: (SOCKET, R: /10.135.210.12:1139, L: /10.135.210.50:5222, S: 0.0.0.0/0.0.0.0:5222)
                  2009.08.17 08:24:12 309638 (01/05/00) - Connection #49 tested: OK

                  • Zerivael Bronze 4 posts since
                    Jan 4, 2010
                    Currently Being Moderated
                    Mar 9, 2010 5:31 AM (in response to hollowpt)
                    Re: Pidgin randomly disconnecting from Openfire

                    Hello,

                    I'm also familiar with this kind of a problem with Openfire+Pidgin. In a company I work we deployed Openfire 3.6.4 server and all of our users are connecting via Pidgin. After a while we noticed that server randomly closes connections. I've tried to change configuration of Openfire, Pigdin, also tried to manage traffic to the server but nothing helped. After some research I found this ticket on Pidgin website: http://developer.pidgin.im/ticket/10767

                    I think everything is explained in it.

                    • hollowpt Bronze 9 posts since
                      Jun 24, 2009
                      Currently Being Moderated
                      Mar 9, 2010 12:13 PM (in response to Zerivael)
                      Re: Pidgin randomly disconnecting from Openfire

                      Just out of curiosity is this Openfire server on a VM or bare metal?  Mine is on a VM...not sure if there is an underlying issue there. My issue also seems to happen regardless of iptables enabled or disabled.  With the lastest Pidgin 2.6.6 now, I can confirm this issue still happens at random.

  • hollowpt Bronze 9 posts since
    Jun 24, 2009
    Currently Being Moderated
    May 17, 2010 11:12 AM (in response to amullen)
    Re: Pidgin randomly disconnecting from Openfire

    Pidgin 2.7.0 has corrected the issue. We are no longer seeing users disconnect/reconnect all day.

    • wroot KeyContributor 5,278 posts since
      Jan 24, 2005
      Currently Being Moderated
      May 19, 2010 5:13 AM (in response to hollowpt)
      Re: Pidgin randomly disconnecting from Openfire

      Yes, Pidgin developers finally managed to implement keepalives packets This is a bit late now, but you've could eliminate this issue by modifying idle settings. http://www.igniterealtime.org/community/docs/DOC-2053

      • hollowpt Bronze 9 posts since
        Jun 24, 2009
        Currently Being Moderated
        May 19, 2010 6:53 AM (in response to wroot)
        Re: Pidgin randomly disconnecting from Openfire

        I tried putting the keepalives setting to -1 as mentioned in a few posts. Made no difference, Pidgin would still disconnect.

        • wroot KeyContributor 5,278 posts since
          Jan 24, 2005
          Currently Being Moderated
          May 19, 2010 9:14 AM (in response to hollowpt)
          Re: Pidgin randomly disconnecting from Openfire

          Then, maybe it was something else that they've fixed.

          • Zerivael Bronze 4 posts since
            Jan 4, 2010
            Currently Being Moderated
            May 20, 2010 2:34 AM (in response to wroot)
            Re: Pidgin randomly disconnecting from Openfire

            Can't really say, beacause I've already moved to ejabberd-2.1.3 server and the problem has gone - no random disconnections. I think that it's not the problem of Pidgin client but Openfire. Pidgin devs also claim that Openfire uses strange keepalive policy. OF require that keepalive packets are sent at some specific time interval no matter if ther is or isn't any packet transmission between client and serwer. On the other side Pidgin sends keepalives only when there is no traffic to/from server. Thus if e.g. one or more contacts on our list changes status often Pidgin sees that there is traffic from server so won't send keepalive packet, in result Openfire think that if no keepelive was sent session is dead and closes connection. IMO Pidgins policy is quite logical and bandwith-saving. Let's imagine Openfire with 1KK users logged at a time and sending simultainously keepalive packets... Looks like packet flooding for me

             

            PS: sorry for my english, haven't used it for a while

        • bennett.lain Bronze 9 posts since
          May 3, 2010
          Currently Being Moderated
          Jun 30, 2010 12:51 PM (in response to hollowpt)
          Re: Pidgin randomly disconnecting from Openfire

          i have several users using pidgin 2.7.0, adium, and pandeon.

           

          most of my disconnects are with pandeon, but am seeing these come from all different clients.

           

          i have NOT changed the keep alive settings to -1, because i have see most of the post saying that it make any difference.

          also we do not want to have idle connections sitting around on out servers.

          i did increase the time before cutting off idle times out to 30 minutes. with no change.

           

          i am using openfire 3.6.4.

           

          i dont have any messages coming though the error.log.

           

          i have messages in warn, and info. but i cant decide if they are actually saying anything about disconnects.

          there have been many disconnects as of late, and not of the log messages seem to line up with the actual disconnects.

           

           

          i have seen many posts with this issue, but no one ever seems to find an answer

More Like This

  • Retrieving data ...

Bookmarked By (0)

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points