igniterealtime/openfire-monitoring-plugin

Message not retrieving after update to 1.8.0 or 1.8.1 from 1.7.0

Closed this issue · 10 comments

Hello Team,

I am using OpenFire with version 4.4.4. And recently I update monitoring plugin to 1.8.1 from 1.7.0. but I found some issues after this, I tried with 1.8.0 but still have same issue.

I am unable to retrieve the archived messages, everything was working fine on 1.7.0 version and I was using following code to get list and collection of archived messages:

Getting List by this:
<iq from="fromJID" id="89c356e4-5f34-408c-9254-55b536b2028b:sendIQ" to="toJID" type="get" xmlns="jabber:client"><list xmlns="urn:xmpp:archive"/></iq>
And after I was getting collection by this:
<iq from="fromJID" id="c928e47d-c72f-43a7-814c-acdff7bf3a41:sendIQ" to="toJID" type="get" xmlns="jabber:client"><retrieve start="2020-01-06T05:54:29.187Z" with="fromJID" xmlns="urn:xmpp:archive"/></iq>
In earlier version of monitoring plugin(1.7.0) we were getting chat message data, but in new version we are getting empty children for chat.

can anyone help on it please..

I am getting empty chat after update.

SENT: <iq from="deepak@localhost" id="9264e9cf-5a47-4818-a74c-a5ce36168618:sendIQ" to="sanyam@localhost" type="get" xmlns="jabber:client"><retrieve start="2020-01-06T05:54:29.187Z" xmlns="urn:xmpp:archive"/></iq>

RECV: <iq xmlns="jabber:client" type="result" id="9264e9cf-5a47-4818-a74c-a5ce36168618:sendIQ" from="sanyam@localhost" to="deepak@localhost/84faa7fdy8"><chat xmlns="urn:xmpp:archive" with="deepak@localhost" start="2020-01-06T05:54:29.187Z"></chat></iq>

Earlier response was something:
RECV: <iq xmlns="jabber:client" type="result" id="926csdjkhf-5a47-4818-a74c-a5ce36168618:sendIQ" from="sanyam@localhost" to="deepak@localhost/84faa7fdy8"><chat xmlns="urn:xmpp:archive" with="deepak@localhost" start="2020-01-06T05:54:29.187Z">_<from secs="0" jid="sanyam@localhost"><body>3</body></from><to secs="10"><body>2</body></to><from secs="4" jid="sanyam@localhost"><body>3</body></from>_</chat></iq>

Hello Team,
I made a number of changes to the "JdbcPersistenceManager.java"
This should fix Issues #72 and #48.
In addition, I rewrote SQL-queries. Now the load speed of the story should increase at times.
We have DB on PostgreSQL 11.7, size 7Gb. Client Vacuum-IM 1.3.0.
Earlier, in version 1.7.0, one request for counting the number of Conversations took more than 30 seconds, now the request is completed in 3 seconds.
Please commit this changes.
monitoring.zip

Thank you @koledas , can you please make these changes as a Pull Request?

@deepak3636, did this update solve you problem?

2.0.1
Miranda NG Version: 0.95.12 alpha build #23025
This miranda uses XEP-0136. It works in 1.7.0 but now archive is not retrievable.
And I see this error in openfire log:

