Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unexpected error occurred during metrics collection- java.lang.NullPointerException #45

Open
samuellay opened this issue Mar 29, 2016 · 2 comments

Comments

@samuellay
Copy link

I applied the workaround mentioned in an earlier issue report:

<property>
  <name>use_alternate_vm_prefix_sufix</name>
  <value>false</value>
</property>

I still get:

# ./StatsFeeder.sh -h fitw08v110.us.fit -u '**************' -p ************ -c ./config/GRsampleConfig.xml
StatsFeeder [4.1 (Build jenkins-Statsfeeder-697)]
Copyright (c) 2011-2013 VMware, Inc`
All rights reserved
-----------------------------
Managed entity: com.vmware.vim25.ManagedObjectReference@39178c5c
Current supported: true
Refresh rate: 20
Summary supported: true
-----------------------------
-----------------------------
Managed entity: com.vmware.vim25.ManagedObjectReference@382b6004
Current supported: true
Refresh rate: 20
Summary supported: true
-----------------------------
1    [Thread-11] FATAL de.synaxon.graphitereceiver.core.MetricsReceiver  - Unexpected error occurred during metrics collection.
java.lang.NullPointerException
        at de.synaxon.graphitereceiver.core.MetricsReceiver.receiveStats(MetricsReceiver.java:303)
        at com.vmware.ee.statsfeeder.StatsRetriever.onComplete(StatsRetriever.java:141)
        at com.vmware.ee.statsfeeder.StatsRetriever.access$300(StatsRetriever.java:24)
        at com.vmware.ee.statsfeeder.StatsRetriever$1.run(StatsRetriever.java:189)
55   [Thread-4] FATAL de.synaxon.graphitereceiver.core.MetricsReceiver  - Unexpected error occurred during metrics collection.
java.lang.NullPointerException
        at de.synaxon.graphitereceiver.core.MetricsReceiver.receiveStats(MetricsReceiver.java:303)
        at com.vmware.ee.statsfeeder.StatsRetriever.onComplete(StatsRetriever.java:141)
        at com.vmware.ee.statsfeeder.StatsRetriever.access$300(StatsRetriever.java:24)
        at com.vmware.ee.statsfeeder.StatsRetriever$1.run(StatsRetriever.java:189)
101  [Thread-4] FATAL de.synaxon.graphitereceiver.core.MetricsReceiver  - Unexpected error occurred during metrics collection.
java.lang.NullPointerException
        at de.synaxon.graphitereceiver.core.MetricsReceiver.receiveStats(MetricsReceiver.java:303)
        at com.vmware.ee.statsfeeder.StatsRetriever.onComplete(StatsRetriever.java:141)
        at com.vmware.ee.statsfeeder.StatsRetriever.access$300(StatsRetriever.java:24)
        at com.vmware.ee.statsfeeder.StatsRetriever$1.run(StatsRetriever.java:189)
...

GRsampleConfig.zip

@narioinc
Copy link

Following the suggestion to resolve this issue, i too ended up with the logs similar to the one posted by samuellay.
The line here is the issue:
String instanceName = (this.rules.get("instanceName") != null)? RuleUtils.applyRules(metricSet.getInstanceId(),this.rules.get("instanceName")):metricSet.getInstanceId();

is metricSet probably coming up as null ?

@poetimp
Copy link

poetimp commented Oct 26, 2016

Using the comment from @narioinc as a spring board, in config/GRsampleConfig.xml

I set

<property>
   <name>names_transformation_rules</name>
   <value>true</value>
</property>
<property>
   <name>names_transformation_rules_path</name>
   <value>config/rules.xml</value>
</property>

Then I created a rules.xml in the config directory based on: https://github.com/SYNAXON/GraphiteReceiver/issues/37

And the errors went away and I am getting data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants