Mar 26, 2009

NFS problem: RPC Error: Program not registered

I have prepared the /etc/exports, executed exportfs -ua; exportfs -a at the server side (a RHLS). The fstab file is setup at the client side. There is no problem in the content of these files (they are verified at other server/client pairs). But when I invoke mount -a in the client side I get the following error:

RPC Error: Program not registered

This error message is rather misleading, someone is the net argue that it is caused by the network mask setting in the /etc/exports, while there are a dozen of other causes found by google. The real cause of my case is that nfs is not started in RHLS. Everything went fine after I have invoked "/etc/init.d/nfs restart"

Mar 22, 2009

Cruisecontrol JavaMail error

I have configured htmlemail publisher for the cruisecontrol. Unfortunately, I have encountered the following error while sending email:
501 5.0.0 HELO requires domain address.

After some digging on google, the solution is found to be add <$(hostname)> in the etc/hosts file.

Mar 12, 2009

Find the full path of your bash script

Usually people use the following way to get the fullpath of bash script (for the sake of various reasons, like locate the base dir etc):
export mypath=$dirname{"$0"}

However you can't get absolute path with this method, it get the relative path of $0

Someone use this code to probe the path:
export mypath=$dirname{$PWD}

This is unfortunately does NOT reach your goal: to get the full path of the script location. It turns out the full path of your current dir when you invoke the script.

A tested solution is provided by someone's posts to this thread:

# bash - find path to script
abspath=$(cd ${0%/*} && echo $PWD/${0##*/})

# to get the path only - not the script name - add
path_only=`dirname "$abspath"`

#display the paths to prove it works
echo $abspath
echo $path_only

Another interesting article about this topic can be found at google code

Mar 10, 2009

Install virtualbox on ubuntu 8.10

virtualbox is a virtualization solution for x86.

I am trying to install virtualbox on ubuntu 8.10 amd64 with "sudo aptitude install virtualbox-ose". It ends up with the following error message:

Error! Your kernel source for kernel 2.6.2-7-generic cannot be found at /lib/modules/2.6.27-7-generic/build or /lib/modules/2.6.27-7-generic/source. Installing initial module

Error! Could not locate vboxdrv.ko for module vboxdrv in the DKMS tree.
You must run a dkms build for kernel 2.6.27-7-generic (x86_64) first.

This error is solved by running "sudo aptitude install linux-headers-$(uname -r)" as suggested by some Einstein at here.

Mar 8, 2009

CruiseControl modificationset not work on SVN

I am trying to apply CruiseControl on PoC CP building. One strange problem I have encountered is cruisecontrol cannot detect the modification in SVN, i.e. someone commit new changes into SVN, but cruisecontrol was not able to detect the modification, in the log file you can find "No modifications found, build not necessary", even though the svnbootstrapper has just updated the changes from repository to your local copy.

This is found due to the time on the SVN server behind the time on the build server. After correct the time lag, everything went fine

About Me

My photo