Hi folk! Attached is the IM Gateway plugin version 1.1.0 Beta. I''ll get it put up on the beta plugins page whenever I can, but I''m not having luck catching up with the Jive folk. =) To install this, just copy it into your openfire plugins directory and let the server auto-extract it. ... In theory. Let me cut a moment here and explain what I mean by that.
For some reason there''s been a lot of instances of the auto-update causing problems. This -appears- to have something to do with the plugin not having time to shut down entirely before the new one is extracted. If you experience problems with none of the transports being available or something like that after the upgrade, remove gateway.jar entirely. Wait for the gateway directory to be removed automatically. Then copy the new gateway.jar into place again.
Anyway, this biggest change with 1.1.0 is MUC/Groupchat support (for IRC only at the moment). I''ve also migrated to openymsg so Yahoo support is back on track to hopefully head to stable soon. There''s a slew of other improvements, but they are outlined in the change log. I''m putting out this beta first for a couple of reasons. I want to hear what issues folk run into with the MUC support and with the Yahoo support. I can''t duplicate a lot of problems people have run into with Yahoo so my only way of tracking down if things are fixed is to have y''all try it. =) So please give it a shot and let me know what you run into!
BTW, the transports that are currently labeled as stable haven''t undergone many changes. Mostly bug fixes.
Thanks for that - sounds like a lot of improvements. I''ll stick it on our dev environment.
I''m not sure what''s happening at Jive though - no posts from Matt or anyone for over a week and no replies to emails from sales either ![]()
DeeJay,
Sorry I''ve been away from the forums lately -- things are super busy here at Jive.
Gato has also been very very busy doing engineering on Openfire clustering.
I''m not sure why you''d be having any problems getting emails back from sales though. If that continues to be a problem, please feel free to drop me a direct email.
Regards,
Matt
Matt - it was basically for a quote for Openfire for my environment. I CC''d you on the mail - maybe it got lost/Spam filtered? Also, thanks for Spark 2.5.3 beta 2 - the fix for SRV and SSO should really help in our environment ![]()
The upgrade proved pretty disasterous for me; when installed it didn''t allow connections at all.
The logs indicate the transports started ok, but I couldn''t interact with them from the client.
After much messing around (uninstalling old versions, restarting etc etc) nothing seemed to fix it, so I''m now back to the old version ![]()
The logs always indicate the transports are ok, even if the unload and reload works. =( I forgot another step to it, Remove the gateway.jar, wait for it to vanish entirely, and then make sure there are no connections to the JIDs the transports use in your server sessions admin pane. It''s such a pain that this keeps occuring but you can almost always bet that if you can''t interact with the transports that something went amiss in that arena. Sigh.
Seems im having a problem registering with the transport. I had an icq, y!, msn, and aim account registered before installing the beta. after upgrading, only the msn would login. I manually deleted them in the admin console but spark does not recognize that they have been deleted. Instead of having the option to enter my info, all i have is sign in and delete registration. Clicking delete information does not seem to do anything.
This error also appears in the error log:
2007.06.01 09:23:45 org.jivesoftware.openfire.gateway.BaseTransport.handleIQRegister(BaseTransport.j ava:606) Error cleaning up contact list of:
well actually i read that before i installed it :). i forced all clients to disconnect, deleted the jar, waited til it was gone, and then copied the new jar file there. The gatewayregistration table only shows my msn record. What other tables do i need to check for this old information?
Oh yeah, i also tried deleting the local spark profile so there was no old data there.
Message was edited by: snowman386
well i restarted the server and i started getting this repeated now. dont know it it helps.
2007.06.01 10:08:45 org.jivesoftware.openfire.ldap.LdapGroupProvider.populateGroups(LdapGroupProvide r.java:679)
java.lang.NullPointerException
at org.jivesoftware.openfire.ldap.LdapGroupProvider.populateGroups(LdapGroupProvid er.java:670)
at org.jivesoftware.openfire.ldap.LdapGroupProvider.getGroup(LdapGroupProvider.jav a:99)
at org.jivesoftware.openfire.group.GroupManager.getGroup(GroupManager.java:184)
at org.jivesoftware.openfire.group.GroupCollection$UserIterator.getNextElement(Gro upCollection.java:102)
at org.jivesoftware.openfire.group.GroupCollection$UserIterator.hasNext(GroupColle ction.java:65)
at org.jivesoftware.openfire.roster.RosterManager.hasMutualVisibility(RosterManage r.java:862)
at org.jivesoftware.openfire.roster.Roster.
Message was edited by: snowman386
Eww... I hate to say it but it helps in a "looks like it''s something weird going on in openfire itself" way. =/ Might want to ping the openfire support forum with that message. It almost sounds like the LDAP stuff isn''t working right. All that''s happened from the gateway''s point of view at that point is it just sent a presence probe to a registered user. Looks like something went stupid in the LdapGroupProvider as it was doing it. (... why the hell is the LdapGroupProvider even involved in handling a presence probe?)
Ok. ive had that ldap group null pointer error forever but everything worked fine including ldap groups :D. I only got the rest of that error after installing gateway 1.1.0. I''ll ask the nice people on the openfire forum to help me with that error.
daniel,
i totally wiped the database in our test environment and installed 1.1.0 gateway. I removed the local profile as well. It still has the same problem where it looks like im already registered in spark. I still get the LDAP error but i think a brand new database would have fixed it.
well daniel,
i do have good news. having the yahoo transport enabled has not caused the CPU to spike to 100% yet ![]()
I fixed my ldap error but it still does not work. went back to 1.0.2 and all is well.
For those who are watching this thread, I''m very excited about a wealth of updates I did today so I''m posting another build of the beta attached to this post. (I''ll get Matt to update the beta plugins site if I can ever get a hold of him) Either way, some of the bigger updates are:
OSCAR (AIMICQ) Improvements:
- now get notified when a buddy adds you
- ICQ auth steps are handled now
- ICQ statues are now supported
Web Interface:
- Added "search by user(jid) and legacy username" feature
IRC:
- Fixed some timing issues that were causing some misc errors
Bother... ok, I figured out what was going on. I had a reversed logic flaw. Deejay, snowman, please try out the attached plugin, it should fix the issues you two were referring to. notz, the attached plugin also fixes the issue you were running into. Lemme know if it does indeed do the trick!
works for me (well, it logs me into MSN which is more than it did before!).
Will report back properly when I''ve had chance to test it.
Before I do testing, one question, what client are you using? Spark? Psi? Something else?
Also, when you say "MSN shows away", do you mean the icon in your XMPP client related to the MSN transport shows as away, or do you mean you are watching your account from another MSN account and you see it as away?
I''m running an MSN test account along side Spark using the latest gateway.
The MSN client shows an incorrect status message for me (so it''ll show away when I''m away, but the corresponding message will be the one I''d set previously
=/ Man, I just tested it with Psi and with Spark 2.5.3 and I can''t duplicate the behavior you are seeing. I''m watching from a real MSN client and a client attached via XMPP, and dancing through MSN statuses on a third account that''s connected via Spark and I''m not seeing the behavior you are seeing at all. Now I have seen it take upwards of 5 seconds for changes to make it through. (like in my real MSN client I set my status message and it seems to sometimes take 5 seconds to arrive at the gateway or any other MSN client) What version of Spark? If not 2.5.3, mind giving 2.5.3 a quick test to see if it just happens to fix the behavior?
I''m using Spark 2.5.3. It would appear just to be massively laggy.
It takes in the region of 30 seconds to change the personal message (whereas the presence info changes immediately).
The correct personal message is sent by Spark immediately. If you make 2 personal message changes in a short period of time then the first is applied as soon as the second is made (so that''s why I thought it was 1 message out).
So, if this is an MSN quirk a rather horrible fix would be to send the change of message twice and I figure that will make it appear immediately
Message was edited by: DeeJay
And another thing (sorry) - when I log out of Spark (even with a reason) that information doesn''t get as far as MSN. So, currently MSN sees me as offline with a personal message of available.
Would it be better to either:
1) Change the message when a user goes offline (to either nothing or their offline message)
or
2) Don''t tell MSN about regular message statuses (such as available, away, free to chat etc) as that information is already known due to their presence info)
Unfortunately, I can''t start second guessing the status messages. Someone -could- legitimately want their status message to be "Away", despite how useless that is.
(i''ve met a couple and grumbled at them)
That said ... interesting that they''re sticking around. I should be able to get around that with a simple "remove my status" before logout. GATE-230
Whilst I agree it''s probably MSN being rubbish - I don''t understand why setting it twice consecutively (even to the same message) makes it effective immediately. Any chance of having the gateway just do that instead of hoping MSN is having a good day?
Okay. I''ll see how it goes when MSN is behaving.
At the moment, a 1 minute delay just makes it look like the gateway is broken. If it does continue - any chance of an option in the config to turn off status messages?
I''ll also probably run the risk of MSN getting upset, and add build a version with the 2nd status message set.
thanks,
D
Thing is, if -you- cause MSN to be upset, it''s not going to affect just you, it''s going to cause MSN to do something to screw with their protocol so no one can use it. So I would recommend not screwing with it. If it''s bothering you, I would recommend disabling the lines that say "setPersonalMessage" in MSNSession.java for now.
Also, I haven''t been able to duplicate it today. I take it you are still seeing it?
I have an idea, if you want to mess with the code, try moving setPersonalMessage to before the status update (in updateStatus) and see if that just happens to do the trick. I have a theory that maybe it would be cleaner if I were doing it in the reversed order. Unfortunately, since I can''t duplicate it today, I can''t test if my idea would do the trick. =(
Beyond that, sniffing the network traffic might give us an idea as to what''s going on.
I''m sory, but what about IRC charset translation support, supposed to be implemented in the 1.1.x branch?
Attached is yet another brand new build. Deejay, that includes the change in timing on when the personal message setting occurs, so it might fix the issue you were seeing. (might, who knows)
Oops, stopped typing too early. Anyway, changes include:
- In ICQ, if contacts are "awaiting authorization", they now show up with an "ask" status in the user''s roster so that clients can show them appropriately.
- In MSN, it set the personal information before setting status, in case that''s what''s causing the problem.
- In MSN, personal message is nulled out before logout sent.
Message was edited by: jadestorm
ICQ contacts still "awaiting authorization" but ICQ-users realy get auth-request... But when it accepted, gateway don`t change status of ICQ-contact.. ![]()
Tested whith JAJC, Psi, Pandion etc...
GATE-234
- PLEASE increase priority of that problem, ICQ is most popular messenger, and only that bug prevent start new Openfire server...
is there a chance to get away from this duplicate presence messages on login ?
2007.06.04 12:08:39
i know it doesn''t matter on desktop clients, but on mobile handsets it''s a problem.
normally one of these presence messages (available/unavailable) per contact schould be enough or i''m wrong ?
is there a chance to get away from this duplicate presence messages on login ?
2007.06.04 12:08:39 <iq type="set" id="962-360" to="tester@test.im"><query xmlns="jabber:iq:roster"><item jid="notz\40test.at@msn.test.im" name="notz@test.at" subscription="to"/></query></iq>
2007.06.04 12:08:39 <presence to="tester@test.im" from="notz\40test.at@msn.test.im" type="unavailable"/>
2007.06.04 12:08:39 <presence to="tester@test.im" from="notz\40test.at@msn.test.im"><status/></presence>
2007.06.04 12:08:39 <presence to="tester@test.im" from="notz\40test.at@msn.test.im"><status/></presence>
i know it doesn''t matter on desktop clients, but on mobile handsets it''s a problem.
normally one of these presence messages (available/unavailable) per contact schould be enough or i''m wrong ?
Lemme ask you something, if someone sends a message to you, do you get multiple copies? One of my friends is seeing that and I can''t track down what''s going on. Of course I''ve never heard of that with MSN, only AIM.
That said, I''d need to see more of the actual log to determine what''s happening here. If there were literally a couple of probes sent then you are going to get a couple of resposes. If you wouldn''t mind, send me a full copy of your debugging logs to my email address and I''ll see if I see something.
no, i don''t get duplicate messages only duplicate presences.
Yes, because I made them do that. =) "both" causes a lot of unnecessary traffic to be passed between the client and the plugin. More importantly, it also makes it so that I can''t provide "X user added me" functionality if say you are subscribed to a person and they go to add you. If I have both there, Openfire won''t let through the notification.
here is one login with only 2 msn contacts. for every msn contact i get :
1 roster update not needed
1 unavailable (sometimes it''s like the other 2 status messages) not needed
2 status messages (always identical) - only for online contacts only 1 needed
i have one user that has unbelievable amount of msn contacts (~ 1000). and there are sometimes about ~3000 packets send in only 1/2 minute (1 MB traffic). and the most of that is not really needed.
i understand that the roster update is being send to the client, because something could have changed sine the last login, but the status message are annoying. also it would be a nice feature to turn of this roster updates to save bandwith on mobiles. the correct roster will be sent anyway on the next login.
these log i have stripped from my internal test-server. but the behavior is the same on the live environment.
2007.06.04 20:09:47 <?xml version=''1.0''?>
2007.06.04 20:09:47 <stream:stream xmlns:stream=''http://etherx.jabber.org/streams'' xmlns=''jabber:client'' to=''test.im'' xml:lang=''de''>
2007.06.04 20:09:47 <?xml version=''1.0'' encoding=''UTF-8''?><stream:stream xmlns:stream="http://etherx.jabber.org/streams" xmlns="jabber:client" from="192.168.11.159" id="ur1evd4d0545a" xml:lang="de"></stream:stream>
2007.06.04 20:09:47 <iq id="10" type="set" to="test.im"><query xmlns="jabber:iq:auth"><username>666763076977</username><password>xxx</password></query></iq>
2007.06.04 20:09:47 <iq type="result" id="10" from="test.im" to="666763076977@test.im"></iq>
2007.06.04 20:09:47 <iq id="11" type="get"><query xmlns="jabber:iq:roster"></query></iq>
2007.06.04 20:09:47 <presence></presence>
2007.06.04 20:09:47 <iq type="result" id="11" to="666763076977@test.im"><query xmlns="jabber:iq:roster"><item jid="yahoo.test.im" name="Yahoo! Transport" subscription="both"><group>Transports</group></item>
<item jid="notz99@yahoo.test.im" name="notz99" subscription="to"></item><item jid="666766688669@test.im" name="mortn" ask="subscribe" subscription="none"></item>
<item jid="666766688650@test.im" name="mahatma" subscription="both"></item><item jid="666766688781@test.im" name="markus" subscription="both"></item><item jid="666763588076@test.im" name="Murph" subscription="both"></item>
<item jid="msn.test.im" name="MSN Transport" subscription="both"><group>Transports</group></item><item jid="666763076976@test.im" name="notz77" subscription="both"></item>
<item jid="tina94\40test.at@msn.test.im" name="tina" subscription="to"></item><item jid="notz\40test.at@msn.test.im" name="notz@test.at" subscription="to"></item>
<item jid="666769080712@test.im" name="test" ask="subscribe" subscription="none"></item></query></iq>
2007.06.04 20:09:48 <iq type="set" id="262-420" to="666763076977@test.im"><query xmlns="jabber:iq:roster"><item jid="notz99@yahoo.test.im" name="notz99" subscription="to"></item></query></iq>
2007.06.04 20:09:48 <presence to="666763076977@test.im" from="notz99@yahoo.test.im" type="unavailable"></presence>
2007.06.04 20:09:48 <presence to="666763076977@test.im" from="yahoo.test.im"></presence>
2007.06.04 20:09:48 <iq type="set" id="408-421" to="666763076977@test.im"><query xmlns="jabber:iq:roster"><item jid="notz99@yahoo.test.im" name="notz99" subscription="to"></item></query></iq>
2007.06.04 20:09:48 <presence to="666763076977@test.im" from="notz99@yahoo.test.im" type="unavailable"></presence>
2007.06.04 20:09:52 <presence to="666763076977@test.im" from="msn.test.im"></presence>
2007.06.04 20:09:53 <presence to="666763076977@test.im" from="notz\40test.at@msn.test.im"><status></status></presence>
2007.06.04 20:09:53 <presence to="666763076977@test.im" from="notz\40test.at@msn.test.im"><status></status></presence>
2007.06.04 20:09:53 <presence to="666763076977@test.im" from="tina94\40test.at@msn.test.im"><show>away</show><status></status></presence>
2007.06.04 20:09:53 <presence to="666763076977@test.im" from="tina94\40test.at@msn.test.im"><show>away</show><status></status></presence>
2007.06.04 20:09:53 <iq type="set" id="189-422" to="666763076977@test.im"><query xmlns="jabber:iq:roster"><item jid="tina94\40test.at@msn.test.im" name="tina" subscription="to"></item></query></iq>
2007.06.04 20:09:53 <iq type="set" id="440-423" to="666763076977@test.im"><query xmlns="jabber:iq:roster"><item jid="notz\40test.at@msn.test.im" name="notz@test.at" subscription="to"></item></query></iq>
2007.06.04 20:09:53 <presence to="666763076977@test.im" from="tina94\40test.at@msn.test.im"><show>away</show></presence>
2007.06.04 20:09:53 <presence to="666763076977@test.im" from="notz\40test.at@msn.test.im"></presence>
for icq contacts i get:
1 roster update
1 status message
another NPE i got with the last version on this thread:
2007.06.05 00:02:50 [org.jivesoftware.openfire.gateway.BaseTransport.processPacket(BaseTransport.java:411)] Exception while processing packet:
java.lang.NullPointerException
at org.jivesoftware.openfire.gateway.protocols.msn.MSNSession.logIn(MSNSession.java:118)
at org.jivesoftware.openfire.gateway.protocols.msn.MSNTransport.registrationLoggedIn(MSNTransport.java:89)
at org.jivesoftware.openfire.gateway.BaseTransport.processPacket(BaseTransport.java:324)
at org.jivesoftware.openfire.gateway.BaseTransport.processPacket(BaseTransport.java:166)
at org.jivesoftware.openfire.component.InternalComponentManager$RoutableComponent.process(InternalComponentManager.java:490)
at org.jivesoftware.openfire.roster.Roster.broadcastPresence(Roster.java:590)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.broadcastUpdate(PresenceUpdateHandler.java:258)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateHandler.java:100)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateHandler.java:88)
at org.jivesoftware.openfire.handler.PresenceUpdateHandler.process(PresenceUpdateHandler.java:151)
at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:123)
at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:69)
at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:75)
at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:134)
at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:73)
at org.jivesoftware.openfire.multiplex.MultiplexerPacketHandler.route(MultiplexerPacketHandler.java:164)
at org.jivesoftware.openfire.net.MultiplexerStanzaHandler.processRoute(MultiplexerStanzaHandler.java:89)
at org.jivesoftware.openfire.net.MultiplexerStanzaHandler.processUnknowPacket(MultiplexerStanzaHandler.java:96)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:258)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:153)
at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandler.java:132)
at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived(AbstractIoFilterChain.java:703)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimpleProtocolDecoderOutput.java:62)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecFilter.java:200)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(AbstractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilterChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceived(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java:266)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(ExecutorFilter.java:326)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
i have now debugged the current trunk version for my problems:
1.) roster update
i see that you already check if something have changed and only send the update if something has changed, but for me the groups always change, so there have to be something wrong on that check
BaseTransport.java
List<String> curgroups = gwitem.getGroups();
if (curgroups != groups) {
try {
gwitem.setGroups(groups);
changed = true;
Log.info("update roster item: group changed - " + contactjid);
}
catch (Exception ee) {
// Oooookay, ignore then.
}
}
2.) why we need the initial presences on msn transport ? i don''t think that they are nedded
3.) this function is called twice in the MSNListener on login for online contacts:
public void contactStatusChanged(MsnMessenger messenger, MsnContact friend) {
so there is one initial presence, and two times these message where friend.getStatus() is both times the same
this code change resolves the problem no. 1 for me:
List<String> curgroups = gwitem.getGroups();
if ((groups == null && curgroups.size() != 0) || (groups != null && !curgroups.containsAll(groups))) {
.
.
}
the problem is that you match an empty list against an null value or match to lists aigainst each other, what also is not working correct.
Hrm. Yes that''s definitely a bad check. Thanks for looking into that! I''ll look at it later today. Thanks for the patch you posted in a different reply!
2.) why we need the initial presences on msn transport ? i don''t think that they are nedded
Well I can tell you that when I -didn''t- do them, people would complain. You''ll come online and folk who have been online for hours won''t show up until their presence changes. Some folk''s clients send presence updates a -lot- so it appears like you get an initial presence from them when you are really getting a change. If that behavior has changed I''m certainly willing to entertain not doing the initial settings. Other protocols behave differently from this. OSCAR, for example, gives you your buddy list and then you must wait for status notifications just like any other one. Much more siimilar in behavior to XMPP if you ask me. By logging in you are effectively "precense probing" everyone. I like that behavior a lot better.
3.) this function is called twice in the MSNListener on login for online contacts:
public void contactStatusChanged(MsnMessenger messenger, MsnContact friend) {
Interesting. I wonder why it''s called twice? That''s supposed to be reactionary. Bah. Well the big thing I''m planning on doing is to rework the contact handling entirely. Instead of sending contact statuses on the fly, I''m going to store them, and only send when something has changed.
so there is one initial presence, and two times these message where friend.getStatus() is both times the same
i have now debugged the current trunk version for my problems:
1.) roster update
i see that you already check if something have changed and only send the update if something has changed, but for me the groups always change, so there have to be something wrong on that check
For references, GATE-236
your last changeset didn''t resolve the problem correct
curgroups can be an empty list
but groups will be null if their is no entry
and both are the same and should not trigger the changed flag
your last changeset didn''t resolve the problem correct
curgroups can be an empty list
but groups will be null if their is no entry
and both are the same and should not trigger the changed flag
Hrm. Yes I see your point. I originally thought was just going to make groups -be- an empty list if it was null, cut down on the checks. Lemme think through how best I want to do it. Thanks!
Hi notz, these look like logs from your client, not from openfire. Can I get a copy of the debug logs from the server itself? I''ve got a grande scheme to revamp the contact list handling overall, but I''m generally curious about why there''s so many multiples. I can''t tell "why" from these logs. =)
is there a chance to get away from this duplicate presence messages on login ?
2007.06.04 12:08:39 <iq type="set" id="962-360" to="tester@test.im"><query xmlns="jabber:iq:roster"><item jid="notz\40test.at@msn.test.im" name="notz@test.at" subscription="to"/></query></iq>
2007.06.04 12:08:39 <presence to="tester@test.im" from="notz\40test.at@msn.test.im" type="unavailable"/>
2007.06.04 12:08:39 <presence to="tester@test.im" from="notz\40test.at@msn.test.im"><status/></presence>
2007.06.04 12:08:39 <presence to="tester@test.im" from="notz\40test.at@msn.test.im"><status/></presence>
i know it doesn''t matter on desktop clients, but on mobile handsets it''s a problem.
normally one of these presence messages (available/unavailable) per contact schould be enough or i''m wrong ?
hi notz,
i am running a mobile application too and i used to have that problem until today. I have found the solution for the duplicate presences and also duplicate iq packets (This happens,int the first connect after you restart the openfire server) in every gateways. Tomorrow i will be testing with my team.
Only the first connect?
Are you referring to the fact that the gateway sends presences for contacts as they come online, and then the client typically sends a probe? (i don''t really understand the logic of the probe but hey, it seems to be the trend nowdays) When I first started doing this, as folk came online they watched for presences. They didn''t "log in, do everything, wait until -they- were ready for presence, and -then- throw a crapload of probes". None-the-less, I don''t know that that''s the issue you are referring to. =)
hi daniel,
i am talking about duplicate iq packets in the first connection and about lots of presence packets of just one user.
duplicate iq problems: when a user first connects to any service (msn, gtalk, icq etc), the gateway sync the roster. In this process, you get two iq packets per your contact. first iq contains only the jid with a "none" subscription, and then gateway sends another iq packet, which has the name of the user, for this user. So the first iq is sent by openfire because of the following code in the BaseTransport class.
// Create new roster item for the gateway service or legacy contact. Only
// roster items related to the gateway service will be persistent. Roster
// items of legacy users are never persisted in the DB.
RosterItem gwitem = roster.createRosterItem(contactjid, true, contactjid.getNode() == null);
in this code, while creating new roster item, gateway pushes the new roster item to the client, which i believe that it shouldn''t. Because in the next lines, it will push the roster with:
roster.updateRosterItem(gwitem);
so the gateway should call the "createRosterItem" method with false in the 2nd argument, which decides pushing the newly created roster item.
lots of presence packets: in fact this is not a bug or error. but it is a thing that can be optimized. while we start the services (msn, gtalk etc, ''i do not know how you call these''), their listeners begin to listen and process what they get as soon as possible. but for the presences changes, we need to make presence listeners wait until we sync the rosters. Because in the "syncUsers()" method, we already send the initial prences of our roster items. (of course, this is not a solution for the msn UBX packets, it is normal that you can get 2 presence for the user anyway.)
as a conclusion, by fixing (maybe wrong word) the above codes, i can sign an msn users, that has a 21 contacts, with just ~7kb in stead of ~18kb. Since my client is mobile ( http://www.cepteki.net - english version is in progress) 11kb is really a big traffic.
after my tests, i will post my codes in here, so you can test that also.
(sorry for my poor english, i hope i was clear.)
hi daniel,
i am talking about duplicate iq packets in the first connection and about lots of presence packets of just one user.
duplicate iq problems: when a user first connects to any service (msn, gtalk, icq etc), the gateway sync the roster. In this process, you get two iq packets per your contact. first iq contains only the jid with a "none" subscription, and then gateway sends another iq packet, which has the name of the user, for this user. So the first iq is sent by openfire because of the following code in the BaseTransport class.
// Create new roster item for the gateway service or legacy contact. Only >
// roster items related to the gateway service will be persistent. Roster >
// items of legacy users are never persisted in the DB. >
RosterItem gwitem = roster.createRosterItem(contactjid, true, contactjid.getNode() == null); >
in this code, while creating new roster item, gateway pushes the new roster item to the client, which i believe that it shouldn''t. Because in the next lines, it will push the roster with:
roster.updateRosterItem(gwitem);
so the gateway should call the "createRosterItem" method with false in the 2nd argument, which decides pushing the newly created roster item.
Hrm. And so then update will fire the only "push" so to speak. Yeah I see nothing wrong with that, I''ll do that. Thanks! GATE-241 (not going to close it until I actually commit my code to SVN ;D )
lots of presence packets: in fact this is not a bug or error. but it is a thing that can be optimized. while we start the services (msn, gtalk etc, ''i do not know how you call these''), their listeners begin to listen and process what they get as soon as possible. but for the presences changes, we need to make presence listeners wait until we sync the rosters. Because in the "syncUsers()" method, we already send the initial prences of our roster items. (of course, this is not a solution for the msn UBX packets, it is normal that you can get 2 presence for the user anyway.)
as a conclusion, by fixing (maybe wrong word) the above codes, i can sign an msn users, that has a 21 contacts, with just ~7kb in stead of ~18kb. Since my client is mobile ( http://www.cepteki.net - english version is in progress) 11kb is really a big traffic.
after my tests, i will post my codes in here, so you can test that also.
(sorry for my poor english, i hope i was clear.)
I would certainly love to see whatever code you''ve worked up for this, BUT I''ve actively been working on a new way of handling the buddy list so to speak that will cut down on these presence notifications tremendously. Basically I''m implementing a generic buddy item (that gets overrided by each transport if the want to store special info for their own purposes about a buddy) and a buddy item manager. Presence notifications are only auto-sent if there is a change. If I get three online pings from the legacy service and nothing is different then by god I''ll only send one. =) So I hate to tell you that after it sounds like you''ve already worked out a solution, but regardless I''d love to see your approach as well ''cause I always like to see different ideas and such regardless of if I end up using them!
Daniel
for handling the presences, i have modified the msn library (jml.jar) and added some extra methods like
-MsnContactImpl
getOldCurrentMedia()
getOldPersonalMessage()
and also, i use MsnUserImpl to get the oldDisplayMessage and oldStatus. By the help of these methods, now i can track the users''s info, so that i can decide if i need to push or not.
This is also a solution for duplicate msn server''s presence commands. If you check you debug, you can see that msnp 11 can send one or more presence commands for one user. So sometimes, openfire need to send you "4" presence message for the same user. But now, it can''t ![]()
Now the only problem is the seperate presences i get from msn server. They are; NLN (FLN, IDL etc.) and UBX. I think there is no solution for that.
Anyway, my tests are still in progress, i will let you know the updates.
Oh cool, as the maintainer of Java-JML, I''d be happy to pull in your changes to that project as well. =) I''m almost done with my base mods for the new and improved buddy handling hotness. Will commit once I''m comfortable with it. At the moment I''ve only applied it to MSN since it seems to be a big problem causer. It''ll be my test case. I plan on getting that going, making sure my mods don''t screw over the other transports, committing, and then working on the other transports. =) I''m pretty excited. It cleans up what the transports themselves have to do quite a bit.
I''ve just installed the latest version (which looking at the file modification times seemed to install ok).
However, no change in behaviour; when I log out of MSN my status remains and the lag is about 60 seconds today on changing status messages.
Hello,
With this release I''m getting triplicate responses from my AIM contacts. When I send a message it just goes through once, but any responses I receive in triplicate (kinda annoying :-D ). Any logs or anything you need?
Thanks,
Chad
Ok, that''s excellent ... hrm that sounds kinda bad. lol I say that because, a friend of mine is also getting triple, where I am not. It''s good to know it''s not limited to just one person. So... lessee... let me start gathering some ''vitals'' from you two and contrast and compare.
OS:
If Linux, what distribution:
Java version: (can get from admin console)
Openfire version:
Did you see this in 1.0.2 or earlier:
Do you have debug logging enabled and, if so, would you be willing to send me a copy of the debug logs (to my email address):
What XMPP client are you using:
Are you logged into Openfire from only one location at the same time? (multiple resources)
OS: FreeBSD 6.1
Java version: 1.5.0
Openfire version: 3.3.1 Enterprise
Did you see this in 1.0.2 or earlier: Nope
Do you have debug logging enabled and, if so, would you be willing to send me a copy of the debug logs (to my email address): Yes, though I think I sent those to you this weekend. ![]()
What XMPP client are you using: mcabber 0.9.1
Are you logged into Openfire from only one location at the same time? Yes, only one location.
I also had weird crashy problems after moving to 1.1.0-beta (the latest one in this thread, though it happened with the previous 1.1.0-beta too). I didn''t get any logs from it, though. Basically I''d be chatting away (not sure what other users on my server were doing at the time) and I''d just suddenly get disconnected. The system load would rise pretty high, and I''d be unable to get into the admin console or to log back in. I had to restart the server and everything was fine until the next time it crashed. I went back to 1.0.2 and haven''t had the problem again.
MysticOne
Well, the oddest thing. This morning I went to make sure I was still having the problem before I posted and it appears to be gone (rather randomly because I didn''t change anything). Just for information though I''m going to enable the debug logs so if the problem reoccurs I can send a copy of them.
OS Version: Gentoo Linux
Java version: 1.5.0_11 Sun Microsystems Inc
Openfire version 3.3.1
I haven''t run any versions earlier than this current beta.
Client: Psi 0.10
I wasn''t logged in from multiple resources when the problem occurred.
Thanks,
Chad
Well, the oddest thing. This morning I went to make sure I was still having the problem before I posted and it appears to be gone (rather randomly because I didn''t change anything). Just for information though I''m going to enable the debug logs so if the problem reoccurs I can send a copy of them.
OS Version: Gentoo Linux
Java version: 1.5.0_11 Sun Microsystems Inc
Openfire version 3.3.1
I haven''t run any versions earlier than this current beta.
Client: Psi 0.10
I wasn''t logged in from multiple resources when the problem occurred.
Thanks,
Chad
Did you happen to restart your server recently?
Did you happen to restart your server recently?
Nope, I mean I literally did nothing. :-D After I posted my message yesterday I walked away from the system till this morning and everything was working great again. Uptime for Openfire is around 12 days right now.
--Chad
yeah, my error log is now empty ![]()
thanks for the beta. it seem''s to run quite good.
sometimes i get following NPE (not in 1.0.2):
2007.06.02 12:18:32 org.jivesoftware.openfire.gateway.BaseTransport.processPacket(BaseTransport.java :182) Error occured while processing packet:
java.lang.NullPointerException
at org.jivesoftware.openfire.gateway.BaseTransport.addNewRegistration(BaseTranspor t.java:1345)
at org.jivesoftware.openfire.gateway.BaseTransport.handleIQRegister(BaseTransport. java:706)
at org.jivesoftware.openfire.gateway.BaseTransport.processPacket(BaseTransport.jav a:457)
at org.jivesoftware.openfire.gateway.BaseTransport.processPacket(BaseTransport.jav a:163)
at org.jivesoftware.openfire.component.InternalComponentManager$RoutableComponent. process(InternalComponentManager.java:490)
at org.jivesoftware.openfire.IQRouter.handle(IQRouter.java:250)
at org.jivesoftware.openfire.IQRouter.route(IQRouter.java:104)
at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:67)
at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:11 0)
at org.jivesoftware.openfire.SessionPacketRouter.route(SessionPacketRouter.java:67 )
at org.jivesoftware.openfire.multiplex.MultiplexerPacketHandler.route(MultiplexerP acketHandler.java:164)
at org.jivesoftware.openfire.net.MultiplexerStanzaHandler.processRoute(Multiplexer StanzaHandler.java:89)
at org.jivesoftware.openfire.net.MultiplexerStanzaHandler.processUnknowPacket(Mult iplexerStanzaHandler.java:96)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:258)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:153)
at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:132)
at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:703)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:62)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:200)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :266)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:326)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Woohoo. Downloaded the latest one you posted. I am now able to login to the gateways. Will keep you updated about the yahoo 100% problem and any other problems i find.
Couple error messages for you that are thrown when changing status. Dont really see anything interesting in the debug log:
2007.06.04 08:44:16 org.jivesoftware.openfire.gateway.util.Log4JToOpenfireAppender.append(Log4JToOpe nfireAppender.java:49) error on process packet
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at org.openymsg.network.YMSG9InputStream.readBuffer(Unknown Source)
at org.openymsg.network.YMSG9InputStream.readPacket(Unknown Source)
at org.openymsg.network.DirectConnectionHandler.receivePacket(Unknown Source)
at org.openymsg.network.InputThread.run(Unknown Source)
2007.06.04 08:44:16 org.jivesoftware.openfire.gateway.protocols.yahoo.YahooSessionListener.inputExce ptionThrown(YahooSessionListener.java:203) Input error from yahoo: Source: InputThread
java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:256)
at java.io.BufferedInputStream.read(BufferedInputStream.java:313)
at org.openymsg.network.YMSG9InputStream.readBuffer(Unknown Source)
at org.openymsg.network.YMSG9InputStream.readPacket(Unknown Source)
at org.openymsg.network.DirectConnectionHandler.receivePacket(Unknown Source)
at org.openymsg.network.InputThread.run(Unknown Source)
2007.06.04 08:46:56 org.jivesoftware.openfire.gateway.protocols.yahoo.YahooSession.updateStatus(Yaho oSession.java:416) Unable to set Yahoo Status:
java.net.SocketException: Broken pipe
at java.net.SocketOutputStream.socketWrite0(Native Method)
at java.net.SocketOutputStream.socketWrite(SocketOutputStream.java:92)
at java.net.SocketOutputStream.write(SocketOutputStream.java:136)
at java.io.BufferedOutputStream.flushBuffer(BufferedOutputStream.java:65)
at java.io.BufferedOutputStream.flush(BufferedOutputStream.java:123)
at java.io.DataOutputStream.flush(DataOutputStream.java:106)
at org.openymsg.network.DirectConnectionHandler.sendPacket(Unknown Source)
at org.openymsg.network.Session.sendPacket(Unknown Source)
at org.openymsg.network.Session.sendPacket(Unknown Source)
at org.openymsg.network.Session.transmitNewStatus(Unknown Source)
at org.openymsg.network.Session.setStatus(Unknown Source)
at org.jivesoftware.openfire.gateway.protocols.yahoo.YahooSession.updateStatus(Yah ooSession.java:409)
at org.jivesoftware.openfire.gateway.BaseTransport.processPacket(BaseTransport.jav a:305)
at org.jivesoftware.openfire.gateway.BaseTransport.processPacket(BaseTransport.jav a:166)
at org.jivesoftware.openfire.component.InternalComponentManager$RoutableComponent. process(InternalComponentManager.java:490)
at org.jivesoftware.openfire.PresenceRouter.handle(PresenceRouter.java:139)
at org.jivesoftware.openfire.PresenceRouter.route(PresenceRouter.java:69)
at org.jivesoftware.openfire.spi.PacketRouterImpl.route(PacketRouterImpl.java:75)
at org.jivesoftware.openfire.net.StanzaHandler.processPresence(StanzaHandler.java: 306)
at org.jivesoftware.openfire.net.ClientStanzaHandler.processPresence(ClientStanzaH andler.java:85)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:231)
at org.jivesoftware.openfire.net.StanzaHandler.process(StanzaHandler.java:153)
at org.jivesoftware.openfire.nio.ConnectionHandler.messageReceived(ConnectionHandl er.java:132)
at org.apache.mina.common.support.AbstractIoFilterChain$TailFilter.messageReceived (AbstractIoFilterChain.java:703)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.codec.support.SimpleProtocolDecoderOutput.flush(SimplePr otocolDecoderOutput.java:62)
at org.apache.mina.filter.codec.ProtocolCodecFilter.messageReceived(ProtocolCodecF ilter.java:200)
at org.apache.mina.common.support.AbstractIoFilterChain.callNextMessageReceived(Ab stractIoFilterChain.java:362)
at org.apache.mina.common.support.AbstractIoFilterChain.access$1100(AbstractIoFilt erChain.java:54)
at org.apache.mina.common.support.AbstractIoFilterChain$EntryImpl$1.messageReceive d(AbstractIoFilterChain.java:800)
at org.apache.mina.filter.executor.ExecutorFilter.processEvent(ExecutorFilter.java :266)
at org.apache.mina.filter.executor.ExecutorFilter$ProcessEventsRunnable.run(Execut orFilter.java:326)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java: 650)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
these two lines were in the warning log:
2007.06.04 08:39:15 Don''t know how to handle service type ''UNKNOWN002''. The original packet was: Magic:YMSG Version:0 Length:92 Service:UNKNOWN002 Status:1 SessionId:0xffffffffca8b9901 302 312 300 312 313 1 314 0 301 312 300 312 313 2 314 0 301 312 303 312
2007.06.04 08:39:15 Don''t know how to handle service type ''PING''. The original packet was: Magic:YMSG Version:0 Length:18 Service:PING Status:1 SessionId:0xffffffffca8b9901 143 60 144 13
Message was edited by: snowman386
Daniel - my server is internet accessible. Want a test account?
Well... I mean sure, but looking at logs and comparing as things happen would be the best for me to try to track down the behavior. (and especially a tcpdump as well) ponder Ok, if you don''t mind, let me have an account on yours and by the same token, let me set you up with an account on mine and see if you see the same behavior. (I''ll pre-warn you that I''ll erase the account after we''re done testing, my server is private =) ) I''ll private message you with details.
Although the Yahoo library that gateway plugin is using has been developed in Java 6, it''s compiles fine using Java 5 (I just checked with 1.5.0_12).
What version of Java were you using? Is it possible for you to re-install the old version, and see if the problem pops up again?
Is it normal that i can''t get the vcard from icq contacts? Away messages are working...
Also sometimes a add a (icq) user again because I lost it on my roaster. i don''t get an authorisationrequest and i no auth
(latest stable)
and sometimes i re-add a person and he gets a authrequest and he accepted and he is shown on my roaster as successful added. then i relogin and "the guy is gone" ... (stable and beta 3)
the last is very strange and the guy think i''m crazy: i can''t get his vcard and so i ask him every time who he are
(he is running adium with jabber and icq - but sometimes he startet a conversation via icq ...)
tested with Psi 0.10 and the latest stable-version and gateway 1.1.0 beta 3
Is it normal that i can''t get the vcard from icq contacts? Away messages are working...
vcards are not supported yet: GATE-42
Also sometimes a add a (icq) user again because I lost it on my roaster. i don''t get an authorisationrequest and i no auth
(latest stable)
ICQ support is kinda sucky right now (note that it''s under experimental gateways in the admin interface) GATE-273
and sometimes i re-add a person and he gets a authrequest and he accepted and he is shown on my roaster as successful added. then i relogin and "the guy is gone" ... (stable and beta 3)
the last is very strange and the guy think i''m crazy: i can''t get his vcard and so i ask him every time who he are
(he is running adium with jabber and icq - but sometimes he startet a conversation via icq ...)
tested with Psi 0.10 and the latest stable-version and gateway 1.1.0 beta 3
Yeah like I said, ICQ support is kinda crappy right now. Every time I make some headway with it, things seem to backpedal. =/
Ive found that most of the time when i login, i will get a popup about yahoo users requesting authorization. These users were people i blocked years ago on yahoo. I deny the request and uncheck the box to add them to my roster in spark but they continue to popup as authorization requests on login.
Great realse!. Thank you. The status message now works great.
I noticed that the XMPP/Google Talk gateway ticked is closed and we can expect this to be in the 1.1.0 release. Will there be another beta, so we can test this before the release.
To be honest, I can''t wait.
nice to see the gtalk transport, but subscription handling is not working for me...
A .. psi connected directly to gtalk
B .. psi uses gtalk transport
on adding contact B from A , B will not get asked to allow subscription and A gets automatically subscritpion
B gets only a presence available but no roster update, on next login of B contact A is on the rost