Migration from ejabberd to jive messenger

Hi folk,

A couple of my transport users mentioned Jive Messenger to me recently (and at the time had bug reports to file lol sigh), and I decided to check it out yesterday. Well, I have come to the conclusion that I like it a lot better than the other servers I’'ve used and would like to look into using it full time. That said… I am not about to redo users and rosters by hand. So I was wondering if anyone has already written a script to migrate from one to the other? If not I will probably write one myself and make it available. Has anyone ever made this migration? (even if it involved “convert ejabberd to jabberd1 format, convert jabberd1 format to jabberd2, convert jabberd2 to jive”… in other words a trail of conversions) Thanks!

Daniel

I think you can create a couple of users in test JM installation, then export them with User Import Export plugin (http://www.jivesoftware.org/messenger/plugins.jsp) and take a look at xml structure. And then you can write a script for converting your user database to fit that structure. I think Ryan should comment this thread soon and give more information on this

=) Yeah that was more or less what I was thinking about doing. Basically was going to do this:

  1. Use ejabberctl to dump out the ejabberd database

  2. Write a perl script (probably) to parse this and convert it into the format user import/export is expecting

Either that or put the entries directly into the mysql database in the layout that jive is expecsting.

That said, I noticed something. . . . So I’‘m the author of PyICQ. And I tested it with Jive and all seemed to work well. I registered with the transport and then subscribed to the presence of all of my contacts. The thing that confused me is, when I went to play with user import-export a bit, I did export to screen. What I then found is that the icq jid’‘s weren’‘t… jid’‘s. They were the actual ICQ number and nothing else. For example, my ICQ number is 15755471 (no I’‘m not afraid to post it ;D ). In my test account’‘s roster that has me in it’‘s buddy list, I saw 15755471 show up… -not- 15755471@icq.syphon.vorpalcloud.org, which is what I was expecting. In fact, I’‘ll post here exactly what I have exported to me, with some things X’'d out.

So why are those jid’‘s not jid’‘s? Is this a weirdness with the import-export piece, or a weirdness with jive or something else? The thing is is that it’'s working. I can -see- 15755471@icq.syphon.vorpalcloud.org in my roster. I can talk to him. Everything is fine. So my assumption is that import-export is upset at me and thinks I am of low quality. =)

Thanks!

PS. When I write said script, do you all have a place where you like to put helper scripts? I’'m the maintainer of scriptrepo.jabberstudio.org, so I could throw it there if nothing else.

Daniel

Daniel,

We’‘ll have to let Ryan chime in since he’‘s the author of the user import/export plugin. However, my guess is that he’‘s not writing out the full JID so that you could switch domains when moving between servers. So, if on foo.com, you could switch to bar.com since the JID entry is “mike” and not "mike@foo.com". If that’'s the case, the plugin should check the domain portion of the JID and only not write out the full JID if the domain is an exact match with the local server. So, "mike@foo.com" could still be “mike”, but "123672@icq.foo.com" would still be "123672@icq.foo.com".

-Matt

But there’'s no way of knowing what the rest of the jid should be!

Like if I were to have all of the entities of myself in my roster right now, I would have:

daniel@jabber.vorpalcloud.org

daniel@jabber.eos.ncsu.edu

jadestorm@jabber.org

thejadestorm@aim.jabber.vorpalcloud.org

15755471@icq.jabber.vorpalcloud.org

vorpalcloud@yahoo.jabber.vorpalcloud.org

jadestorm%nc.rr.com@msn.jabber.vorpalcloud.org

And in the import-export I would end up with

daniel

daniel

jadestorm

thejadestorm

15755471

vorpalcloud

jadestorm%nc.rr.com

of which I’'d have no way of telling what goes with what jabber domain.

I definitely see where you are coming from there, but this particular instance will break because of it. =( Hrm… Ryan, what if the export exported the jid as is, and import allowed you the option of a regex substitution on import. Like on import you could enter, effectively, s/jabber.vorpalcloud.org/ninja.vorpalcloud.org/

BTW, this forum software rules =)

Hey Daniel,

Welcome. It’'s cool to have the PyICQ author using JM.

I checked the plugin code and I can see that the import-export plugin will export the JID (bare JID) of each contact in your roster. Since the generated file includes only 15755471 instead of 15755471@icq.syphon.vorpalcloud.org I would like to make some checkings to locate the source of the problem.

Could you restart the server and log in again? Open a traffic window in the client that you are using to monitor the sent and received XML. Log in using a new account so you can register again with the gateway. I would like to check the JIDs that you are receiving. Are you receiving the complete JID when your client is receiving the authorization requests? Are you receiving the complete JID after you accepted the authorization request?

Feel free to post the XML traffic that you are having.

Regards,

– Gato

