STOMP (Streaming text oriented messaging protocol) is a wonderful protocol to use as simple messaging for real time applications and is integrated in (for example) Apache MQ and Orbited. However, all their clients are for online languages (php, perl, ruby) and the client was built using Mac.

Don't get me wrong, I love my mac, but my servers run linux. Here is how you do it (from http://www.jboss.org/community/wiki/buildingblacktie?decorator=print)

The entire next section is based from above mentioned source, albeit altered to fit Debian:

INSTALL LIBSTOMP

  1. svn co -r 85 http://svn.codehaus.org/stomp/trunk/c libstomp

ON LINUX

In order to create the library for use with our Stomp transport on Linux you need to make a couple of alterations:

  1. apt-get install libapr1
  2. apt-get install libapr1-dev
  3. Download the attached stomp.c.patch to your home directory (their src, my mirror)
  4. cd libstomp
  5. Create the following file as build.sh
  6. #!/bin/bash
    OUT_DIR=target/debug/shared
    mkdir -p $OUT_DIR
    gcc -fPIC src/stomp.c -shared -o$OUT_DIR/libstomp.so -I. -I/usr/include/apr-1.0 -lapr-1

  7. patch -p0 -i ~/stomp.c.patch
  8. ./build.sh

I've taken the liberty to mirror the patches as well.

stomp.c.patch
stompconnect.patch
Zeh Fernando, one of my RSS favorites, writes about maintaining open source projects. A good read, good slides.

Article can be found on zehfernando.com

Build and release

| | Comments (0)
"3. Build and Release. Stop thinking you understand your users. You think users will love this or that and you'll probably be wrong. So don't spend 6 months building features users may not love or will only use 20% of. Learn from what users actually do on your site. Avoid analysis paralysis, especially as you get larger. Decide, build, release, get feedback, iterate."

Source
This month I will host a series of lectures and workshops for Hyper Island (www.hyperisland.se) The first one is about the need of communication between ADs and developers.

