28 Aug 2012
August 28, 2012

WebSphere & JEE FAQ

August 28, 2012 Blog 336 Comments

This post is designed as a place to post your questions on JEE and Middleware Topics. I am not monitoring these full-time, but I do answer as many as I can, when I can. Please appreciate I have limited time to hep everyone,but I do try to help as many people as I possible can.

Etiquette:
Some topics that you may ask can involve time to answer, so please post as much detail as you can about the context of your problem. Just posting a stack trace or error code will not help me help you. The more information you give the better myself and others are able to help you with your problem.

Thanks and regards,
Steve Robinson – Middleware Mentor (http://www.themiddlewareshop.com)

336 Responses to WebSphere & JEE FAQ
  1. Hi Steve,

    We had a very typical requirement where we want to override the request distribution property of plugin and route the requests as per our requirements, we are using Websphere Application server ND V7.0

    Could you please let me know if it is possible to do so, if yes then how?

    Please reply to the above post,

    Thanks.

  2. Hi,

    I’m facing problems while using a variable in jacl script.
    For e.g.

    set mod module
    set uri moduleejb.jar,META-INF/ejbjar.xml
    set server WebSphere:cell=mycell,cluster=mycluster
    $AdminApp install /path/myear.ear {-MapModulesToServers {{$mod $uri $server}}}
    $AdminConfig save

    The problem is that the script is not recognizing $mod, $uri and $server. However if I hard code the values, it works. Could you please let me know where I’m going wrong?

    Regards
    Prad

    • You are not assigning values to vars for easy use. Use strings, it is simpler and more common in other languages too until you learn other techniques like arrays/lists

      set dollar “This is a string \$contain dollar char”

      Look in IBM Information Centre for WAS 6 there are plenty of JACL examples in the content.
      or

      search http://www.webspheretools.com my old knowledge base and there are plenty of detailed JACL example s there!

  3. I hope this questions is appropriate for your Forum.
    I am from a mainframe background where I was an applications developer using Cobol, DB2, CICS web services, MQ and other. I am looking to cross train to Websphere and was thinking of administration rather than programming. I think MQ Administration will be closest to the knowledge I already have since I am familiar with MQ but other people mention WAS and WMB. Which would be the best product to start with? Any advise will be gratefully received. I’m based in London.

    • WMB is best for you based on your immediate back-end messaging skills it would seem by first glance, but if you move to Java then WAS is better and you will still touch WMQ and WMB etc, WMB is a bit more specialist and I think less people working on this than WAS. There are more WAS people more now than ever. You need to make a choice on what you think earns you the best experience and income/growth.

      No one can not know all three really, learn them all one at a time ie the core concepts, that is what I do and build from there. Then ESB and SOA from IBM’s point of view will be clearer too.

      alternatively learn DataPower, but not easy to get work, you have to be good! Hard to get access to appliances worth 100,000’s so may have to wait until the virtual ones come out, but I am unsure if there will ever be trials. Wound be great of they did release trials.

  4. My Question here is whether WAS 8.5 deals with Session Context or not.

    The Problem is we are using WAS 6 currently and we now are migrating to WAS 8 and that was done fine. But when we tried to have a Site minder for the Application it is not working. In WAS 6 we used Site Minder for authentication and it returns a principal object which we get through session context and find out the logged in user. But in WAS 8 it is not happening the application is unable to find which user has logged in ( Site Minder is Using WAS 8.5 ). What may be the issue. whether Session Context is dealt with WAS 8.5 or not ?
    [Site Minder uses WAS 8.5 ********* Application uses WAS 8.0]

  5. Hi Steve,

    Can we achieve load balancing in Websphere application server BASE …..
    If yes please provide the necessary steps …..

    Thanks and regards,
    Lalit

  6. I was creating a tutorial for a silent install for websphere 8 and I found a problem.
    I got this error:
    ERROR: Your operating system failed the prerequisites check. Your operating system is below the recommended minimum level for this product. See the WebSphere Application Server detailed system requirements Web pages – http://www.ibm.com/support/docview.wss?rs=180&uid=swg27006921 for more information about supported operating systems. Detected Update 3, but the recommended level is Update 6
    CRIMA1002W WARNING: The following repositories are not connected:
    -/opt/IBM/install_files/WAS8/IM

    Basically I need to update the OS. But if I remember correctly in websphere 7 you had a disableOSprecheckreq option or something like that.
    But I was not able to find it for was 8.

    Do you have any idea?

    Thanks,
    Daniel

  7. I’m looking for specific instructions to install a fixpack on Websphere 8.x installations. It looks like we may need to run imcl command to install it. Is that the way or can you provide us exact steps to install fixpacks? Thanks.

    • Installing fix packs on distributed operating systems using local repository

      To install Fix Pack 8.0.0.1 using local repository, you need to download the respective ZIP files listed in the Download Package section below for your respective products and then point Installation Manager to repository.xml file on your local machine. If part1 and part2 zip files exist, unzip part1 and part2 zip files in the same folder on your local machine. Both zip files are required for installation of the Fix Pack.

      To add the repository:
      a. Start Installation Manager.
      b. In the top menu, click File > Preferences.
      c. Select Repositories.
      d. Click Add Repository.
      e. Enter the path to the repository.xml file in the location containing the repository files.

      This is a sample path for a local repository on Windows operating system:C:\repositories\product_name\local-repositories
      This is a sample path for a local repository on AIX, HP-UX, Linux, Solaris operating system:/var/repositories/product_name/local-repositories

      You may need to use the IBM Packaging Utility to download the fix pack form IBM into your local WAS 8 repository. If you installed WAS 8 not using a local repository then things get difficult. What I mean here is that if you installed WAS 8 trial by just downloading the entire IBM IM with repository hard coded in it then you have no flexibility about controlling the repository.

      Below is a link to an article that might help use the IBM packaging Utility.

      http://blog.webspheretools.com/2012/01/31/installing-websphere-8-silently-part-4/

  8. I tried setting up 2 way SSL between browser and application server and it is working as per module notes.
    However when i try to access snoop using browser port 443 it is failing at plugin.
    I tried importing signer certs from both browser and WAS its not working.
    The moment I remove the Qop settings (Client Authentication) required from WAS, snoop accessible again from browser 443 port.
    Below is plugin log

    [Sun Sep 9 17:40:05 2012] 000049e5 b7782900 – PLUGIN: ————————————————————–
    [Sun Sep 9 17:40:06 2012] 000049e9 b5ffeb40 – ERROR: lib_stream: openStream: Failed in r_gsk_secure_soc_init: GSK_ERROR_IO(gsk rc = 406)
    [Sun Sep 9 17:40:06 2012] 000049e9 b5ffeb40 – ERROR: ws_common: websphereGetStream: Could not open stream
    [Sun Sep 9 17:40:06 2012] 000049e9 b5ffeb40 – ERROR: ws_common: websphereExecute: Failed to create the stream
    [Sun Sep 9 17:40:06 2012] 000049e9 b5ffeb40 – ERROR: ws_common: websphereHandleRequest: Failed to execute the transaction to ‘WASHost1Node01_AppServer1’on host ‘WASHost1′; will try another one
    [Sun Sep 9 17:40:06 2012] 000049e9 b5ffeb40 – ERROR: ws_common: websphereWriteRequestReadResponse: Failed to find an app server to handle this request
    [Sun Sep 9 17:40:06 2012] 000049e9 b5ffeb40 – ERROR: ESI: getResponse: failed to get response: rc = 2
    [Sun Sep 9 17:40:06 2012] 000049e9 b5ffeb40 – ERROR: ws_common: websphereHandleRequest: Failed to handle request

    Not sure what is missing

    thanks

    -Ganesh

  9. I am always looking for suggestions for new content to put on my blog. If you want to see specific content on this blog, then post your suggestions here [http://blog.webspheretools.com/2012/08/28/websphere-blog-content-requests/]

  10. Hello – For those who are new to WAS7 and have experience with silent installation and configuration, I would like to share with you a resolution in case you are unable to start server1 using the ./startServer.sh server1 command line syntax. If you receive the following error message:

    WCMD0002E: Command “startServer.sh” requires a profile. No default profile exists and a profile name was not specified. Ensure that a default profile exists or use the -profileName parameter to specify the name of an existing profile.

    You need to create a manageprofile. Make sure you are sitting at the path of your AppServer bin directory. Here is the CMD line syntax to create a manageprofile for AppSrv01:

    $./manageprofiles.sh -create -templatePath ../profileTemplates/default
    INSTCONFSUCCESS: Success: Profile AppSrv01 now exists. Please consult /home/wasuser/IBM/WebSphere/AppServer/profiles/AppSrv01/logs/AboutThisProfile.txt for more information about this profile.

    Then, go to your path for AppServer/profiles/AppSrv01/bin
    and execute ./startServer.sh server1

    Do a ps -ef | grep was and your AppServer is running. That’s it.

    Thank you.

    Cynthia

  11. Hi,

    I have installed WAS 8.5 ND Trail version,and I didn’t see any option to create cluster.Please help me.

    Mainly cluster option is under “Server > Cluster”, but i didnt see any such option there.

    Thanks,
    Chandra

    • You need to install WebSphere Application Network Deployment which is cluster aware. WebSphere Application Server (base) does not have HA features. If you search this site you will find the Repository link for he WAS8NDTrial and then you can re-install the correct software.

    • Thanks for your post. You are one of the few people that has posted a response about your solution. Apologies that I have not had all the time to direct you to specific answers, but as you can see my site do have all the answers somewhere :-), just need to dig around. I am bout to update this site as it it is not formatted well due to an update of Word Press. I have a much better design and the upgrade should make it a not easier to find information. If you can help me test my new template, then I can help make the site better for you and all. As you can imagine it is almost a full time job keeping my sites all up to date and easy to use.

      Regards

      Steve

  12. I am trying to start WAS7 with ./startServer.sh server1. Why am I getting the following? The path is /home/wasuser/IBM/WebSphere/AppServer/bin
    Is there something I need to comment or uncomment in the WAS7 responsefile.base.txt file?

    [08:46:17] wasuser@eclxap11 bin $./startServer.sh server1
    WCMD0002E: Command “startServer.sh” requires a profile. No default profile exists and a profile name was not specified. Ensure that a default profile exists or use the -profileName parameter to specify the name of an existing profile.

    • You need to use manageprofiles.sh to create a profile. Or you can use the new style of WAS 7 which can allow you to create a DMGR and node profile ie ND or base install is base. It all depends on the approach and requirement. manageprofiles.sh provides flexibility to create ND profile. For base, it is best to install the binaries and ten you can use a response file to specify the binary install, then use manageprofiles to create the profile type as required. Examples are on this site if you search around

      • Thank you for responding. Can you be more specific? I have the following stanza in the WAS7 responsefile. Is it correct? Do I need to run manageprofile.sh? If so, what is the syntax?

        # Uncomment the following to create a management profile.
        ################################################################################
        #
        ## Profile Settings
        # -OPT PROF_profilePath=
        -OPT PROF_profileName=AppSrv01
        # -OPT PROF_isDefault=”true”
        # -OPT PROF_serverType=”ADMIN_AGENT”
        ## Node, Host and Cell Names
        -OPT PROF_hostName=ECLXAP11
        -OPT PROF_nodeName=ECLXAP11NODE01
        # -OPT PROF_cellName=
        ## Optional Application Deployment
        # -OPT PROF_omitAction=
        ## Certificate Management
        # -OPT PROF_keyStorePassword=
        ## Requesting a certificate
        # -OPT PROF_personalCertDN=
        # -OPT PROF_personalCertValidityPeriod=1
        # -OPT PROF_signingCertDN=
        # -OPT PROF_signingCertValidityPeriod=20
        ## Importing a certificate
        # -OPT PROF_importPersonalCertKS=
        # -OPT PROF_importPersonalCertKSType=
        # -OPT PROF_importPersonalCertKSPassword=
        # -OPT PROF_importPersonalCertKSAlias=
        # -OPT PROF_importSigningCertKS=
        # -OPT PROF_importSigningCertKSType=
        # -OPT PROF_importSigningCertKSPassword=
        # -OPT PROF_importSigningCertKSAlias=
        ## Port Value Assignment and Validation
        -OPT PROF_defaultPorts=”true”
        # -OPT PROF_startingPort=
        # -OPT PROF_portsFile=
        # -OPT PROF_validatePorts=”true”
        ## Windows Service Creation
        # -OPT PROF_winserviceCheck=”true”
        # -OPT PROF_winserviceAccountType=”localsystem”
        # -OPT PROF_winserviceUserName=
        # -OPT PROF_winservicePassword=
        # -OPT PROF_winserviceStartupType=”automatic”
        ## Linux Service Creation
        # -OPT PROF_enableService=”true”
        # -OPT PROF_serviceUserName=

      • Now, I’m getting the following error:

        [08:46:17] wasuser@eclxap11 bin $./manageprofiles.sh -create profileName AppSrv01 profilePath /home/wasuser/IBM/WebSphere/AppServer/profiles/AppSrv01/ -nodeName HELLOTHERENODE01 -hostname HELLOTHERE11

        manageprofiles requires an argument

        Run manageprofiles -help or visit our Information Center at:

        http://www14.software.ibm.com/webapp/wsbroker/redirect?version=compass&product=was-nd-dist&topic=rxml_manageprofiles

  13. Hi,

    I got a failed on the WAS 7 installation on eclxap11. It is complaining the /home/wasuser directory is not emptied and the installation will not continue. We discussed to possibly create a subdirectory for IBM. We held off on this conversation for your decision to think about it. Here is the log output from location /home/wasuser/logs/install:

    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.InstallTypeDetectAction, msg1, Process Type: install
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.InstallTypeDetectAction, msg1, Install Type: nonOS400
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.InstallTypeDetectAction, msg1, Install Mode: silentMode
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.WasTransferOPTPropertiesWizAction, msg1, #Received OPT Properties
    #Thu Aug 23 17:22:11 EDT 2012
    PROF_nodeName=ECLXAP11NODE01
    disableOSPrereqChecking=true
    traceLevel=INFO
    disableNonBlockingPrereqChecking=true
    PROF_hostName=ECLXAP11
    PROF_enableService=true
    silentInstallLicenseAcceptance=true
    allowNonRootSilentInstall=true
    PROF_defaultPorts=true
    PROF_serverName=server1
    profileType=standAlone
    PROF_profileName=AppSrv01
    installType=installNew
    installLocation=/home/wasuser/
    feature=noFeature

    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, ********************************************************************************
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, Starting a new installation or uninstallation procedure.
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, ********************************************************************************
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, Java Install Path: /home/wasuser/WAS7/JDK/jre.pak/repository/package.java.jre/java/jre
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, OS Name: Linux
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, OS Architecture: amd64
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, OS Version: 2.6.32-279.2.1.el6.x86_64
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, Current User ID: wasuser
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, Current User Home: /home/wasuser
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogFileAction, msg1, Current Working Directory: /home/wasuser/WAS7/WAS
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.PopulateTitleBarAction, msg1, IBM WebSphere Application Server 7.0
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.WasSilentInstallInputValidationAction, err, Directory /home/wasuser already exists and is not empty. The installation will not continue.
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.WasSilentInstallInputValidationAction, err, The following option name PROF_enableAdminSecurity is required but not defined, please refer to sample response files for correct option names.
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.SettleNIFRegistryAction, msg1, Current install/uninstall process failed.
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.SetExitCodeAction, msg1, CWUPI0000I: EXITCODE=1
    (Aug 23, 2012 5:22:11 PM), Process, com.ibm.ws.install.ni.ismp.actions.ISMPLogSuccessMessageAction, msg1, INSTCONFFAILED

    Thank you.

    Cynthia

    • 1 .Are you installing a root or anohter user? Permissions can have an effect.
      2. To get more debug, add -is:javaconsole to the command line for example ./install -option “” – is:javaconsole -silent
      3. Depending ont he version of Linux you are using you may require some additional libs for the installer to run. Supported is RHEL, SLES, if using ubuntu, CentOS or other you can have issues. A Common issue is missing development libraries ie the installer requires so file that are missing (dependencies)

      • Thank you Steve. I am installing as another user called wasuser (not root). But, I believe it has something to do with the install Location. I believe I made the responsefile executable (thinking that was the issue). Also, what I had in the responsefile.base.txt file location as “/home/wasuser”. The full path (according to a colleague) said it should be “/home/wasuser/IBM/WebSphere/AppServer”. So, on the CMD line, I had cd to /home/wasuser and created subdirectories for IBM, WebSphere, and AppServer. I executed the silent script and it appears to be running now. I am verifying to see if the installation is in progress with ps -ef | grep was and tailing the log.txt file. So far, I don’t see anything happening yet. Is this normal? Or, I will know when the installation is completed when my cursor returns to a new CMD line?

  14. Hi,
    I am facing a peculiar issue in WebSphere 7. Our Spring WS application has several Jars under /WEB-INF/lib and it doesnt have an explicit Classpath. The application is deployed in 2 clustered servers. The EAR contains only one Module and no other Jars. Its working on one of the servers but failing on other. We are getting the below error: Caused by: java.lang.NoSuchMethodError: org/w3c/dom/Node.getLocalName()Ljava/lang/String;

    The runtime Classpath of both Servers is different as seen in WebSphere Classpath Viewer. I suspect this is the cause for the error. I also made sure that the Classloading on both Servers is same and set to PARENT_LAST/Application

    How to make sure the Classpath is same on both the servers?

  15. Hi Steve.

    Hope you are doing great. need help from you. can you please send me the WAS-ND V8 respons files. i think the above is for the WAS-8 plugin installations. can i have copy for the web server and appserver.

    Thanks
    Dileep

  16. Hello All,

    I am trying to develop a jython code to sync the resources of two profiles of same DMGR. Kindly help.

    Thanks

  17. Hi There,

    I need to install WAS 8 on linux box, can you please help me with the setps for silent mode and profiles creating commands as well

    Thanks
    Dileep

  18. Sir

    I am facing below issue for wsadmin script in WAS6.1.
    WASX7017E: Exception received while running file “/usr/local/bin/access_app_deploy/install_AccessApp_orig.jy”; exception information: com.ibm.bsf.BSFException: exception from Jython:
    Traceback (innermost last):
    (no code object) at line 0
    File “”, line 43
    AdminApp.install(earFile, [‘-appname’, ‘%s’, ‘-cluster’, ‘%s’, ‘-defaultbinding.force’, ‘-distributeApp’, ‘-verbose’, ‘-MapModulesToServers’, ‘[[AccessApp AccessApp.war,WEB-INF/web.xml WebSphere:cell=devAppCell01,cluster=’%s’]]’, ‘-MapWebModToVH’, ‘[[AccessApp AccessApp.war,WEB-INF/web.xml ‘%s’]]’]) % (appName,clusterName,clusterName,virtualHost)
    ^
    SyntaxError: invalid syntax

    the values of variables appName,clusterName,clusterName,virtualHost are being taken from properties file.

    Can you please throw some light on where am I mistaken.

    Thanks
    Prashant

    • It is a bit hard to debug unless I run the code. What I would suggest since it is a syntax error that you create variables to hold the parameters. Using your method makes it hard to debug. Look some of the scripts I have posted at Learners International (my new training company) in my example Jython I show some great practices to organize you code properly to make it easier for debugging.

  19. Hi,

    I would like to know is there any openssl exe for 64 bit. Cos when I run it gives error saying not configured and says server is down.

    regards
    Harish

  20. WebSphere allows one to start the interactive jython session. How does one go about setting up email from within jython?

  21. I want to implement session persistance in Weblogic 10.3.3(cluster environment).
    I have Oracle Http server’s configured with Weblogic.
    Please provide me the detailed steps to implement session persistance.
    Do I have to make any changes at application end ?
    I am new to Weblogic ……

  22. How do the nodes get federated? We were able to automate all our steps except for that one!

  23. hello sir,

    i need the silent and GUI installation steps for websphere portal server , websphere MQ

    thanks&regards,
    zakhee shaik

  24. Hi,

    I am getting below error while executing the python script below.

    Error:
    Traceback (innermost last):
    (no code object) at line 0
    File “”, line 9
    nodes = AdminConfig.list(‘Node’, cell).split(“\r\n”);
    ^
    SyntaxError: invalid syntax

    Code:

    import java.lang.System as sys
    #lineSeparator = sys.getProperty(‘line.separator’)
    cells = AdminConfig.list(‘Cell’).split(“\r\n”)
    for cell in cells:
    #—————————————————————-
    # find all the nodes belonging to the cell and
    # process them at a time
    #—————————————————————–
    nodes = AdminConfig.list(‘Node’, cell).split(“\r\n”);
    for node in nodes:
    #————————————————————–
    # find all the running servers belonging to the cell
    # and node, and process them one at a time
    #————————————————————–
    cname = AdminConfig.showAttribute(cell, ‘name’)
    nname = AdminConfig.showAttribute(node, ‘name’)
    servs = AdminControl.queryNames(‘type=Server,cell=’ + cname +’,node=’ + nname + ‘,*’).split(“\r\n”)
    print “Number of running servers on node ” + nname + “: %s \n” % (len(servs))
    for server in servs:
    #———————————————————
    # get some attributes from the server to display;
    # invoke an operation on the server JVM to display a property.
    #———————————————————
    sname = AdminControl.getAttribute(server, ‘name’)
    ptype = AdminControl.getAttribute(server, ‘processType’)
    pid = AdminControl.getAttribute(server, ‘pid’)
    state = AdminControl.getAttribute(server, ‘state’)
    heapsize = AdminControl.getAttribute(server, ‘heapSize’)
    freeheap = AdminControl.getAttribute(server, ‘freeMemory’)
    jvm = AdminControl.queryNames(‘type=JVM,cell=’ + cname + ‘,node=’ + nname + ‘,process=’ + sname + ‘,*’)
    osname = AdminControl.invoke(jvm, ‘getProperty’, ‘os.name’)
    print ” ” + sname + ” ” + ptype + ” has pid ” + pid + “; state: ” + state + “; on ” + osname + ” ” + heapsize + ” ” + freeheap + “\n”

    • Here is some sample code to show you how I do cell, node and server for loops etc. This should give you some insights. I do not have time to debug your code. I can see you are using a lot of escaping and this makes your code hard to read. See my code it is easier to read. Note: Ignore the use of logger, just assume these are print statements.
      [crayon]
      #———————————————————————–
      # Start all Cell processes, dmgr/nodeagent must be already running!
      #———————————————————————–
      def startCell( cellName ):
      logger.debug(“ENTER: startCell”)

      # Find all the nodes belonging to the cell and
      # process them one at a time
      # Start all NodeAgents on all nodes then
      # Start all ordinary Servers on all nodes then
      # Necessary in order to prevent a Server being stopped before
      # NodeAgent on that node, which would not be reachable and could
      # not be started
      #———————————————————————–

      #———————————————————————–
      #First we have to get the cellId of the cell MBean, using the cellame
      #———————————————————————–
      cellId = AdminConfig.getid(“/Cell:” + cellName+ “/” )
      logger.debug(“cellId:”)
      cellName = AdminConfig.showAttribute(cellId, “name” )
      logger.debug(“cellName=” + cellName)
      nodes = AdminConfig.list(“Node”, cellId )
      logger.debug(“nodes:”)
      nodes = wsadminToList(nodes)
      logger.debug(‘\n’.join( nodes ))

      #————————————————————-
      #get all nodes in cell and iterate to find process as required
      #————————————————————-
      for node in nodes:
      #————————————————————–
      # Find all the required nodeagents belonging to the cell
      # and node, and process them one at a time
      #————————————————————–
      nname = AdminConfig.showAttribute(node, “name” )
      servs = AdminConfig.list(“Server”, node )
      servs = wsadminToList(servs)
      agents = AdminControl.queryNames(“type=NodeAgent,cell=” + cellName + “,node=” + nname + “,*” )
      agents = wsadminToList(agents)

      dmgrs = AdminControl.queryNames(“type=Server,cell=” + cellName + “,node=” + nname + “,processType=DeploymentManager,*” )
      dmgrs = wsadminToList(dmgrs)
      dmgr = “”
      if len(dmgrs) > 0 :
      print “Found ” + str(len(dmgrs)) + ” DeploymentManagers on node “+nname
      dmgr=”true”
      #endIf

      print “Found “+ str(len(agents)) + ” NodeAgents on node “+ nname
      if (len(agents) == 0 and not (dmgr)):
      logger.warn( “No nodeagent active on node “+ nname+”, will not attempt to start servers on this node!”)
      continue
      #endIf

      print “Found ” + str(len(servs)) + ” JVMs on node “+nname
      for server in servs:
      #———————————————————
      # Get some attributes from the server to display;
      # invoke an operation on the server JVM to display a property.
      #———————————————————
      sname = AdminConfig.showAttribute(server, “name” )
      fserv = AdminControl.queryNames(“type=Server,cell=” + cellName + “,node=” + nname + “,name=” + sname + “,*” )
      if (len(fserv) != 0):
      sname = AdminControl.getAttribute(fserv, “name” )
      if( (cmp(sname,”dmgr”) == 0) or (cmp(sname,”nodeagent”) ==0 ) ):
      #We do not need to report that DMGR or Node Agents are skipped starting as we assume they are sarted before we run this option!
      logger.debug(“skipping: [” + sname + “]”)
      break
      #endIf
      ptype = AdminControl.getAttribute(fserv, “processType” )
      pid = AdminControl.getAttribute(fserv, “pid” )
      state = AdminControl.getAttribute(fserv, “state” )
      jvm = AdminControl.queryNames(“type=JVM,cell=” + cellName + “,node=” + nname + “,process=” + sname + “,*” )
      osname = AdminControl.invoke(jvm, “getProperty”, “os.name” )
      logger.info( “Server: ” + sname + ” (” + ptype + “) has pid ” + pid + “; state: ” + state + “; on “+ osname)
      logger.info( “Start not required!”)
      else:
      logger.info( “Starting server ” + sname + ” … “)
      try:
      _excp_ = 0
      result = AdminControl.startServer(sname, nname )
      _excp_ = 0 #reset (in case of nested exceptions)
      except:
      _type_, _value_, _tbck_ = sys.exc_info()
      result = str(_value_)
      _excp_ = 1
      #endTry
      if (_excp_ ):
      print “ERROR: Error starting ” + sname + “!”
      if (cmp(debug, “true”) == 0):
      print result
      #endIf
      #endIf
      #endElse
      #endFor servs
      #endFor nodes
      logger.info( “Completed Cell start!”)
      logger.debug(“EXIT: startCell”)
      #endDef
      [/crayon]

  25. hi,
    I have written the below script to retrieve jvmlevel details but while executing the wsadmin script i m getting the exception like

    Traceback (innermost last):
    (no code object) at line 0
    File \"<string>\", line 9
    nodes = AdminConfig.list(\'Node\', cell).split(\"\\r\\n\");
    ^
    SyntaxError: invalid syntax
    ———————————
    CODE
    ———————————
    import java.lang.System as sys
    #lineSeparator = sys.getProperty(\'line.separator\')
    cells = AdminConfig.list(\'Cell\').split(\"\\r\\n\")
    for cell in cells:
    #—————————————————————-
    # find all the nodes belonging to the cell and # process them at a time
    #—————————————————————–
    nodes = AdminConfig.list(\'Node\', cell).split(\"\\r\\n\");
    for node in nodes:
    #————————————————————–
    # find all the running servers belonging to the cell # and node, and process them one at a time
    #————————————————————–
    cname = AdminConfig.showAttribute(cell, \'name\') nname = AdminConfig.showAttribute(node, \'name\') servs = AdminControl.queryNames(\'type=Server,cell=\' + cname +\',node=\' + nname + \',*\').split(\"\\r\\n\")
    print \"Number of running servers on node \" + nname + \": %s \\n\" % (len(servs)) for server in servs:
    #———————————————————
    # get some attributes from the server to display; # invoke an operation on the server JVM to display a property.
    #———————————————————
    sname = AdminControl.getAttribute(server, \'name\') ptype = AdminControl.getAttribute(server, \'processType\')
    pid = AdminControl.getAttribute(server, \'pid\')
    state = AdminControl.getAttribute(server, \'state\') heapsize = AdminControl.getAttribute(server, \'heapSize\') freeheap = AdminControl.getAttribute(server, \'freeMemory\') jvm = AdminControl.queryNames(\'type=JVM,cell=\' + cname + \',node=\' + nname + \',process=\' + sname + \',*\') osname = AdminControl.invoke(jvm, \'getProperty\', \'os.name\') print \" \" + sname + \" \" + ptype + \" has pid \" + pid + \"; state: \" + state + \"; on \" + osname + \" \" + heapsize + \" \" + freeheap + \"\\n\"

  26. Hello Steve,

    I had had read most of your books, you are really doing a great job, thanks a lot for helping us man,

  27. Software/OS: WAS 6.1, AIX 6.1 64-bit

    Configurations : 2 machines, one for IHS V6 and other for WAS V6 and SSL configured

    Goal: Access WAS through SSL, (https)

    Error: Certificate error listed below:

    7/4/12 17:28:06:041 WAT] 00000023 SystemErr R Caused by:
    org.omg.CORBA.TRANSIENT: initial and forwarded IOR inaccessible:

    Forwarded IOR failed with:
    CAUGHT_EXCEPTION_WHILE_CONFIGURING_SSL_CLIENT_SOCKET: JSSL0080E:
    javax.net.ssl.SSLHandshakeException – The client and server could not
    negotiate the desired level of security. Reason:
    com.ibm.jsse2.util.h: No trusted certificate found

    Initial IOR failed with:
    CAUGHT_EXCEPTION_WHILE_CONFIGURING_SSL_CLIENT_SOCKET: JSSL0080E:
    javax.net.ssl.SSLHandshakeException – The client and server could not
    negotiate the desired level of security. Reason:
    com.ibm.jsse2.util.h: No trusted certificate found vmcid: IBM minor
    code: E07 completed: No

    at
    com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1176)

    at
    com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1270)

    at
    com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1326)

    at
    com.ibm.rmi.corba.ClientDelegate.createRequest(ClientDelegate.java:1131)

    at
    com.ibm.CORBA.iiop.ClientDelegate.createRequest(ClientDelegate.java:1292)

    at
    com.ibm.rmi.corba.ClientDelegate.request(ClientDelegate.java:1869)

    at
    com.ibm.CORBA.iiop.ClientDelegate.request(ClientDelegate.java:1248)

    at
    org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:458)

    at
    com.ibm.WsnBootstrap._WsnNameServiceStub.getProperties(_WsnNameServiceStub.java:38)

    at
    com.ibm.ws.naming.util.WsnInitCtxFactory.mergeWsnNSProperties(WsnInitCtxFactory.java:1369)

    at
    com.ibm.ws.naming.util.WsnInitCtxFactory.getRootContextFromServer(WsnInitCtxFactory.java:924)

    at
    com.ibm.ws.naming.util.WsnInitCtxFactory.getRootJndiContext(WsnInitCtxFactory.java:848)

    at
    com.ibm.ws.naming.util.WsnInitCtxFactory.getInitialContextInternal(WsnInitCtxFactory.java:533)

    at
    com.ibm.ws.naming.util.WsnInitCtx.getContext(WsnInitCtx.java:117)

    at
    com.ibm.ws.naming.util.WsnInitCtx.getContextIfNull(WsnInitCtx.java:712)

    at com.ibm.ws.naming.util.WsnInitCtx.lookup(WsnInitCtx.java:171)

    at javax.naming.InitialContext.lookup(InitialContext.java:363)

    at com.infosys.bankaway.common.EJBLookup.lookup(Unknown Source)

    at
    com.infosys.bankaway.servlet.VersionVerificationListener.contextInitialized(Unknown
    Source)

    at
    com.ibm.ws.wswebcontainer.webapp.WebApp.notifyServletContextCreated(WebApp.java:653)

    at
    com.ibm.ws.webcontainer.webapp.WebApp.commonInitializationFinish(WebApp.java:370)

    at
    com.ibm.ws.wswebcontainer.webapp.WebApp.initialize(WebApp.java:293)

    at
    com.ibm.ws.wswebcontainer.webapp.WebGroup.addWebApplication(WebGroup.java:93)

    at
    com.ibm.ws.wswebcontainer.VirtualHost.addWebApplication(VirtualHost.java:162)

    at
    com.ibm.ws.wswebcontainer.WebContainer.addWebApp(WebContainer.java:673)

    at
    com.ibm.ws.wswebcontainer.WebContainer.addWebApplication(WebContainer.java:626)

    at
    com.ibm.ws.webcontainer.component.WebContainerImpl.install(WebContainerImpl.java:335)

    at
    com.ibm.ws.webcontainer.component.WebContainerImpl.start(WebContainerImpl.java:551)

    at
    com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1250)

    at
    com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1140)

    at
    com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:569)

    at
    com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:819)

    at
    com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:921)

    at
    com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2100)

    at
    com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:342)

    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1497)

    Caused by: org.omg.CORBA.COMM_FAILURE:
    CAUGHT_EXCEPTION_WHILE_CONFIGURING_SSL_CLIENT_SOCKET: JSSL0080E:
    javax.net.ssl.SSLHandshakeException – The client and server could not
    negotiate the desired level of security. Reason:
    com.ibm.jsse2.util.h: No trusted certificate found vmcid: 0x49421000
    minor code: 70 completed: No

  28. Hi Steve,

    During Custom profile federation, i m getting the following error.

    Increased SOAP request timeout to 3600 in both custom and dmgr profile.

    Host name entries also there in both the machine.

    c:\IBM\WebSphere\AppServer\profiles\Custom01\bin>addNode.bat BPManager.tt.net 88
    79 -conntype SOAP -username bpmadmin -password bpmpass
    ADMU0116I: Tool information is being logged in file
    C:\IBM\WebSphere\AppServer\profiles\Custom01\logs\addNode.log
    ADMU0128I: Starting tool with the Custom01 profile
    CWPKI0314E: The following error is returned from an exception: ADMC0009E: The
    system failed to make the SOAP RPC call: invoke
    ADMU0001I: Begin federation of node BPManagerBlrNode01 with Deployment Manager
    at BPManager.tt.net:8879.
    ADMU0009I: Successfully connected to Deployment Manager Server:
    BPManager.tt.net:8879

    ADMU0027E: An error occurred during federation Connection reset; rolling back
    to original configuration.
    ADMU0211I: Error details may be seen in the file:
    C:\IBM\WebSphere\AppServer\profiles\Custom01\logs\addNode.log
    ADMU0113E: Program exiting with error:
    com.ibm.websphere.management.exception.AdminException:
    com.ibm.websphere.management.exception.ConnectorException:
    ADMC0009E: The system failed to make the SOAP RPC call:
    getMBeanInfo, resulting from: [SOAPException:
    faultCode=SOAP-ENV:Client; msg=Connection reset;
    targetException=java.net.SocketException: Connection reset]
    ADMU1211I: To obtain a full trace of the failure, use the -trace option.
    ADMU0211I: Error details may be seen in the file:
    C:\IBM\WebSphere\AppServer\profiles\Custom01\logs\addNode.log

    Regards,
    Nehrukannan

  29. For error message “DerInputStream.getLength(): lengthTag=127, too big.”, check the file size. This file is defined in openssl.cnf line
    database = $dir/index.txt # database index file.

    This file must be emptied, not erased.

  30. very useful site

  31. So what if you have already installed and configured the product on AIX, and don’t want to go through the install process again? Is there a way to get the console installed at that point? Any help will be appreciated!

    Thanks,

    Lisa

  32. Hi, Thanks a lot for this posting. I did the procedure for an OpenVZ container running CentOS 5.x 64 bits and it worked like a charm!

    Regards, Alwina

  33. Hi Steven,

    I have a problem which I need help from you to resolve.

    Environment: Websphere App server 7.0.0.13
    —————–

    Cluster with two nodes – node01 & node02.

    server g62 has dmgr01 & node01 profiles created.
    server g63 has node 02 profile created.

    SCENARIO 1:
    —————–
    DEPLOYMENT manager – started
    g62 app server – started
    g63 app server – started

    I am able to retrieve the JNDI Tree and also the below code works fine while binding/unbinding the objects from the context.

    SCENARIO 2:
    ——————
    DEPLOYMENT MANAGER IS STOPPED (not running)

    g62 app server – started

    g63 app server – when tried to STOP it fails while bind/unbind. (see code and error stack below)
    Similarly fails to bind when restared again.

    This is because the deployment manager is donw and it fails to read the updated JNDI tree since we are using cell/persistent/../.. as the JNDI pathto look up these servers. we know that this path is only updated when the deployment manager is up and running.

    CODE:
    ————————————————————
    Context context = new InitialContext();

    // agentHost = one of many servers in a cluster.
    // JNDI_PARENT = cell/persistent/dovetail/management;

    String agentHostJNDI = ManagementClientUtil.JNDI_PARENT + “/” + agentHost;
    context.unbind(agentHostJNDI);

    ——————————————————————————–

    ERROR:
    ——————————————————————————————
    [5/25/12 9:37:19:260 GMT+03:00] 00000004 DovetailJMXAg E com.dovetailsys.base.management.DovetailJMXAgent1_2 removeRemoteConnector
    java.io.IOException: Cannot bind to URL: javax.naming.NamingException: org.omg.CORBA.TRANSIENT: initial and forwarded IOR inaccessible vmcid: IBM minor code: E07 completed: No [Root exception is org.omg.CORBA.TRANSIENT: initial and forwarded IOR inaccessible vmcid: IBM minor code: E07 completed: No]



    Caused by: java.net.ConnectException: Connection refused
    ————————————————————————————————————–

    What I am really looking when the deployment manger is not running still we shoudl be able to bind/unbind the objects..

    I cannot really use the cell/persistent/../../ as this is not updated when deployment manager is down.

    The requirement here is to not to be dependent on teh deployment managere and still shoudl be able to retrieve the updated JNDI Tree and shouldbe able to do the bind/unbind opereations succesfully.

    So I am looking many be we need to create some sort of static reference JNDI objects.

    We need these at the cell level, to point to where these objects are being bound/unbound.

    In the code we would look up the static reference JNDI Mapping and the hope is that in Websphere, you can create these reference objects so that websphere hides the fact that it really is going off to another location and returning whats’ over there.

    Please advise how to go ahead and resolve his.

    Thanks in anticipation.

    –Raja (Ex Colleague)

  34. I have an existing (working) instance of WebSphere v6 with IHS web server (on Linux). The application server is a standalone base installation. My site is undergoing a domain migration, in which my hostname, server name and IP will change. I’m trying to reconfigure WebSphere to work with the new servername and hostname. I’ve changed the Web Server “Host name” using the WebSphere admin console. (This updated the serverindex.xml and server.xml files.) On the Application Server side, I updated the hostName property and all occurrences of “host=” in the serverindex.xml file.

    My LDAP Bind account is different in the new domain, so I updated the ldap.prop and ldap.sth file with the new credentials (IHS). For WebSphere, I udpated the LDAP values, host from the Admin console.

    My URLs will change, so I updated the Virtual Hosts with my new URLs as Host Aliases.

    So all seems well. I can access my applications, the WebSphere admin console, etc. There doesn’t seem to be any configuration errors on either side. My only issue is that I can’t propagate the plugin-cfg.xml file. I get an error that says a connection can’t be made to the node agent or IBM HTTP Server administration server on my node. The log file states that a non-SSL request was received on port 8008, which is configured for SSL.

    Not to confuse the issue, but I should mention that the server hasn’t actually been migrated yet, meaning its name and IP haven’t changed yet. But the new server name is set up as an alias and there is a trust between the 2 domains , so I was hoping to get my configuration bugs worked out as much as possible before it is actually renamed. As for the DNS – I have the new server name/current IP in the “hosts” file so am bypassing DNS for now, so I can’t test the new URLs yet.

    I’m very green with IHS/WebSphere, so am hoping that someone can point me in the right direction to get this Plugin file propagation to work!

  35. Hi,

    I need the sample applications to test on websphere application server v7.0
    Kindly please send the samples to gupta.yenisetty@gmail.com

    Regards,
    Pavan

  36. Hi Steven,

    I have a problem which I need help from you to resolve.

    Environment: Websphere App server 7.0.0.13
    —————–

    Cluster with two nodes – node01 & node02.

    server g62 has dmgr01 & node01 profiles created.
    server g63 has node 02 profile created.

    SCENARIO 1:
    —————–
    DEPLOYMENT manager – started
    g62 app server – started
    g63 app server – started

    I am able to retrieve the JNDI Tree and also the below code works fine while binding/unbinding the objects from the context.

    SCENARIO 2:
    ——————
    DEPLOYMENT MANAGER IS STOPPED (not running)

    g62 app server – started

    g63 app server – when tried to STOP it fails while bind/unbind. (see code and error stack below)
    Similarly fails to bind when restared again.

    This is because the deployment manager is donw and it fails to read the updated JNDI tree since we are using cell/persistent/../.. as the JNDI pathto look up these servers. we know that this path is only updated when the deployment manager is up and running.

    CODE:
    ————————————————————
    Context context = new InitialContext();

    // agentHost = one of many servers in a cluster.
    // JNDI_PARENT = cell/persistent/dovetail/management;

    String agentHostJNDI = ManagementClientUtil.JNDI_PARENT + “/” + agentHost;
    context.unbind(agentHostJNDI);

    ——————————————————————————–

    ERROR:
    ——————————————————————————————
    [5/25/12 9:37:19:260 GMT+03:00] 00000004 DovetailJMXAg E com.dovetailsys.base.management.DovetailJMXAgent1_2 removeRemoteConnector
    java.io.IOException: Cannot bind to URL: javax.naming.NamingException: org.omg.CORBA.TRANSIENT: initial and forwarded IOR inaccessible vmcid: IBM minor code: E07 completed: No [Root exception is org.omg.CORBA.TRANSIENT: initial and forwarded IOR inaccessible vmcid: IBM minor code: E07 completed: No]



    Caused by: java.net.ConnectException: Connection refused
    ————————————————————————————————————–

    What I am really looking when the deployment manger is not running still we shoudl be able to bind/unbind the objects..

    I cannot really use the cell/persistent/../../ as this is not updated when deployment manager is down.

    The requirement here is to not to be dependent on teh deployment managere and still shoudl be able to retrieve the updated JNDI Tree and shouldbe able to do the bind/unbind opereations succesfully.

    So I am looking many be we need to create some sort of static reference JNDI objects.

    We need these at the cell level, to point to where these objects are being bound/unbound.

    In the code we would look up the static reference JNDI Mapping and the hope is that in Websphere, you can create these reference objects so that websphere hides the fact that it really is going off to another location and returning whats’ over there.

    Please advise how to go ahead and resolve his.

    Thanks in anticipation.

    –Raja (Ex Colleague)

  37. I have created a user clickpss on AIX 6.1. I have installed WAS BASE 7 on clickpss user. I have installed IHS and Plugins by root user.
    Plugin was able to generate but failed to propagate.
    What may be the possible reasons?
    Please reply …….


[top]

Leave a Reply