13 Replies Latest reply on Mar 19, 2009 3:11 PM by emsearcy

    More presence jankiness

      So, I've read through all the threads in here on presence between Clearspace and Openfire, and none of them seem to include a solution.


      So, I have Clearspace 1.9 and Openfire 3.4.1 installed on the same machine, using LDAP to authenticate to AD. Everything works great and is as expected. I have presence configured on both services, and they both say that they are working and talkign to eachother and moving packets and whatnot.


      But presence in Clearspace doesn't work. Everyone's "presence light" is grey/off no matter what. I set an shared secret for the service, the tests pass, I've also tried both having "Use Clearspace User Names to Retrieve XMPP Presence Information" checked and unchecked, it doesn't seem to make a difference. Thoughts? I don't even know how I could collect more information to troubleshoot this further at this point.

        • Re: More presence jankiness

          Hey qhartman,


          Presence can be a tricky thing. For some reason it seems to work better with certain version match ups. You could try upgrading to the latest version of openfire, and see if that solves things for you.


          Other than upgrading you'll want to make sure all the fields on both clearspace and openfire are using the same domain. That is, not domain1.com on cs, while domain2.com on openfire. I see you've been able to pass the secret between the two, and everything says things are going smoothly, but I wonder if you could check to see if any XMPP packets are being dropped.


          Let me know if any of this works out for you.


          ~Sean Moran

          • Re: More presence jankiness


            I still have problems with this too. I've NEVER seen it work.



            Looking at the links that Clearspace provides in the users profile, it always shows username@hostname rather than username@xmpp.domain, which are different values. I cant imagine everyone's XMPP domain is identical to the server hostname??



            • Re: More presence jankiness


              I have presence working, and I'm using LDAP for authentication.  It was a bit of a beast to get set up, but here is basically a dump of what I have running:






              I have a subdomain set up for my chat services, "chat.domain.com" (this is probably not usually necessary).

              I also have SRV records for XMPP in my main zonefile (domain.com):



              _xmpp-client        SRV 0 0 5222 chat.domain.com.

              _xmpp-server        SRV 0 0 5269 chat.domain.com.



              Related system properties in CS:


              jive.xmpp.commonUsernames  =    true
              jive.xmpp.domain  =  chat.domain.com
              jive.xmpp.enabled  =  true
              jive.xmpp.host  =  chat.domain.com
              jive.xmpp.port  =  5275
              jive.xmpp.secret  =  *****


              System propery from Openfire:


              xmpp.domain  chat.domain.com



              I use the SRV records because this allows me to configure clients such as Pidgin with the XMPP domain of "domain.com", which means usernames are basically the same as people's email addresses.  I don't know if the SRV records are necessary for presence to work, but "It's working for me"(tm).






                • Re: More presence jankiness

                  Running Openfire 3.4.3, Clearspace 1.10.0


                  I do have the _xmpp-client and _xmpp-server SRV records established


                  Clearspace properties and Openfire properties were set the same as yours EXCEPT I did not have a "jive.xmpp.domain" at all. Where does this even exist in the backend UI?


                  That said, I have added it with the same value that "xmpp.domain" has on the Openfire side and restarted the real-time connection... and the IM links in Clearspace are still doing username@host rather than username@xmpp.domain



                    • Re: More presence jankiness

                      The system property jive.xmpp.domain isn't currently being used, it must have been left over from a previous version. I'd recommend that you test out the 'Use Clearspace User Names to Retrieve XMPP Presence Information' setting again. Once you have that set, the system should go down a path where it tries to create a JID that looks like this:

                      jid = new JID(user.getUsername(), IMSettingsUtils.getXMPPComponentHost(), null);

                      which should get you what you want... I'm curious now that I think about this though: do the usernames in your system look like an email address?





                        • Re: More presence jankiness

                          Ok, I took that jive.xmpp.domain out of there not to confuse things.


                          I can verify under Real-Time it shows Connected. It does report Openfire's uptime, version and user account properly on the Connection page. On presense, "Use Clearspace User Names to Retrieve XMPP Presence Information" is indeed checked. On the Openfire side I can verify that the Clearspace site is connected in the Component Sessions area with recent activity.


                          Our usernames are coming from the same AD backend so they are the same login names (and passwords). Could there be any subtle problem in the way AD information is queried in? (Seems unlikely). Normal alphanumeric logins there.


                          What I observe is that the real-time status for any user is always grey. When I go to a user's profile page there is a link on the side for "Instant message". What I see there is an xmpp:// url that shows the user's id with the hostname (xmpp://username@hostname?message), where hostname obviously should be xmpp.domain instead. That's been my "clue" that Clearspace has been asking Openfire for the wrong JID's presense the whole time. Either way the JID reported there is wrong


                          "IMSettingsUtils.getXMPPComponentHost()" .. it would seem to be that getXMPPComponentHost is the wrong function, if the wording of host vs domain is consistent in the codebase?


                          Spark and Pidgin connect just fine the way the Openfire system is setup, so I'm doubting there's a problem there. I assume that when Clearspace connects as an external component to the Openfire hostname, it receives some system information in that initial negotiation such as the version, user count and uptime, and probably included in this exchange is Openfire's setting for xmpp.domain, which is why the Clearspace property is no longer used. Which sounds like a good way to do it.


                          I don't get why its not firing for me and based on all of the replies I see, it's going to end up being some kind of incredibly simple, stupid thing. Which makes me want to find it all the more...

                            • Re: More presence jankiness

                              hi nsabins,


                              Just for kicks, can you post what your Jive system properties are for:





                              and also try restarting Clearspace after you've set the 'Use Clearspace User Names to Retrieve XMPP Presence Information' to true.  After restarting Clearspace, try logging out of Spark / Pidgin and then logging back in.





                                • Re: More presence jankiness

                                  I had the web guys restart the application for me, and I've logged out of Spark and back in and it isn't changing my status


                                  Clearspace properties that start with jive.xmpp are:


                                  jive.xmpp.commonUsernames  =  true

                                  jive.xmpp.enabled  =  true

                                  jive.xmpp.host  =  xxx.yyyy.com <-- this is what gets appended to the usernames. xmpp domain is just yyyy.com

                                  jive.xmpp.port  =  5275

                                  jive.xmpp.secret  =  **************

                                  jive.xmpp.XMPPPresenceEnabled  =  true

                                    • Re: More presence jankiness

                                      hi nsabins,


                                      I was thinking about this on my bus ride home tonight after looking at the code that handles all this for a little bit. I think the problem is that your XMPP host is set to something like chat.example.com and your XMPP domain is just example.com.  Since you have the user common usernames checkbox checked, what happens is that Clearspace tries to use the Clearspace username and the XMPP host (not the domain), which of course doesn't work because the XMPP server is sending presence information for users with the format username@example.com, not username@chat.example.com.


                                      In the future I think we should support giving administrators the ability to define both the host and the domain (like I think you mentioned above) but for now what you'll have to do is let users enter their XMPP jid manually. To do this, uncheck the 'use common usernames' checkbox in the admin console and then end users will be able to enter their XMPP jid by editing their profile.


                                      Let me know if that works.





                                        • Re: More presence jankiness

                                          I unchecked the use common username checkboxes and went back in my profile, and you know what, I'm still doomed


                                          XMPP JID: (editable textbox)@hostname


                                          It does not allow me to enter anything but the uid portion of the JID... and the familiar hostname part is there.


                                          So I get why logically it may not be working right but what I don't get is no one else seems to be running into this, although maybe everyone is running their XMPP domain as a subdomain. I just feel like, based on the simple set of variables here, there's no way I could be the only one running into this... unless something is just pooched in my setup somehow, which so far, is not apparent.


                                          Yah, having a second setting to override what Clearspace determines the domain to be would be useful. On a more long term level it would probably make more sense if Openfire was reporting its value of xmpp.domain to Clearspace at the time Clearspace makes a connection as an external component. Maybe this value is already queryable and Clearspace isn't doing that? Or maybe it is trying and that's what's failing in my case?

                            • Re: More presence jankiness

                              First note: this user profile used to be "qhartman", but since I've taken his place and reused his account it had the side-effect of changing all the earlier forum posts.  Oops.  The problem that he/we had in the original post was rather trivial, actually.  Whereas the chat server itself was chat.domain.com, the domain should have been configured to be "domain.com" but was in the configuration as "chat.domain.com".  Eric