Showing posts from June, 2013

ActiveMQ https

ActiveMQ supports tunneling JMS over https to transparently traverse firewalls, but the documentation doesn't indicate how to configure it and relevant examples were lacking via google. After hacking for half a day I finally stumbled upon the simple solution. Keep in mind that you will want to create you own keys and certificate. For testing I just used the ones provided in the activemq/conf dir.

Simply configure an https transport connector in conf/activemq.xml and pass the keystore, password, and truststore to activemq when started.
<amq:transportconnector uri="">
activemq start parameters
import self-signed cert into client jdk keystore
cd /path/jdk1.7.0_15/jre/lib/security keytool -import -trustcacerts -file /path/activemq/conf/broker-localhost.cert -alias activemq -keystore cac…

Ubuntu nfsv4 mount

Ubuntu documentation


Create export directory or skip if exporting an existing dir:
sudo mkdir /export/someDir Install nfs server:
sudo apt-get install nfs-kernel-server Edit /etc/exports
Add directory to export, could also be an existing dir:
/export/someDir  *(ro,sync,no_root_squash) Start nfs server:
sudo /etc/init.d/nfs-kernel-server start
Create mount point: sudo mkdir /media/someDir Install nfs server:
sudo apt-get install nfs-kernel-server Mount exported dir: sudo mount /media/someDir List all mounts


due to a bug, nfs mounts in /etc/fstab fail at startup
Create a start script to resolve the issue.

Startup/shutdown scripts:
Creates and removes /etc/init.d scripts:

sudo update-rc.d -f removesudo update-rc.d defaults

Master/Slave Management script

function trylock {
    #attempt to acquire lock
    flock -n 9 || { trylockResult=false; return; }