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

Cannot ping a Bedrock Server #2

Open
RJDaPirate opened this issue Sep 16, 2020 · 13 comments
Open

Cannot ping a Bedrock Server #2

RJDaPirate opened this issue Sep 16, 2020 · 13 comments
Assignees
Labels
enhancement New feature or request

Comments

@RJDaPirate
Copy link

I've tried both Minecraft related MagicMirror2 modules and neither can ping my in-house Minecraft Bedrock server. Do you have any idea on why this would be the case?

@ralberth
Copy link
Owner

Many! But first, thanks for trying out my MM Minecraft plugin.

Let's start with the software on the box and work on anything on your MM box that might be getting in the way.

Can you ping from the MM box to the Minecraft box? If that works, it eliminates basic networking problems, but if it fails, it doesn't necessarily mean much...firewalls can block ICMP like ping.

Give "traceroute" a try if you know that. If there is an intermediate router between MM and Minecraft it'll let us know how far a packet can get.

If these fail, there could be a firewall or something else blocking traffic from leaving the MM box, however unlikely that might be.

If you have "nc" installed on the MM box, or want to install it, that's another way to check network connectivity. Something like echo "hithere" | nc 1.2.3.4 567 where 1.2.3.4 is the Minecraft box and 567 is the port the Minecraft software is listening on. That'll use plain TCP to connect.

Can you describe your network setup too? That can help iron out something strange. I.e., is your MM and Minecraft box on the same network segment? Separated by a router or switch?

Is there a specific error message you're seeing in the MM logs that could shed some light on things? If MM-MinecraftStatus can't reach the Minecraft server, it prints an error message in the browser's console. If you're not familiar with that, we can run MM "serveronly" and connect from a regular FireFox or Chrome browser and look at the console logs for something specific.

I'm sorry, but I don't know your general level of network savvy and if you've worked with a browser console before. Please write back and let me know what from above sounds good, and what you're unfamiliar with. I'll explain more in detail to get things moving!

Don't worry, we'll figure this out.

@RJDaPirate
Copy link
Author

RJDaPirate commented Sep 18, 2020 via email

@ralberth
Copy link
Owner

Here's a brain dump from our phone call this evening. Hopefully your networking friend can think of something useful!

Setup

Networks

192.168.1.* ("cove")
Main network with MagicMirror box, desktop PC, and the printers.

192.168.50.* ("scallywag")
Network with both Minecraft servers, reserved for kid-oriented servers.

"Officers"
Separate network with iPad and parent devices.

There are other networks with kid's kindles and so on.

Router Rules

  • Cove can connect to scallywag
  • Officers can connect to scallywag
  • Scallywag cannot connect to Cove or Officers

Servers

Minecraft Bedrock Server
IP 192.168.50.23, mask 255.255.255.0. Ubuntu box running Bedrock. Lives on Scallywag network.

Minecraft Java Server
IP 192.168.50.22, mask 255.255.255.0. Pi running Bukkit Minecraft server. Lives on Scallywag.

MagicMirror
IP 192.168.1.9, mask 255.255.255.0. Runs Magic Mirror, lives on Cove.

Desktop PC
Windows PC also on Cove.

Goal

Get MagicMirror box to connect to Bedrock Minecraft server. The MagicMirror software wants to check if Bedrock server is running Minecraft by checking it's port, 19132.

Status

  • iPad on Officers network can connect to Minecraft on Bedrock server. Double-checked it's using 192.168.50.23 and port 19132
  • MagicMirror cannot connect to Minecraft on Bedrock server.

