Trouble with WMD

Help
2011-04-04
2013-04-05
  • Jens Lundgren
    Jens Lundgren
    2011-04-04

    Hello,

    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)
    at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:137)

    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.

    - Jens

     
  • 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:
    http://heanet.dl.sourceforge.net/project/db2mc/Setup%20Instructions/Linux%20Setup%20Instructions/TERedHatSetupInstructions.pdf

    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:
    http://chrisschuld.com/2010/05/adding-the-remi-repository-to-centos-rhel-redhat/

    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.

    • WMD -
      As described in the previous post, you need to get the source code for WARLoader, edit the class to either not call the function portIsFree() or set it to return true and add the the class file into the wmd-server.jar

    There were a few other tweaks that I had to do, but they were most likely due to my system configuration.

     
  • Paul Johnson
    Paul Johnson
    2011-10-21

    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.

    ie.

    JAVA_OPS="$JAVA_OPS -Dmode=test"
    java -cp "$CLASSPATH" $JAVA_OPS WebAppServer.WARLoader -port 8060 -war WMDApp.war -access private