jdeath / Bedrock-Homeassistant

MIT License
8 stars 5 forks source link

Invalid IP address (failed to determine the MAC address). #8

Open Kerber0ss opened 2 years ago

Kerber0ss commented 2 years ago

Hello, I add integration, select Bedrock, set ip and port but after submit I receive error. Invalid IP address (failed to determine the MAC address). From my HA server server Minecraft available, ping OK. Or Minecraft server must be in local network/host only?

jdeath commented 2 years ago

I have only used on local network, but I think should work over the net. I only added the bedrock capability, not any of the error handling. Double check the port. If you have a system you can run python on, try using the python library directly to see if server works remotely: https://github.com/py-mine/mcstatus

This integration uses an older version of the mcstatus library, but should work the same.

Kerber0ss commented 2 years ago

hmm, mcstatus too can't connect ConnectionRefusedError: [Errno 111] Connection refused I dont understand why. From Minecraft mobile client I connect and play from outside, port 19132, server in docker, ports 0.0.0.0:19132->19132/udp, :::19132->19132/udp Netstat udp 0 0 0.0.0.0:19132 0.0.0.0:* 3560823/docker-prox nmap:

PORT      STATE         SERVICE
19132/udp open|filtered unknown

iptables rules

Chain INPUT (policy ACCEPT 17824 packets, 1957K bytes)
 pkts bytes target     prot opt in     out     source               destination         
    2    88 ACCEPT     tcp  --  *      *       0.0.0.0/0            0.0.0.0/0            tcp dpt:19132
  198 12078 ACCEPT     udp  --  *      *       0.0.0.0/0            0.0.0.0/0            udp dpt:19132

mcstatus say Connection refused to external IP and to localhost and to local docker ip O_O very strange things )

Kerber0ss commented 2 years ago

I test Mcstatus to public bedrock servers play.cosmicpe.me:19132, ecpehub.net:19132 bedrock.opblocks.com:1932 and other, all of this

mcstatus bedrock.opblocks.com:19132 ping
ConnectionRefusedError: [Errno 111] Connection refused