jdeath / Bedrock-Homeassistant

MIT License
8 stars 5 forks source link

Failed to connect to server #4

Open gertkjerslev opened 2 years ago

gertkjerslev commented 2 years ago

Getting this error when using the bedrock option (on a bedrock server) "Failed to connect to server. Please check the host and port and try again. Also ensure that you are running at least Minecraft version 1.7 on your server."

jdeath commented 2 years ago

Not sure. The bedrock option shows up in the integration when you add the server? You put the IP and port in correctly? Are you running the vanilla bedrock server -- never tested on pocketmine or the like. My server is running fine on 1.18.2 . You are on a recent version of homeassistant?

gertkjerslev commented 2 years ago

I installed HA torday, so latest version :-) and running a vanilla bedrock server at pebblehost.com

jdeath commented 2 years ago

if you DM on home assistant the IP and port, I can take a look. I have only used locally hosted BDS server.

Kirbo commented 2 years ago

Mine isn't working either, with the same error. I'm hosting my very own Bedrock server on my private virtual server. It's currently running the version

[2022-02-03 19:13:09:191 INFO] Starting Server
[2022-02-03 19:13:09:192 INFO] Version 1.18.2.03

The integration worked with some previous versions but stopped working after some update. I'm not sure could that extra notation in the version number break this? I think the version number is usually 1.18.3 and so forth, but now it its 1.18.2.03, which doesn't follow at least the Semantic Versioning specifications.

For what it's worth, I tried with both domain name and IP-address. With domain.tld:port I got the error:

Failed to connect to server. Please check the host and port and try again. Also ensure that you are running at least Minecraft version 1.7 on your server.

...with the IP-address I got the error:

IP address is invalid (MAC address could not be determined). Please correct it and try again.
jdeath commented 2 years ago

Weird. I am running Version 1.18.2.03 and integration is working fine. Just removed and my old server and re-added without an issue. Perhaps hard restarting your server. Nothing should have changed, but latest supervisor/core is wonky. The error message is the default error from the JAVA only integration, that is why you are getting it. IP:port or domain.tld:port should be the same (tried both for mine).

Kirbo commented 2 years ago

Now that I read your reply here https://github.com/jdeath/Bedrock-Homeassistant/issues/5#issuecomment-1026253516 I noticed that I don't even have option to select Java or Bedrock. It just asks me for the name for the server and the address:port for the server, nothing more.

I think I'll re-install/re-download this integration to HACS and restart HA again, just in case. I'll let you know if it made any difference

Kirbo commented 2 years ago

Well that did the trick. The integration just stopped working on some HA update like ~few weeks/month ago, but now that I re-installed the integration in HACS, rebooted and added the integration again, it seems to work.