Skip to content
This repository has been archived by the owner on Apr 18, 2023. It is now read-only.

Unable to pull minecraft server MBean data #68

Open
nhancin opened this issue Aug 18, 2021 · 1 comment
Open

Unable to pull minecraft server MBean data #68

nhancin opened this issue Aug 18, 2021 · 1 comment

Comments

@nhancin
Copy link

nhancin commented Aug 18, 2021

I'm trying to use this to pull MBean information from my minecraft server(s) to monitor internal tick times.

My first issue is that if I define the server it won't find it, however if I leave the "jmxServers" list empty it will find the connection regardless if "autoDetectLocalVirtualMachines" is set to true or false. If I define a jmxServers list entry, it doesn't show any information at all.

For right now I'm testing it with an empty list and autoDetect set to true.

Here's the jmxServer entry that I have tried. This server is started with -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.port=42001 -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Djava.rmi.server.hostname=192.168.1.137

        {
            "name": "Minecraft1",
            "serviceUrl": "service:jmx:rmi:///jndi/rmi://127.0.0.1:42001/jmxrmi"
        }

I have tested the connection locally with jmxterm to ensure it works and the MBean is available:

$>open 127.0.0.1:42001
#Connection to 127.0.0.1:42001 is opened
$>get -b net.minecraft.server:type=Server averageTickTime
#mbean = net.minecraft.server:type=Server:
averageTickTime = 1.5295846;

I've also tested this with VisualVM over the network and am able to get this MBean data.

I've gone and thrown in some extra logging in a few places just to verify what information it's passing around but it just confirms that it's not able to find it.

2021-08-18 10:12:35: java.d: WARNING: org.firehol.netdata.module.jmx: dimension objectName = net.minecraft.server:type=Server    
2021-08-18 10:12:35: java.d: WARNING: org.firehol.netdata.module.jmx: getMBeanQueryForName has been called, object = net.minecraft.server:type=Server, attr = averageTickTime  
2021-08-18 10:12:35: java.d: WARNING: org.firehol.netdata.module.jmx: Could not query one dimension. Skipping... Reason: [org.firehol.netdata.module.jmx.exception.JmxMBeanServerQueryException] Could not query attribute 'averageTickTime
' of MBean 'net.minecraft.server:type=Server' ... javax.management.InstanceNotFoundException: net.minecraft.server:type=Server ... net.minecraft.server:type=Server Detail: net.minecraft.server:type=Server

Is there a reason you know of why it wouldn't be able to find the MBean/attribute that I'm able to pull using other methods? I'm still trying to look through java and see, but I'm not super well versed in java.

@AntoineRevel
Copy link

I have the same problem

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

No branches or pull requests

2 participants