[Bug Report] Error while enabling
Closed this issue · 5 comments
John-H-Smith commented
Hi,
after updating from 2.2.0 to 2.4.0 I got this StackTrace:
[16:06:27] [Server thread/INFO]: [PrometheusExporter] Reading player stats from folder /home/mc/world/stats
[16:06:27] [Server thread/INFO]: [PrometheusExporter] Found player stats file: 3a6f3db7-fddc-49bd-bea4-f725f30a3e1c.json
[16:06:27] [Server thread/INFO]: [PrometheusExporter] Found player stats file: 61607f24-d95b-46f9-8f5a-0a9e207d15e5.json
[16:06:27] [Server thread/INFO]: [PrometheusExporter] Found player stats file: 198f5e7c-3c1b-4def-8719-d4eb53ed3906.json
[16:06:27] [Server thread/INFO]: [PrometheusExporter] Found player stats file: a5195dc0-22cb-4a5b-a1b2-62d767c7700e.json
[16:06:27] [Server thread/ERROR]: Error occurred while enabling PrometheusExporter v2.4.0 (Is it up to date?)
com.jayway.jsonpath.PathNotFoundException: Missing property in path $['stats']
at com.jayway.jsonpath.internal.path.PathToken.handleObjectProperty(PathToken.java:72) ~[?:?]
at com.jayway.jsonpath.internal.path.PropertyPathToken.evaluate(PropertyPathToken.java:79) ~[?:?]
at com.jayway.jsonpath.internal.path.RootPathToken.evaluate(RootPathToken.java:62) ~[?:?]
at com.jayway.jsonpath.internal.path.CompiledPath.evaluate(CompiledPath.java:99) ~[?:?]
at com.jayway.jsonpath.internal.path.CompiledPath.evaluate(CompiledPath.java:107) ~[?:?]
at com.jayway.jsonpath.JsonPath.read(JsonPath.java:183) ~[?:?]
at com.jayway.jsonpath.internal.JsonContext.read(JsonContext.java:89) ~[?:?]
at de.sldk.mc.metrics.player.PlayerStatisticLoaderFromFile.getPlayersStats(PlayerStatisticLoaderFromFile.java:98) ~[?:?]
at de.sldk.mc.metrics.player.PlayerStatisticLoaderFromFile.lambda$readPlayerStatsFiles$4(PlayerStatisticLoaderFromFile.java:79) ~[?:?]
at java.util.stream.Collectors.lambda$uniqKeysMapAccumulator$1(Collectors.java:180) ~[?:?]
at java.util.stream.ReduceOps$3ReducingSink.accept(ReduceOps.java:169) ~[?:?]
at java.util.stream.ReferencePipeline$15$1.accept(ReferencePipeline.java:541) ~[?:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:179) ~[?:?]
at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:197) ~[?:?]
at java.util.Iterator.forEachRemaining(Iterator.java:133) ~[?:?]
at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Spliterators.java:1801) ~[?:?]
at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484) ~[?:?]
at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474) ~[?:?]
at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913) ~[?:?]
at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[?:?]
at java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:682) ~[?:?]
at de.sldk.mc.metrics.player.PlayerStatisticLoaderFromFile.readPlayerStatsFiles(PlayerStatisticLoaderFromFile.java:74) ~[?:?]
at de.sldk.mc.metrics.player.PlayerStatisticLoaderFromFile.<init>(PlayerStatisticLoaderFromFile.java:43) ~[?:?]
at de.sldk.mc.metrics.PlayerStatistics.<init>(PlayerStatistics.java:40) ~[?:?]
at de.sldk.mc.config.MetricConfig.getMetric(MetricConfig.java:20) ~[?:?]
at de.sldk.mc.config.PrometheusExporterConfig.lambda$enableConfiguredMetrics$1(PrometheusExporterConfig.java:62) ~[?:?]
at java.util.Arrays$ArrayList.forEach(Arrays.java:4203) ~[?:?]
at de.sldk.mc.config.PrometheusExporterConfig.enableConfiguredMetrics(PrometheusExporterConfig.java:61) ~[?:?]
at de.sldk.mc.PrometheusExporter.onEnable(PrometheusExporter.java:18) ~[?:?]
at org.bukkit.plugin.java.JavaPlugin.setEnabled(JavaPlugin.java:263) ~[patched_1.17.jar:git-Paper-"4e2f0be"]
at org.bukkit.plugin.java.JavaPluginLoader.enablePlugin(JavaPluginLoader.java:370) ~[patched_1.17.jar:git-Paper-"4e2f0be"]
at org.bukkit.plugin.SimplePluginManager.enablePlugin(SimplePluginManager.java:500) ~[patched_1.17.jar:git-Paper-"4e2f0be"]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugin(CraftServer.java:518) ~[patched_1.17.jar:git-Paper-"4e2f0be"]
at org.bukkit.craftbukkit.v1_17_R1.CraftServer.enablePlugins(CraftServer.java:432) ~[patched_1.17.jar:git-Paper-"4e2f0be"]
at net.minecraft.server.MinecraftServer.loadWorld(MinecraftServer.java:643) ~[patched_1.17.jar:git-Paper-"4e2f0be"]
at net.minecraft.server.dedicated.DedicatedServer.initServer(DedicatedServer.java:304) ~[patched_1.17.jar:git-Paper-"4e2f0be"]
at net.minecraft.server.MinecraftServer.runServer(MinecraftServer.java:1118) ~[patched_1.17.jar:git-Paper-"4e2f0be"]
at net.minecraft.server.MinecraftServer.lambda$spin$0(MinecraftServer.java:320) ~[patched_1.17.jar:git-Paper-"4e2f0be"]
at java.lang.Thread.run(Thread.java:831) [?:?]
[16:06:27] [Server thread/INFO]: [PrometheusExporter] Disabling PrometheusExporter v2.4.0
[16:06:27] [Server thread/WARN]: [PrometheusExporter] Failed to stop metrics server gracefully: Cannot invoke "de.sldk.mc.MetricsServer.stop()" because "this.server" is null```
EpicnessTwo commented
What happens if you temporarily remove the a5195dc0-22cb-4a5b-a1b2-62d767c7700e.json
file from the stats directory?
John-H-Smith commented
Then the UID is removed from the list above but a new one is shown there.
Also I should mention I set player_statistic
to false
in the config.
sladkoff commented
@John-H-Smith Could you try the latest version v2.4.1?
John-H-Smith commented
Oh lol - I thought I was running on the latest version. Fixed!