Microsoft's BPOS Using Postfix

Submitted by cornet on Wed, 2009-06-10 13:18

Nice to see MS using opensource software :)

Email received today from someone using BPOS:

Received: from mail187-tx2-R.bigfish.com (10.9.14.251) by
 TX2EHSOBE009.bigfish.com (10.9.40.29) with Microsoft SMTP Server id
 8.1.340.0; Wed, 10 Jun 2009 10:33:02 +0000
Received: from mail187-tx2 (localhost.localdomain [127.0.0.1])	by
 mail187-tx2-R.bigfish.com (Postfix) with ESMTP id 520131100037	for
 <******@*******.***>; Wed, 10 Jun 2009 10:33:02 +0000 (UTC)

Looks like bigfish.com are using the Postfix mail server.

Quick whois on bigfish.com reveals:

    Registrant: 
      Microsoft Corporation
      Domain Administrator
      One Microsoft Way 
      Redmond, WA 98052
      US
      Email: domains@microsoft.com

Most interesting ;)

Failover hosts using Xen, DRBB and Heartbeat

Submitted by cornet on Wed, 2009-04-08 20:19

After quite a lot of reading and a morning playing I managed to get failover Xen hosts working.

The idea was to have 2 physical servers to run 2 (or more) Xen hosts between them. If one server was to die or needed some work doing
on it then the domU would automatically move to the other node.

Failover Diagram

I've done some testing and all appears to work fine. However let me stress that this is not live migration so you would suffer about a minute or so outage
(not really a big deal in the grand scheme of things).

Click the "Read More" button for full details on the setup.

MySQL AUTO_INCREMENT Madness

Submitted by cornet on Thu, 2009-04-02 11:04

Can anyone explain this behaviour ?

mysql> select version();
+--------------+
| version()    |
+--------------+
| 5.1.30-2-log | 
+--------------+
1 row in set (0.00 sec)

mysql> create database foo;
Query OK, 1 row affected (0.01 sec)
mysql> use foo;
Database changed
mysql> CREATE TABLE test ( 
   id bigint(20) NOT NULL AUTO_INCREMENT,
   stuff varchar(10) DEFAULT NULL,
   PRIMARY KEY (id)
) ENGINE=InnoDB;
Query OK, 0 rows affected (0.04 sec)

mysql> SHOW CREATE TABLE test \G
*************************** 1. row ***************************
       Table: test
Create Table: CREATE TABLE `test` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `stuff` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

mysql> INSERT INTO test (id, stuff) VALUES (-1,'Hello!');
Query OK, 1 row affected (0.04 sec)

mysql> SELECT * FROM test;
+----+--------+
| id | stuff  |
+----+--------+
| -1 | Hello! | 
+----+--------+
1 row in set (0.00 sec)

mysql> INSERT INTO test (id, stuff) VALUES (0,'Hello!');
ERROR 1467 (HY000): Failed to read auto-increment value from storage engine

mysql> SHOW CREATE TABLE test \G
*************************** 1. row ***************************
       Table: test
Create Table: CREATE TABLE `test` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `stuff` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=18446744073709551615 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

We have found a workaround (sort of):

mysql> DROP TABLE test;
Query OK, 0 rows affected (0.04 sec)

mysql> CREATE TABLE test (
   `id` bigint(20) NOT NULL AUTO_INCREMENT,
   stuff varchar(10) DEFAULT NULL,
   PRIMARY KEY (`id`) 
) ENGINE=InnoDB;
Query OK, 0 rows affected (0.10 sec)

mysql> INSERT INTO test (id, stuff) VALUES (-1,'Hello!');
Query OK, 1 row affected (0.03 sec)

mysql> SHOW CREATE TABLE test \G
*************************** 1. row ***************************
       Table: test
Create Table: CREATE TABLE `test` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `stuff` varchar(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1
1 row in set (0.00 sec)

mysql> INSERT INTO test (id, stuff) VALUES (0,'Hello!');
Query OK, 1 row affected (0.03 sec)

mysql> SELECT * FROM test;
+----+--------+
| id | stuff  |
+----+--------+
| -1 | Hello! | 
|  1 | Hello! | 
+----+--------+
2 rows in set (0.00 sec)

For those that missed it, the difference is the backticks in the CREATE TABLE line.
Also I've yet to test with other versions.

Update

Looks like this is a bug that was fixed in 5-1-31

http://bugs.mysql.com/bug.php?id=41841
http://bugs.mysql.com/bug.php?id=36411

Digital Hologram

Submitted by cornet on Wed, 2009-03-11 07:06

Just found this via Chase Jarvis' Blog.

The concept is quite cool although I'm not convinced we'll see it used that much in the way it has on GE's Ecomgination site. A bit too much hassle for my liking.

The tech is taken care of by the FLARToolKit if anyone is interested.

This morning, in #mysql

Submitted by cornet on Thu, 2008-10-02 07:36

Some people are just too transparent :)

