Categories
Linux / Gentoo Linux

Fixing XML-RPC’s in KDE4

After posting that Bilbo worked out of the box, I was bound to run into a world of trouble – and so I did

You see, when I was trying out KBlogger, I ran into the “Invalid request payload xmlrpc element STRING cannot be child of DATA” error you find in some KBlogger related posts. After playing around a little I realised that the error prevented me from posting anything and I ditched KBlogger as being buggy as hell (which it actually still is).

But when I installed Bilbo, I ran into the same problem! Only this time I knew that it should work as I posted before using Bilbo. After investigating a bit I found the culprit: KBlog. This backend library handles the communication with the server over the XML-RPC protocol. The error is produced on the server side and to be exact it is PHP XML-RPC that generates the error.

Because the XML-RPC library on the server is very strict (and probably error free), I turned to see what Bilbo actually sent to the server. The problem appears to be in the category structure that is generated. In my first posting, I did not select a category to post to. But when you select one or more categories, a QStringList object is populated with the category names. This is converted into XML somewhere in KDE (I haven’t figured out where yet).

After talking to the Bilbo devs for a bit they pointed me to the WordPress API in KBlog. For some reason, that one generates a string holding the XML for the server. And in that class, the metaWeblog.newPost function is called using a properly constructed category array.

Alas, switching to the WordPress API did not help: “STRUCT cannot be child of PARAM” and whether I used categories or not, the error remained. A quick inspection showed where that error comes from: the ‘struct’ element should not be directly put inside a ‘param’ element. The XML-RPC specifications state that the ‘struct’ should be placed in a ‘value’ element first. After fixing this and recompiling Bilbo, everything is working now!

Well, not everything as the metaWeblog API is still broken. I have filed a bug report with KDE upstream so they can add my fixes to the WordPress API and hopefully someone with more KDE programming experience can fix the metaWeblog API. Or rather, fix the conversion from a QStringList to proper XML-RPC compatible XML.

On a side note: while debugging the XML-RPC protocol I discovered that the Joomler XML-RPC plugin for Joomla! did not apply the categories that are sent along. I’ve modified my (already heavely patched) version of Joomler and once I’ve tested it a bit more, I’ll send the patches to the Joomler devs. Hooray for open source I guess ^^.

Categories
General blog entries

Why I don’t like Ventrilo

Recently I installed Ventrillo because some red necks decided we needed a voice server for EVE Online and the in-game stuff won’t cut it. Ventrillo advertises with ‘advanced’ features like surround positioning and useless crap like that.

At first glance I’d say the GUI is old-skool, bit too plain and awkward to set up for the first time. It annoys the heck out of me where all panels are placed and how it all comes together.

Perhaps profiles are useful for some but not for me: I need a separate name for all servers I use in voice chats so profiles separate from the server settings is as useful as picking up your hamburger at a different counter from your fries…

Next up is the fact that it won’t minimize into the system tray, leaving me with yet another window to lug around.

Finally it has no Linux client. Seriously. It is in the works (or so the site says) but the do have a linux server, leaving me puzzled why linux is not supported in the first place.

The only cool thing that Ventrillo has (and Teamspeak will get in version 3.0 which is currently beta) is the surround stuff… Which I can’t try because I don’t have a surround setup on this computer…

Ow I long for the days where everyone would just stick to Teamspeak, which is still masterfully better suited for voice chat than all the other programs around…

Categories
Linux / Gentoo Linux

Postfix Queues and Amavis trouble

After I had not received mail for a couple of days I suddenly started to receive postmaster errors from one of the servers I maintained. The message told me the mail could not be delivered. On further inspection it seemed that this was a problem because postfix could not connect to [127.0.0.1].

This meant of course that some daemon on the server was out for lunch and it was screwing up the mail deliveries. Using ‘postqueue -p’ to inspect the queues I found out that 4000 messages where packed up in the queue, filling her up to the maximum I allowed.

After running ‘postsuper -r ALL’ (which means, re-queue all messages for instant delivery) I tailed the ‘/var/log/mail.log’ file to find out that 20% of the messages got delivered and the rest wound up back in line.

One error that kept flashing by was: ‘TROUBLE in check_mail: parts_decode_ext FAILED: run_command (open pipe): Can’t fork at…’. It had something to do with the FileIO class. Now the message came from Amavis and in fact, amavisd is nothing more than a Perl framework, hooking all kinds of filters together. This means its memory hungry but won’t totally crash upon hitting the floor.

This explained why a part of the messages made it through: a few threads fitted in memory, allowing for completing the delivery, however most mail got rejected once again and returned faithfully to the waiting queue. Another inspection of the queue confirmed this: after 2 attempts 3200 messages where still there.

Then it dawned on me: I had not enabled the swap memory! After fixing this (and adding 1GB swap to the 256MB of RAM) and reloading Amavis I tried once again to requeue all mail. This time the mail got through the filters in one piece (and well within the memory boundaries). I wish all issues with servers were as simple as this ^-^.

Categories
Japan Blog Study Tour

An unofficial day off

Today is my day off. Well not really but I’m sick with a combination of flu and a serious cold. Yesterday I skipped the diner at the cruise ship to prevent throwing up all the way and before that I managed to survive the NHK visit while walking around with a fever.

Categories
Japan Blog Study Tour

Done packing

Well, I’m done. Not so much that I’m 100% sure that I forgot something but I already sacrificed some cookies, sugar (for in the cappuccino I’m bringing ;-)) and one of my books I bought for the trip to make the backpack close and the suitcase below the 20kg weight limit (no way I’m paying a fine for have too much luggage on the way to Japan, perhaps the way back it will be different…).

No more like I’m done with preparing for the trip – its been over a year now that we worked on papers, projects, working for companies to sponsor the trip, writing reports, taking Japanese lessons (which by the way pretty much slipped my mind before we even leave) etc etc. I’m just ready to go.

Its 2:30 AM while I’m typing this and I’m about to try to get at least 8 hours of sleep so I can stay awake during the flight and thus prevent jet-lag. But if someone called me and said: "we leave NOW" I’d be up and ready to go.

By the way, I don’t reckon I’m able to get jet-lag as I don’t have a biorhythm: I’m used to getting 9 hours sleep (give or take) and I swap day and night pretty easily. So the gut-writhing feeling everyone is describing as being jet-lag, is just one of my rough weeks 🙂 I’ll get back later on that subject to let you guys (my loyal readers *cough*) know if it worked out.

Right now, my borrowed laptop is humming downstairs, trying to squeeze as much music on my shiny new Meizu M6 (better than an iPod Nano and half the price, beat that Apple!). I kinda modified it a little by uploading the Chinese firmware which enabled the FM-radio and made the menus look cooler, but still, better than most other players.

Well, that’s it for now, time to get some sleep before the big flight.