WebSphere Application Server & Liberty

WebSphere Application Server & Liberty

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Execute Health Action Command - HELP

    Posted 12/20/12 05:25 PM
    Hey GWC - it's been a long time!!!

    Quick question, actually, it's more a WVE question but I'm hoping someone has encountered it....

    I've created a Health Policy for Excessive Memory and I scripted a custom action it should execute when certain conditions are met.  I
    configured the custom action and pointed it to my script (which sends an email to me and the other WAS admins) but I need to test it to make sure it works. 

    I found the AdminTask.executeHealthPolicy command but I'm getting a java.lang.NullPointerException error:

    WASX7015E: Exception running command: "AdminTask.executeHealthAction
    ('[-name Excessive_Memory_Alert -node nodeName
    -server serverName]')";
      exception information:  java.lang.NullPointerException: java.lang.NullPointerException

    I've searched for hours and the only thing I found says it's a known
    problem and will be fixed in the next WAS v7
    or WAS v8.5 fixpack. 

    www.ibm.com/developerworks/forum/message...

    Has anyone found a work around?


  • 2.  Execute Health Action Command - HELP

    Posted 12/20/12 06:11 PM
    Hi Danielle,


      I suppose that your link is (is broken)

      www.ibm.com/developerworks/forum/message...

      have you do the suggested action?

      pic.dhe.ibm.com/infocenter/wasinfo/v8r5/...

      Have you enable traces in wsadmin?

     
    regards


  • 3.  Execute Health Action Command - HELP

    Posted 12/21/12 09:17 AM
    Hi Gabriel,

    Thanks for responding!  My apologies, for some reason cut/paste always breaks the links...

    www.ibm.com/developerworks/forums/messag...

    And yes, that link is where I got the format for my executable.  The only difference is I wrote it entirely in python....

    I enabled wsadmin trace and got the following error:

    [12/21/12 9:29:31:808 EST] 00000000 AbstractShell A   WASX7091I:
    Executing script: "../../alert.py"
    [12/21/12 9:29:32:067 EST] 00000000 AbstractShell E   WASX7120E:
    Diagnostic information from exception with text "java.lang.
    NullPointerException:
    java.lang.NullPointerException
    " follows:


     java.lang.NullPointerException
            at com.ibm.ws.xd.agent.httpservice.client.JSONRPCClientImpl.
    getTimeOutValue(JSON
    RPCClientImpl.java:527)
            at
    com.ibm.ws.xd.agent.httpservice.client.JSONRPCClientImpl.invoke
    (JSONRPCClientImpl.java:134)
            at com.ibm.ws.xd.agent.services.JSONRPCInvocationHandler.invoke
    (JSONRPCInvocationHandler.java:150)
            at $Proxy54.invokeTaskwithServerEnvId(Unknown Source)
            at com.ibm.ws.xd.config.healthconfig.commands.ExecuteHealthAction.
    afterStepsExecuted(ExecuteHealthAction.java:133)
            at com.ibm.websphere.management.cmdframework.provider.
    AbstractTaskCommand.executeReal(AbstractTaskCommand.java:855)

            at com.ibm.websphere.management.cmdframework.provider.
    AbstractTaskCommand.execute(AbstractTaskCommand.java:807)

            at com.ibm.ws.management.cmdframework.impl.RemoteCommandMgrImpl.
    execute
    (RemoteCommandMgrImpl.java:370)

            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

            at
    sun.reflect.NativeMethodAccessorImpl.invoke
    (NativeMethodAccessorImpl.java:60)
            at
    sun.reflect.DelegatingMethodAccessorImpl.invoke
    (DelegatingMethodAccessorImpl.java:37)

            at java.lang.reflect.Method.invoke(Method.java:611)

            at sun.reflect.misc.Trampoline.invoke(MethodUtil.java:49)

            at sun.reflect.GeneratedMethodAccessor45.invoke
    (Unknown Source)

            at
    sun.reflect.DelegatingMethodAccessorImpl.invoke
    (DelegatingMethodAccessorImpl.java:37)

            at java.lang.reflect.Method.invoke(Method.java:611)

            at sun.reflect.misc.MethodUtil.invoke(MethodUtil.java:256)

            at
    javax.management.modelmbean.RequiredModelMBean.invokeMethod
    (RequiredModelMBean.java:1085)
            at
    javax.management.modelmbean.RequiredModelMBean.invoke
    (RequiredModelMBean.java:966)
            at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.
    invoke
    (DefaultMBeanServerInterceptor.java:848)
            at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke
    (JmxMBeanServer.java:773)
            at com.ibm.ws.management.AdminServiceImpl$1.run
    (AdminServiceImpl.java:1331)
            at com.ibm.ws.security.util.AccessController.doPrivileged
    (AccessController.java:118)
            at com.ibm.ws.management.AdminServiceImpl.invoke
    (AdminServiceImpl.java:1224)
            at com.ibm.ws.management.connector
    .AdminServiceDelegator.invoke
    (AdminServiceDelegator.java:181)
            at sun.reflect.GeneratedMethodAccessor59.invoke
    (Unknown Source)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke
    (DelegatingMethodAccessorImpl.java:37)
            at java.lang.reflect.Method.invoke
    (Method.java:611)
            at com.ibm.ws.management.connector.soap.SOAPConnector
    .invoke
    (SOAPConnector.java:453)
            at com.ibm.ws.management.connector.soap.SOAPConnector.service
    (SOAPConnector.java:286)
            at com.ibm.ws.management.connector.soap.SOAPConnection
    .handleRequest
    (SOAPConnection.java:65)

            at com.ibm.ws.http.HttpConnection.readAndHandleRequest
    (HttpConnection.java:733)
            at com.ibm.ws.http.HttpConnection.run
    (HttpConnection.java:522)
            at com.ibm.ws.util.ThreadPool$Worker.run
    (ThreadPool.java:1604)




  • 4.  Execute Health Action Command - HELP

    Posted 12/21/12 02:00 PM
    Danielle,

      I only can say you viewing the traces, that seems like some timeout value is missing. But I don't know....

    com.ibm.ws.xd.agent.
    httpservice.client.JSONRPCClientImpl.getTimeOutValue

     Has the health policy function more parameters? maybe if exist a function
    with more parameters you can try it.


      Have you open a PMR?

    regards


  • 5.  Execute Health Action Command - HELP

    Posted 12/28/12 09:42 AM
    Hmmmm....

    I'm not sure if there are any parameters missing.  I modeled my script after healthpolicy.py located in the bin directory (minus all the extra fluff we don't need).  Anyway in that script only one parameter is defined for the Memory Leak Condition Health Policy but maybe there is something I may have missed.

    Interesting.....

    I'll take another look and see if I can't figure out what's causing that timeout error.

    Thanks Gabriel!