You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2016/10/04 06:27:21 UTC

[jira] [Commented] (NIFI-2858) getSystemLoadAverage of OperatingSystemMXBean sometimes returns a negative value.

    [ https://issues.apache.org/jira/browse/NIFI-2858?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15544504#comment-15544504 ] 

ASF GitHub Bot commented on NIFI-2858:
--------------------------------------

GitHub user combineads opened a pull request:

    https://github.com/apache/nifi/pull/1091

    NIFI-2858 getSystemLoadAverage of OperatingSystemMXBean sometimes

    returns a negative value.
    
    When getSystemLoadAverage returns a negative value, ProcessorLoadAverage sets 1.0.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/combineads/nifi NIFI-2858

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/nifi/pull/1091.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #1091
    
----
commit a592c75315065c13da831569774f577ea38367b7
Author: Byunghwa Yun <co...@combineads.co.kr>
Date:   2016-10-04T06:24:42Z

    NIFI-2858: getSystemLoadAverage of OperatingSystemMXBean sometimes
    returns a negative value.

----


> getSystemLoadAverage of OperatingSystemMXBean sometimes returns a negative value.
> ---------------------------------------------------------------------------------
>
>                 Key: NIFI-2858
>                 URL: https://issues.apache.org/jira/browse/NIFI-2858
>             Project: Apache NiFi
>          Issue Type: Bug
>          Components: Core Framework
>    Affects Versions: 1.0.0
>            Reporter: Byunghwa Yun
>
> When NiFi cluster is busy, Sometimes Cluster of Global Menu throws below an exception.
> So, I was tracking that exception to find a problem that getSystemLoadAverage of OperatingSystemMXBean sometimes returns a negative value.
> 2016-10-04 14:53:20,488 ERROR [NiFi Web Server-40942] o.a.nifi.web.api.config.ThrowableMapper An unexpected error has occurred: java.lang.NullPointerException. Returning Internal Server Error response.
> java.lang.NullPointerException: null
>         at org.apache.nifi.cluster.manager.StatusMerger.merge(StatusMerger.java:576) ~[nifi-framework-cluster-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at org.apache.nifi.cluster.manager.StatusMerger.merge(StatusMerger.java:548) ~[nifi-framework-cluster-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at org.apache.nifi.cluster.coordination.http.endpoints.SystemDiagnosticsEndpointMerger.mergeResponses(SystemDiagnosticsEndpointMerger.java:69) ~[nifi-framework-cluster-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at org.apache.nifi.cluster.coordination.http.endpoints.SystemDiagnosticsEndpointMerger.mergeResponses(SystemDiagnosticsEndpointMerger.java:31) ~[nifi-framework-cluster-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at org.apache.nifi.cluster.coordination.http.endpoints.AbstractNodeStatusEndpoint.mergeResponses(AbstractNodeStatusEndpoint.java:41) ~[nifi-framework-cluster-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at org.apache.nifi.cluster.coordination.http.endpoints.AbstractSingleDTOEndpoint.merge(AbstractSingleDTOEndpoint.java:48) ~[nifi-framework-cluster-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at org.apache.nifi.cluster.coordination.http.StandardHttpResponseMerger.mergeResponses(StandardHttpResponseMerger.java:179) ~[nifi-framework-cluster-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at org.apache.nifi.cluster.coordination.http.replication.StandardAsyncClusterResponse.getMergedResponse(StandardAsyncClusterResponse.java:145) ~[nifi-framework-cluster-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at org.apache.nifi.cluster.coordination.http.replication.StandardAsyncClusterResponse.awaitMergedResponse(StandardAsyncClusterResponse.java:160) ~[nifi-framework-cluster-1.1.0-SNAPSHOT.jar:1.1.0-SNAPSHOT]
>         at org.apache.nifi.web.api.SystemDiagnosticsResource.getSystemDiagnostics(SystemDiagnosticsResource.java:141) ~[classes/:na]
>         at sun.reflect.GeneratedMethodAccessor988.invoke(Unknown Source) ~[na:na]
>         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_51]
>         at java.lang.reflect.Method.invoke(Method.java:497) ~[na:1.8.0_51]
>         at com.sun.jersey.spi.container.JavaMethodInvokerFactory$1.invoke(JavaMethodInvokerFactory.java:60) ~[jersey-server-1.19.jar:1.19]
>         at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(AbstractResourceMethodDispatchProvider.java:205) ~[jersey-server-1.19.jar:1.19]
>         at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(ResourceJavaMethodDispatcher.java:75) ~[jersey-server-1.19.jar:1.19]
>         at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(HttpMethodRule.java:302) ~[jersey-server-1.19.jar:1.19]
>         at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(ResourceClassRule.java:108) ~[jersey-server-1.19.jar:1.19]
>         at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(RightHandPathRule.java:147) ~[jersey-server-1.19.jar:1.19]
>         at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(RootResourceClassesRule.java:84) ~[jersey-server-1.19.jar:1.19]
>         at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1542) [jersey-server-1.19.jar:1.19]
>         at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(WebApplicationImpl.java:1473) [jersey-server-1.19.jar:1.19]
>         at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(WebApplicationImpl.java:1419) [jersey-server-1.19.jar:1.19]
> When systemLoad of SystemDiagnosticsFactory is negative, it skips setting setProcessorLoadAverage of SystemDiagnostics.
>         if (systemLoad > 0) {
>             systemDiagnostics.setProcessorLoadAverage(systemLoad);
>         }
> I think when getSystemLoadAverage returns a negative value, systemLoad sets 1.
> Thank you.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)