Blog Archives

Tungsten Replicator setting up and Gotchas

Tungsten Replicator site Clicky

So we have a big MYSQL server with mission critical data on it.

I want to replicate it accross to another MYSQL database, they are both ubuntu servers with Percona MYSQL database.

1. Preparation

Master – Install RUBY, JAVA,

Slave – Install RUBY, JAVA

edit the hosts files on both machines in etc/hosts and add the other servers in each one and reference the IP address – just makes things easier.

2. SSH

Make sure you set up SSH so that you can ssh from one server to the other WITHOUT using passwords.


make sure all ports required 10000,10001 are available (particularly problematical PLESK, WEBMIN a whole host of things like these ports) on all machines. One server actually had a PLESK tool on it even though plesk was not installed!!


make sure everything is set up and restore a backup of the database before you start.

5. Helper scripts

Set up your tungsten. You’ll need to edit to make sure your nodes are correct and USER_CONFIG as per the tungsten documentation. – put in the tungsten folder e.g. tungsten-replicator-2.1.0-343

VERBOSE=1 ./cookbook/install_master_slave ./cookbook/ (actually I renamed this to tungsten and did a chmod +x tungsten)

if [ "$1" == "help" ] || [ "$1" == "" ]; then
 echo "Commands"
 ls installs/cookbook/tungsten/tungsten-replicator/bin/
installs/cookbook/tungsten/tungsten-replicator/bin/$1 $2 $3 $4 $5

So you can type

./tungsten replicator status

To run commands.

Connecting a Netbeans EE application to a glassfish server.

Ok I pulled my hair out doing this – it seemed whatever I did I got a Null Pointer Exception when I ran the client, so here’s the solution. Sorry Sun, but I couldn’t get it working using the menu in the IDE that created this code:-

IntelligenceRemote intelligenceremote;

In this case my remote class is called IntelligenceRemote and I have a method called TransferJob(Jobnumber,Depot); 

         InitialContext ctx = new InitialContext();        
         IntelligenceRemote  test = (IntelligenceRemote ) ctx.lookup(IntelligenceRemote.class.getName());        
        System.out.println(test.TransferJob("12303", "OHH"));
        } catch (Exception e) {
        System.out.println("Could not transfer job");

Ofcourse Netbeans being wonderful it will already give you the option to add the import.

import javax.naming.InitialContext;