Click to expand `2020.06.15 14:16:04 ERROR [socket_c2s-thread-3]: com.reucon.openfire.plugin.archive.impl.JdbcPersistenceManager - Error selecting conversation org.postgresql.util.PSQLException: Колонки stanza не найдено в этом ResultSet’’е. at org.postgresql.jdbc.PgResultSet.findColumn(PgResultSet.java:2584) ~[postgresql-42.2.8.jar:42.2.8] at org.postgresql.jdbc.PgResultSet.getString(PgResultSet.java:2457) ~[postgresql-42.2.8.jar:42.2.8] at org.apache.commons.dbcp2.DelegatingResultSet.getString(DelegatingResultSet.java:898) ~[commons-dbcp2-2.6.0.jar:2.6.0] at org.apache.commons.dbcp2.DelegatingResultSet.getString(DelegatingResultSet.java:898) ~[commons-dbcp2-2.6.0.jar:2.6.0] at com.reucon.openfire.plugin.archive.impl.JdbcPersistenceManager.extractMessage(JdbcPersistenceManager.java:984) ~[monitoring-2.0.1.jar!/:?] at com.reucon.openfire.plugin.archive.impl.JdbcPersistenceManager.getConversation(JdbcPersistenceManager.java:886) [monitoring-2.0.1.jar!/:?] at com.reucon.openfire.plugin.archive.impl.JdbcPersistenceManager.getConversation(JdbcPersistenceManager.java:801) [monitoring-2.0.1.jar!/:?] at com.reucon.openfire.plugin.archive.xep0136.IQRetrieveHandler.retrieve(IQRetrieveHandler.java:107) [monitoring-2.0.1.jar!/:?] at com.reucon.openfire.plugin.archive.xep0136.IQRetrieveHandler.handleIQ(IQRetrieveHandler.java:39) [monitoring-2.0.1.jar!/:?] at com.reucon.openfire.plugin.archive.xep.AbstractXepSupport$1.handleIQ(AbstractXepSupport.java:42) [monitoring-2.0.1.jar!/:?] at org.jivesoftware.openfire.handler.IQHandler.process(IQHandler.java:62) [xmppserver-4.5.2.jar:4.5.2] at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:369) [xmppserver-4.5.2.jar:4.5.2] at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:112) [xmppserver-4.5.2.jar:4.5.2] at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:74) [xmppserver-4.5.2.jar:4.5.2] at org.jivesoftware.openfire.net.StanzaHandler.processIQ(StanzaHandler.java:366) [xmppserver-4.5.2.jar:4.5.2] at org.jivesoftware.openfire.net.ClientStanzaHandler.processIQ(ClientStanzaHandler.java:95) [xmppserver-4.5.2.jar:4.5.2] at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:316) [xmppserver-4.5.2.jar:4.5.2] at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:203) [xmppserver-4.5.2.jar:4.5.2] at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:183) [xmppserver-4.5.2.jar:4.5.2] at org.apache.mina.core.filterchain.DefaultIoFilterChain$TailFilter.messageReceived(DefaultIoFilterChain.java:1015) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:122) [mina-core-2.1.3.jar:?] at org.jivesoftware.openfire.plugin.RawPrintFilter.messageReceived(RawPrintFilter.java:108) [xmldebugger-1.7.3.jar!/:?] at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.IoFilterAdapter.messageReceived(IoFilterAdapter.java:122) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128) [mina-core-2.1.3.jar:?] at org.apache.mina.filter.codec.ProtocolCodecFilter$ProtocolDecoderOutputImpl.flush(ProtocolCodecFilter.java:413) [mina-core-2.1.3.jar:?] at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:257) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.DefaultIoFilterChain.callNextMessageReceived(DefaultIoFilterChain.java:650) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.DefaultIoFilterChain.access$1300(DefaultIoFilterChain.java:49) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.DefaultIoFilterChain$EntryImpl$1.messageReceived(DefaultIoFilterChain.java:1128) [mina-core-2.1.3.jar:?] at org.apache.mina.core.filterchain.IoFilterEvent.fire(IoFilterEvent.java:106) [mina-core-2.1.3.jar:?] at org.apache.mina.core.session.IoEvent.run(IoEvent.java:89) [mina-core-2.1.3.jar:?] at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTask(OrderedThreadPoolExecutor.java:766) [mina-core-2.1.3.jar:?] at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.runTasks(OrderedThreadPoolExecutor.java:758) [mina-core-2.1.3.jar:?] at org.apache.mina.filter.executor.OrderedThreadPoolExecutor$Worker.run(OrderedThreadPoolExecutor.java:697) [mina-core-2.1.3.jar:?] at java.lang.Thread.run(Unknown Source) [?:1.8.0_202]`

In this zip (https://github.com/igniterealtime/openfire-monitoring-plugin/files/4387326/monitoring.zip) compilled plugin with merged pull request #96
Try this version.

@koledas, thank you, this works

But it would be really great if master branch work too....

Please try version 2.1.0 of the Openfire Monitoring plugin (which was just released) to see if the problems have been resolved.

Thank you. Now it works