Posts Tagged ‘Ubuntu’


14.12.2008

MeAggregator server problems

posted by Karsten

in RedGloo

I'm working on a MeAggregator Server, which has been causing me great problems. The biggest problems have been with getting the roster functionality of xmpp4r to work under rails.

The need for this is to validate and display the actual status of the FFS. This is quite important is this will allow code to start and stop the services of the MeAggregator.

Unfortunately this hasn't been easy. First off I started developing on a Windows box at work. I coded in the roster in each function call. This didn't work as the xmpp4r library only keeps a running status of registered users, thus if the roster was created for each call, the roster would be empty each time used, this resulted in the code showing an offline FFS even though it was online.

This lead me to think that I should create a service running along side rails handling the xmpp connection. I found the rails plugin backgrounDRb which should do exactly this. I installed it, and discovered after a while, that for the same reasons that a abadoned creating a bespoke solution this didn't work! BackgrounDRb apparently doesn't work on Windows machines.

Luckily I'm not tied in to any computer systems (as long as I don't have to use Mac which I would regard a degrading OS for a developer 😀 – not really…) so I decided to set up a development environment on my ubuntu laptop.

This didn't take long. But this was the only thing that didn't take time. I couldn't get backgrounDRb to work on my machine. Nothing worked. I kept getting strange internal exception from backgrounDRb. I found the http://mayurjain.wordpress.com/2008/08/08/no-such-file-to-load-log_wor which claimed that the solution would be to use version 0.1.5 of packet instead of later versions. This was odd, as the documentation claimed that v 0.1.7 or later was neccesary for backgrounDRb to run. And obviously this didn't work… Although the background server did start, which was more than before, it simply didn't work when starting p the actual service.

So I started digging into the mailing list of backgrounDRb, and there I found a poor soul, which had similar problmes on a Mac. The suggestion there was that parts of packet seemed to be outside the path, and thus didn't work.

Now I would have hoped that a gem like packet once installed, and a plugin like background using it, would be able to use it without the need of it to be on the path! But todays work has shown that this simply isn't an assumption which can be made!!?? Because when I did a PATH=$PATH:/var/lib/gems/1.8/gems/packet-0.1.14/bin/ in my terminal where running backgrounDRb it worked!!

I am obviously happy it works, although if this issue had not been the re, I would have had this result probably 4-5 days ago, leaving me with these days to do something productive, rather than debugging like this!

Share