In total they will span over six days.
Sandisk usb sticks are filled with extra software and even extra partitions. Fortunately, they are easy to remove. To remove it and wipe everything clean (and I do mean everything on the drive)

  1. Download the U3 Uninstaller (http://u3uninstall.s3.amazonaws.com/U3Uninstall.exe)
  2. Install it
  3. Run the software, choose remove and wipe clean.
Done! Simple as that
Flashing BIOS should be an easy thing, assuming you have floppy drives in both server and desktop - not to mention still owns disketts. Here is how you flash it with a USB drive instead.

  1. Format your USB drive (if you own a sandisk and want to remove the extra partition with the annoying software on it (depending on how good your bios is to boot from USB - this can be a must) view this post
  2. Download HP Create Boot Utility (Google for sources)
  3. Download win98boot.zip (Google for sources)
  4. Unpack win98boot.zip to folder win98boot (make sure to retain folder structure)
  5. Install HP Create Boot Utility
  6. Run HP Create Boot Utility
  7. Choose your USB drive
  8. Choose "Create Boot disk" from source: <Choose your win98boot folder>
  9. Download your bios firmware (or unpack the .exe from supermicro, I used a virtual a: drive with paralells to do this: Create the floppy in parallels (win xp), run the supermicro flash .exe, copy the files from a:)
  10. Copy all the files into your USB drive
  11. Unmount USB
  12. Put your USB drive in your server
  13. Go into BIOS menu, boot options
  14. Make sure your USB drive is high on the boot priority, I usually use: 1: USB, 2: CD, 3: HDD
  15. Exit bios, let the USB drive boot
  16. Run "flash <your bios version>.rom". (If you don't have a <your bios version>.rom, you probably have a <your bios version>.zip, use: "unzip <your bios version>.zip"
  17. It will flash and restart the server. When it does, remove your USB stick
That's it! It looks like a lot of steps, but most is pretty straight forward.
As I've previous written about I've had problems connecting to my tele2 internet. I've tried changing modem but while it appeared to be working a while, it stopped later on the same week. My second approach was to set DNS and APN manually. Some background:

When I tried to connect I got to "Authenticating" and then it simply timed out. My logs said:

Sun Jul  5 15:12:01 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Sun Jul  5 15:12:04 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Sun Jul  5 15:12:07 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Sun Jul  5 15:12:10 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Sun Jul  5 15:12:13 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Sun Jul  5 15:12:16 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]

And Launch2Net said that it tried to get TCP/IP settings but timed out. Thus I had a hunch that it was failing to get IP adress and/or DNS. I scrolled through the logs, and found this (from a successfull attempt):

Sat Jul  4 16:10:05 2009 : Could not determine remote IP address: defaulting to 10.64.64.64
Sat Jul  4 16:10:05 2009 : local  IP address 90.130.200.117
Sat Jul  4 16:10:05 2009 : remote IP address 10.64.64.64
Sat Jul  4 16:10:05 2009 : primary   DNS address 130.244.127.161
Sat Jul  4 16:10:05 2009 : secondary DNS address 130.244.127.169

And knowing that tele2s APN was mobileinternet.tele2.se I tried to use a custom configuration with:

APN: mobileinternet.tele2.se
User: <blank>
Pass: <blank>
DNS #1 and #2 as above.

So far so good, I could connect, I got a new IP. My log says:

un Jul  5 15:17:49 2009 : ipcp: returning Configure-NAK
Sun Jul  5 15:17:49 2009 : sent [IPCP ConfNak id=0x0 <addr 0.0.0.0>]
Sun Jul  5 15:17:49 2009 : rcvd [IPCP ConfNak id=0x3 <addr 90.130.237.92> <ms-dns1 130.244.127.161> <ms-dns3 130.244.127.169>]
Sun Jul  5 15:17:49 2009 : sent [IPCP ConfReq id=0x4 <addr 90.130.237.92> <ms-dns1 130.244.127.161> <ms-dns3 130.244.127.169>]
Sun Jul  5 15:17:49 2009 : rcvd [IPCP ConfReq id=0x1]
Sun Jul  5 15:17:49 2009 : ipcp: returning Configure-ACK
Sun Jul  5 15:17:49 2009 : sent [IPCP ConfAck id=0x1]
Sun Jul  5 15:17:49 2009 : rcvd [IPCP ConfAck id=0x4 <addr 90.130.237.92> <ms-dns1 130.244.127.161> <ms-dns3 130.244.127.169>]
Sun Jul  5 15:17:49 2009 : ipcp: up
Sun Jul  5 15:17:49 2009 : Could not determine remote IP address: defaulting to 10.64.64.64
Sun Jul  5 15:17:49 2009 : local  IP address 90.130.237.92
Sun Jul  5 15:17:49 2009 : remote IP address 10.64.64.64
Sun Jul  5 15:17:49 2009 : primary   DNS address 130.244.127.161
Sun Jul  5 15:17:49 2009 : secondary DNS address 130.244.127.169

You can see the above call for IP:

Sun Jul  5 15:17:49 2009 : rcvd [IPCP ConfNak id=0x3 <addr 90.130.237.92> <ms-dns1 130.244.127.161> <ms-dns3 130.244.127.169>]
Sun Jul  5 15:17:49 2009 : sent [IPCP ConfReq id=0x4 <addr 90.130.237.92> <ms-dns1 130.244.127.161> <ms-dns3 130.244.127.169>

Which seems to work much better now, using a fixed DNS. But since I prefer to use OS X native (no third party applications - specially those who cost 80EUR) I opened my Huwaei network settings and added the DNS manually as well. So far so good.
If you've created a new domain using xen-tools you might run into the situation that the console works, but if you SSH in you get:

"PTY allocation request failed on channel 0" and "stdin is not a tty"

You need to install udev. Connect via console (xm console <domain id>) (you can get <domain id> with xm list) and simply run:

apt-get install udev

And restart / stop+start. Problem solved!

PS: Don't forget to apt-get install build-essentials
Recently I've bought and installed a Super Micro server (The usual raid-1 and IPMI configuration) but was puzzled by a rather odd problem: The IPMI card worked and I could control it via web interface. But neither ipmitools nor Supermicros own configuration system works.

After a quick talk with the support the problem was quite obvious: Turns out that the older IPMI firmware has a known bug that makes it impossible to use anything but the web interface. Unfortunately for me, the CD I got with the package had the old firmware.

As always, open the following ports:
 
UDP Port 623 for IPMI protocol
TCP Port 80 for Web User Interface
TCP Port 443 for KVM Over Lan
On the Client side you need to open UDP Port 6666 for Text Console Redirection

However, I must say I'm impressed by Supermicros internationall support. Quick replies, polity and accurate.
Recently my 3G mobile internet has begun to fail at an increasing rate. Basically, it doesn't fetch a IP and hangs at "Authenticating". I enabled verbose logging (OS X - System Preferences - Network - Huawei - Advanced - PPP - Settings: Configuration - Verbose logging)

And checked the logs (Application - Utilities - Console - /var/log/ppp.log) and found:

Mon Jun 29 19:06:22 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Mon Jun 29 19:06:25 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Mon Jun 29 19:06:28 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Mon Jun 29 19:06:31 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Mon Jun 29 19:06:34 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Mon Jun 29 19:06:37 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Mon Jun 29 19:06:40 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Mon Jun 29 19:06:43 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Mon Jun 29 19:06:46 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Mon Jun 29 19:06:49 2009 : sent [IPCP ConfReq id=0x2 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns3 10.11.12.14>]
Mon Jun 29 19:06:52 2009 : IPCP: timeout sending Config-Requests
Mon Jun 29 19:06:52 2009 : sent [LCP TermReq id=0x2 "No network protocols running"]
Mon Jun 29 19:06:55 2009 : sent [LCP TermReq id=0x3 "No network protocols running"]

Basically, timed out. Talking to support they didn't see any problems. They thought it was a drivers related problem. But since I couldn't connect on Windows either (via parallels) I thought it might be a hardware problem.

Here's the tricky part: I have a spare Huawei E220, but locked on another provider. Thus I needed to unlock it to even try my hardware problem thesis. Turns out unlocking Huawei E220 was quite easy, a lot easier that up to date cellphones from Nokia or Sony Ericsson.

I won't go into the deails of unlocking here (not sure about the legality about describing the process) but it's pretty clear-cut and can be found on Google.

Turns out I was right, hardware indeed. And now I can connect again.