Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-5550

NPE/500 Server error on /workflows/workflow-id/runs/run-id/statistics endpoint

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.4.0
    • Fix Version/s: 3.4.0
    • Component/s: Workflow
    • Labels:
    • Release Notes:
      For Workflow statistics endpoint, limit now defaults to 10 and interval defaults to 10 seconds.
    • Rank:
      1|hzzahb:

      Description

      I get a 500 Internal Server error when I hit the workflow statistics endpoint with a run-id. Here is the stack trace from the master log. The endpoint is expecting an interval (not sure why it is required, it should ideally just return the runtime of all the nodes in that particular workflow run, if no interval is provided) and that is not communicated in the error message.

      2016-04-07 18:32:53,329 - ERROR [netty-executor-285:c.c.c.c.HttpExceptionHandler@49] - Unexpected error: request=GET /v3/namespaces/default/apps/JumboPipe3/workflows/DataPipelineWorkflow/runs/13088691-fcee-11e5-aee6-42010af0001f/statistics user=<null>:
      java.lang.NullPointerException: null
      	at java.util.regex.Matcher.getTextLength(Matcher.java:1234) ~[na:1.7.0_75]
      	at java.util.regex.Matcher.reset(Matcher.java:308) ~[na:1.7.0_75]
      	at java.util.regex.Matcher.<init>(Matcher.java:228) ~[na:1.7.0_75]
      	at java.util.regex.Pattern.matcher(Pattern.java:1088) ~[na:1.7.0_75]
      	at co.cask.cdap.common.utils.TimeMathParser.resolutionInSeconds(TimeMathParser.java:80) ~[co.cask.cdap.cdap-common-3.4.0-SNAPSHOT.jar:na]
      	at co.cask.cdap.gateway.handlers.WorkflowStatsSLAHttpHandler.workflowRunDetail(WorkflowStatsSLAHttpHandler.java:154) ~[co.cask.cdap.cdap-app-fabric-3.4.0-SNAPSHOT.jar:na]
      	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.7.0_75]
      	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) ~[na:1.7.0_75]
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.7.0_75]
      	at java.lang.reflect.Method.invoke(Method.java:606) ~[na:1.7.0_75]
      	at co.cask.http.HttpMethodInfo.invoke(HttpMethodInfo.java:80) ~[co.cask.http.netty-http-0.14.0.jar:na]
      	at co.cask.http.HttpDispatcher.messageReceived(HttpDispatcher.java:38) [co.cask.http.netty-http-0.14.0.jar:na]
      	at org.jboss.netty.channel.SimpleChannelUpstreamHandler.handleUpstream(SimpleChannelUpstreamHandler.java:70) [io.netty.netty-3.6.6.Final.jar:na]
      	at org.jboss.netty.channel.DefaultChannelPipeline.sendUpstream(DefaultChannelPipeline.java:564) [io.netty.netty-3.6.6.Final.jar:na]
      	at org.jboss.netty.channel.DefaultChannelPipeline$DefaultChannelHandlerContext.sendUpstream(DefaultChannelPipeline.java:791) [io.netty.netty-3.6.6.Final.jar:na]
      	at org.jboss.netty.handler.execution.ChannelUpstreamEventRunnable.doRun(ChannelUpstreamEventRunnable.java:43) [io.netty.netty-3.6.6.Final.jar:na]
      	at org.jboss.netty.handler.execution.ChannelEventRunnable.run(ChannelEventRunnable.java:67) [io.netty.netty-3.6.6.Final.jar:na]
      	at org.jboss.netty.handler.execution.OrderedMemoryAwareThreadPoolExecutor$ChildExecutor.run(OrderedMemoryAwareThreadPoolExecutor.java:314) [io.netty.netty-3.6.6.Final.jar:na]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [na:1.7.0_75]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [na:1.7.0_75]
      	at java.lang.Thread.run(Thread.java:745) [na:1.7.0_75]
      

        Attachments

          Activity

            People

            • Assignee:
              sagar Sagar Kapare
              Reporter:
              gokul Gokul Gunasekaran
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: