PassTheMayo / minecraft-server-util

A Node.js library for Minecraft servers that can retrieve status, query, RCON, and send Votifier votes.
https://passthemayo.gitbook.io/minecraft-server-util/
MIT License
141 stars 24 forks source link

bug: Can't Get Status of Minecraft PE Server #70

Closed Jordan9232 closed 2 years ago

Jordan9232 commented 2 years ago

Describe the bug: I can't seem to get the status of a minecraft PE server. I thought statusBedrock would be what I should use but it just times out every time for this server: play.brlns.net:2000. Do these status functions work with PE at all?

Code:

const status = await statusBedrock('play.brlns.net', 2000);

Expected behavior: Should get a response from the server

Additional context Again, I am unsure if these status functions are intended to work with PE at all.

PassTheMayo commented 2 years ago

I'm able to retrieve the status of that server just fine on my end using statusBedrock(). I had an issue reported earlier for this exact issue where it was caused by a networking issue on the client end, which was caused by the network blocking UDP connections. Double check to see if your network is blocking UDP first.

Jordan9232 commented 2 years ago

No matter what I do I can't seem to get it to work. I may be doing something wrong though. Do you see any issue with the following?

Just to make sure I could ping the server outside of my app, I installed NMap (a tool to test TCP/UDP connections). I tried testing play.brlns.net:2000 before and after my changes for UDP. Before I was getting no results, but after my UDP changes I got the following output: image

So it looks like my changes allowed NMap to properly ping. I just can't seem to get it to work in my app now. I don't know if I missed something with the setup or if there is an additional step specific to node express.

I even disabled the firewall both on my router and my computer as I thought it would just accept anything to work and it still won't work.

Any ideas?

PassTheMayo commented 2 years ago

What version of the library are you running? Just to confirm, update to the latest version by using npm install minecraft-server-util@latest and test again to make sure this wasn't fixed in a newer version.

Jordan9232 commented 2 years ago

I am already on the latest version. 5.2.8.

PassTheMayo commented 2 years ago

I'm honestly not sure what to tell you here. Since I am able to retrieve the status just fine from my end, I have nothing else to debug this problem unless you can come up with something on your end. You can test to make sure that the server has UDP connections enabled from your IP address, which it appears it does since you can nmap just fine. I might suggest that you build this package from source and add some debug comments to see where the code stops.