05:23 -|- MyName [n=MyName@********************] has joined #mySql
05:23 <MyName> if i have a table of 3 columns, and 3 rows, and i do a cartesian
product of the table with itself, do i get 6 columns and 9 rows?
05:24 <MyName> if the table originally have column names (A B C), do i get ( A
B C A B C) as the column names after the cartesian product?
05:24 <MyName> then all the entries are just each entry of the original tables
with each of the entreis again?
05:25 <MyName> or do i eliminate any duplicate columns?

... after no response for some time

06:21 <MyName> hello?
06:22 <pc_> hello
06:22 <Gm4n> hello!
06:27 <MyName> ok
06:27 <MyName> if i have two tables , one is movies(title, studio), and the other is stars(name, title)
06:28 <MyName> i want to find all stars who played in ALL movies by studio "ABC" for example
06:28 <MyName> not all stars who played in movies by studio ABC, but all stars who played in ALL movies by ABC
06:28 <pc_> MyName, when is it due?
06:28 <MyName> tomorrow
06:28 <pc_> lol
06:28 <Gm4n> haha

Sun Java on Debian/Ubuntu

Submitted by cornet on Thu, 2008-09-18 15:09

It would appear that even if you install ONLY the sun java package it
drags in some GNU java stuff as well.

You can go through everything in /etc/alternatives and update it
manually but that is somewhat time consuming.

Instead just run:

sudo /usr/sbin/update-java-alternatives --set java-1.5.0-sun

and this will sort everything :)

Dropbox

Submitted by cornet on Wed, 2008-09-17 23:15

Somone appears to have created a online storage and sync thing that actually works:

Dropbox - Home - Secure backup, sync and sharing made easy.

Few grips thou:

  • It requires nautilus
  • Not obvious how to create an account (it's not on the website, the client does it)
  • The initial dialog box (which you use to sign up for an account) takes an age to appear

All that aside it works wonderfully, copy file into ~/Dropbox and it syncs automatically :)

... oh and it versions files too
... and only sends binary diffs

Another blog added

Submitted by cornet on Thu, 2008-08-07 06:18

Another one I've just added to my feedlist,

http://blog.kovyrin.net/

some interesting stuff, especially on the MySQL front.

He is also the author of the MySQL Master-Master Replication Manager
which can be found here:

http://code.google.com/p/mysql-master-master/

definitely something I'll be looking at.

Nokia MMSC Server

Submitted by cornet on Fri, 2008-07-25 19:29

Nokia's MMSC is a stunning example of how to make problems as hard as possible to debug.

The MMSC can speak a number of protocols over HTTP including EAIF and MM7. As you would expect you submit your POST and get back a HTTP Error Code and Message. However the Codes and Messages leave a lot to be desired:

So lets take the 499 Error code which, according to their spec, can mean:

  • Address Hiding - basically reject all messages to this Number
  • Desired Delivery Time Error - aka delivery time set too far in the future
  • No Credit
  • Recipient Barred
  • Sender Barred
  • Rejected - or "We ain't gonna tell you why"

No surprises for guessing which one I'm seeing at the moment :)

Next comes the legendary 599 Error Code, again lets look at the spec.
This can mean:

  • CCR Error - Rejected as the MMSC has exceeded the number of messages licensed
  • Capacity Exceeded - Number of msgs/second exceeded
  • Kernel Overloaded
  • DB Error - Message could not be stored in database

although in our case we normally see "No reason given or reason given not included in EAIF specification".

If the above wasn't fun enough, Nokia obviously doesn't think it is, if you use the Nokia MMSC Client libs they will generate their own 666 error code if they don't get anything back from the MMSC. Great!

Seriously, how do people manage to come up with this crap. If you're going to define Error codes and Messages then FFS use them and don't have a "Oh we can't be bothered to tell you why" message.

XMLStarlet

Submitted by cornet on Tue, 2008-06-24 07:32

I'm not the greatest fan of XML for much the same reasons as Jeff Atwood who wrote a controversial blog post on the subject.

Sometimes though I'm forced to deal with it. XMLStarlet looks like it might relieve some of my frustration.

Thanks to BASH Cures Cancer for flagging this.

Syndicate content