Troubleshooting

  1. We have network connectivity from MagicMirror to Bedrock server, and it routes through the router since they are on different networks (.1. to .50.):
    tracert 192.168.50.23 shows 192.168.1.1 and then 192.168.50.23.
  2. Bedrock server rejects attempts to connect to port 19132 from MagicMirror:
    telnet 192.168.50.32 19132 gives "connection refused"
    so, packets are reaching the host, but the host is rejecting the connection attempt saying that there is no such open port on the server.
  3. Confirmed that port 19132 is not listening on the Bedrock server:
    netstat -ant | grep 19132 shows nothing.
    Further netstat commands confirm it's not open.
  4. Repeat the test from Minecraft Java Server since it is also on the .50. network. This eliminates something strange with the router:
    telnet 192.168.50.23 19132 also gives "connection refused"
    Confirms packets can reach the Bedrock server and that there is nothing listening on that port.
  5. Confirm Minecraft is running on the Bedrock server first hand by bounding it locally:
    sudo systemctl restart minecraft (or something close to that), confirmed it restarted.
    Same result as above, "connection refused". netstat still shows nothing listening on port 19132.
  6. Messed around with firewall rules on the router, but same result.
  7. Confirm Minecraft is trying to listen on 19132: more server.properties on the Bedrock server and saw server.port=19132` entry confirming it.

Everything above is consistent with the Minecraft Bedrock server having trouble starting up, resulting in all connection attempts being "connection refused". However, the iPad continues to be able to connect.

Next Steps

  1. Repeat everything above?
  2. Spend more time understanding why the iPad works, look at config, how it logs-in, etc.
  3. Dump whatever you find in here if you get stuck. Maybe it'll trigger something else in my brain to look at.

Conclusion so far

It's cold comfort, but this isn't a MagicMirror or MM-MinecraftStatus problem, since command-line things like telnet also can't connect to the port on the Bedrock server. Let's get connectivity at the OS working first, then see if MagicMirror has any problems.

Cheers!

@RJDaPirate
Copy link
Author

RJDaPirate commented Sep 20, 2020 via email

@ralberth
Copy link
Owner

I didn't know Bedrock server existed before you created this issue. When you have more info, let me know. I'm happy to update the MagicMirror module to handle this too!

@RJDaPirate
Copy link
Author

RJDaPirate commented Sep 24, 2020 via email

@RJDaPirate
Copy link
Author

RJDaPirate commented Sep 25, 2020 via email

@ralberth
Copy link
Owner

Wow, you probably found it! We were looking for a TCP connection and using tools to connect to an assumed TCP socket instead of sending plain UDP datagrams.

The current MinecraftStatus certainly won't work with Bedrock, but this is a great feature to add. I'll get to it "soon" :-)

I'm out this entire weekend, and next week sucks, but I'll get a feature out to handle it.

Joel, THANK YOU for doing the work on your side and helping!

@ralberth ralberth self-assigned this Sep 25, 2020
@ralberth ralberth added the enhancement New feature or request label Sep 25, 2020
@RJDaPirate
Copy link
Author

RJDaPirate commented Sep 26, 2020 via email

@RJDaPirate
Copy link
Author

RJDaPirate commented Sep 26, 2020 via email

@ralberth
Copy link
Owner

ralberth commented Oct 2, 2020

I did some research. According to the BDS wiki on gamepedia.com,

  • BDS uses UDP
  • BDS is Alpha software
  • No RCON
  • No libraries for remote control

The main BDS download page on minecraft.net says this is an early alpha release for evaluation only.

So, I'm not surprised there isn't support for it in the usual libraries yet.

I posted to Reddit's /r/MCPE asking about similar BDS libraries. Let's wait and see if there is something out there, or other ideas before we go further.
https://www.reddit.com/r/MCPE/comments/j3lhdh/rcon_to_bedrock_or_other_way_to_query_from_remote/

@RJDaPirate
Copy link
Author

RJDaPirate commented Oct 3, 2020 via email

@ralberth
Copy link
Owner

Ugh, no replies on the reddit post after over a week. I posted on the Minecraft #technical-bedrock Discord group, but didn't get anywhere. I think this will have to be a feature request and sit for a while until we get more community over time that contributes to plugins, etc. that can handle this.

Sorry for the dead-end right now. I'll leave the issue open so it gets attention from time-to-time, and see if I can find some support in the future. Cheers!

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

No branches or pull requests

2 participants