I'm trying to set up WMD for db2te on redhat, but having an issue that I do not understand.
Whenever I try to start WMDServiceScript.sh it blows up with this java exception:
java.net.BindException: Address already in use
at sun.nio.ch.Net.bind(Native Method)
My system is Redhat and running openjdk 1.6. I have copied over the required db2jcc* jars.
I have tried several other ports and verified that they where not in use (netstat -a | grep #port) and set access to public. I have even disabled iptables, but still no luck.
I have absolutely no idea what I am doing wrong and would really appreciate an entry level solution to this problem. Thank you very much.
So, after many attempts I finally figured out what was wrong.
It was a call to the function portIsFree() in the WARLoader. Despite calling the tcp.setReuseAddress(true); the port is not freed immediately and jetty blows up due to the port being used. I commented out the entire function and added a return true and now it works. The way I see it, there's no point in checking the port of the jetty is going to check it for you anyway.
The wiki entry for setting up a build env is out of date and needs to be updated. The SVN links are incorrect, luckily, I was able to just hit https://db2mc.svn.sourceforge.net/svnroot/db2mc/branches/WMD and see what the path was.
Okay, so to summon up, it hasen't been as smoothe sailing as I'd hoped for this - partly due to lack of documentation and partly due to OS choice. Here are the modifications required to get DB2 TE & WMD working on a RHEL environment that are not included in the instructions:
Currently, the php packages for RHEL is for php 5.1.6, which is insuffient for WMD. Use the following guide to add another repo to yum that allows you to install latest version of php:
The package "php-xml" needs to be installed.
When installing pear, I had to download go-pear.phar in order to work with the latest php version.
When installing ibm_db2 I had to initialize extra memory to allow the script to run.
There were a few other tweaks that I had to do, but they were most likely due to my system configuration.
I've added an option to specify a run mode in the start up scripts to allow the WMD server to not wait for ports to be free.
java -cp "$CLASSPATH" $JAVA_OPS WebAppServer.WARLoader -port 8060 -war WMDApp.war -access private