Ok here goes ;D I’'m not seeing anything here that looks like it should be causing problems. (unless roster-subsync is confusing jive, which I doubt)

Also, here’'s a xml dump of “logging in fresh” after having registered, just so I can see that the proper roster is being returned:

So I’'m the

author of PyICQ.

jadestorm… now i recall Nice to see you here. It was me emailing you about problems with main.py and Python 2.4 on Windows 2000 So have you found out what was causing this?

Oops, after reading more carefully the plugin code I see that the domain is being removed. I filed the Jira issue JM-368 for this problem so that the complete JID is exported instead just the node of the JID.

Thanks for the bug report.

Regards,

– Gato

=D Ok but if I add the full jid in the “file to import” that I create, I should be good to go? In other words, the export bug won’'t affect a fresh import? (or is the import expecting no jabber domain either?)

So I’'m the

author of PyICQ.

jadestorm… now i recall Nice to see you here. It

was me emailing you about problems with main.py and

Python 2.4 on Windows 2000 So have you found out

what was causing this?

Sort of =) I received a patch for a lot of the problems that could occur under Windows. I’‘m going to fire up PyICQ on my own windows machine at home and see what I can figure out. I am still baffled as to why the loop is occuring at all. It’‘s a simple string search in a string that -has- the substring in it. So yeah, why isn’'t it saying “hey look! I found the string!” maybe the string handling is just a jerk ;D

The same problem affects the import too. The plugin assumes that only the node of the JID is in the XML file so it will append @hostname to recreate the JID. We will have to wait for a fix which may happen today.

Regards,

– Gato

Hey Daniel,

I had the same problem using PyAIM. Under windows PyAIM was entering into an infinite loop and the workaround was to comment on a couple of lines. I recall that the problem was that Python was not finding a substring or something with String management. AFAIK, no fix was provided for that problem.

Regards,

– Gato

facepalm You know, I forgot that this is just a plugin, and so I can just upgrade it ‘‘on the fly’’. I was thinking “oh man… I’'m going to have to wait for a new jive messenger release and/or pull from SVN”. ;D Yay! Should I mark this answered or wait until it’'s actually fixed?

Daniel

chuckle I wrote that one too. ;D Need to have a serious sitdown with Windows apparantly.

Daniel

Hey Daniel,

I had the same problem using PyAIM. Under windows

PyAIM was entering into an infinite loop and the

workaround was to comment on a couple of lines. I

recall that the problem was that Python was not

finding a substring or something with String

management. AFAIK, no fix was provided for that

problem.

Regards,

– Gato

Hey Daniel,

We also provide nightly builds which are usually quite stable. You can download them from url=http://www.jivesoftware.org/nightly.jsphere[/url]. Regarding marking this issue as answered is up to you. However, we will try to provide a fix for this issue quite soon. Stay tuned.

Regards,

– Gato

Hey Daniel,

Attached you will find the new plugin version that will export the bare JID of the contacts instead of just the JID’'s node. FYI, we created this other issue JM-369 useful when renaming the hostname of the server. Let me know how it goes.

Regards,

– Gato

That’‘s definitely exporting correctly! Now to write the script to convert ejabberd’‘s dump to the import/export format. =) Thanks!!! Leaving this listed as “not been answered” until I can test the import. (if that’‘s cool let me know if that’‘s not I don’'t know how much you use the answered indicator)

Ok I do have one related question =) And an observation.

First the question. The roster items have the following three attributes and I have no clue what the number associated with them means:

askstatus

recvstatus

substatus

Some are -1, some are 3. The schema seems to indcate that it can range from -1 to 3. I don’‘t see anything in between. What do these values represent? I’‘m pretty positive I know what two of the status’‘s mean, but I’'m not sure what recvstatus means. Is that “received a subscription request”? like maybe…

askstatus = i asked to subscribe to this person

recvstatus = they asked me

substatus = we’'re cool, and subscribed

?

The observation is that:

Doesn’‘t contain the full jid. That’'s not going to be a problem right now… but if you all ever decide to implement virtual hosts it might become one. =)

Also, I was wondering… lets say my server is called jabber.vorpalcloud.org (which it is, but hey), and it used to be called syphon.vorpalcloud.org. I go to change the base jabber domain on everyone and … at that point I believe I’‘m not considered to be the same person to other servers. (s2s) daniel@syphon.vorpalcloud.org != daniel@jabber.vorpalcloud.org and if someone had daniel@syphon in their roster, daniel@jabber shouldn’‘t work should it? Reason I say this is, I’‘m not sure how well changing domains would even flow -unless- you don’‘t care about s2s at all. Am I wrong here? (just curious if I’'m not understanding something correctly)

Anyway, thanks much for the quick patch! I’'m brainstorming my script as we ‘‘speak’’. =)