Lab: Build and Administer Your Own Liberty Application Cluster

Get hands-on experience using the new Liberty collective and cluster capabilities by following this lab!

Presented at Impact 2013, “Build and Administer Your Own Liberty Application Cluster” takes you through setting up a collective, configuring a cluster, and executing administrative actions using Jython scripting.

The lab takes approximately 1.5 hours to complete, and guides you through each step. At the end of the lab, you will have configured a highly available Liberty collective and deployed applications into a Liberty cluster using the sample scripts available in the wasdev.net repository.

Liberty profile Network Deployment can be downloaded as a trial if you do not already have a WebSphere license.

Lab instructions:
https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/labs/Lab-CollectivesClusters.pdf

Lab materials:
https://public.dhe.ibm.com/ibmdl/export/pub/software/websphere/wasdev/labs/Lab-CollectivesClusters.zip

  • Dave Westerman

    Should this lab work on Windows 7? I think I’ve translated everything correctly between Linux and Windows, but I’m getting the following error, when I try to start or stop a server (those are the only two commands I’ve tried so far):

    C:IBMWLPND855>jython %LAB_MATERIALS%sample_scriptsstopServer.py –serverHost=localhost –serverUsrdir=%WLP_INSTALL_DIR%usr –serverName=myMember1 –host=localhost –port=9443 –user=admin –password=adminpswd –truststore=usrserversmyControllerresourcessecuritytrust.jks –truststorePassword=password
    Connecting to the server…
    Successfully connected to the server “localhost:9443″
    Server did not stop: return code = 2

    Is there some trace I can turn on to see some details about what might be going wrong?

    And yes, the server is running when I try to stop it, and not running when I try to start it.

  • fmhwong

    Return code 2 from the stopServer script means the server cannot be
    found. Your member might be registered with the real host name. Please try again with –serverHost=.

  • Thomas

    Hi all, thanks for the lab.

    For all stop/start // Server/Custer python script I got an error 30
    I read it’s mean the Java version is not correct… is that right?

    #jython ./stopServer.py –serverHost=think.ibm.com –serverUsrdir=/opt/wlp/usr –serverName=member1 –host=localhost –port=9443 –user=admin –password=adminpwd –truststore=/opt/wlp/usr/servers/controller1/resources/security/trust.jks –truststorePassword=password –debug

    Connecting to the server…
    Successfully connected to the server “localhost:9443″
    stdErr= None
    stdOut= None
    returnCode= 30
    Server did not stop: return code = 30

    However I use java 1.7 (I got the same error with 1.6)

    #java -version
    java version “1.7.0″
    Java(TM) SE Runtime Environment (build pxi3270sr1ifix-20120419_02(SR1+IV19490+IV19661))
    IBM J9 VM (build 2.6, JRE 1.7.0 Linux x86-32 20120322_106209 (JIT enabled, AOT enabled)

    #tail /opt/wlp/usr/servers/member1/logs/console.log
    Launching member1 (WebSphere Application Server 8.5.5.0/wlp-1.0.3.20130524-0951) on IBM J9 VM, version pxi32forks-20120419_01 (SR1+IV19490+IV19661) (en_US)

    Thanks for your help

    • Thomas

      I found the origin of the problem. It come from my system config. For unknown reason the controller use the java command defined by “alternatives” to communicate with members, not the java defined in the PATH or in java_home… That’s weird, but the problem doesn’t come from the lab or the script…

      After deleting the old java 1.4 I get a “java not found” error as a return from the java server….