itzg / docker-minecraft-bedrock-server

Containerized Minecraft Bedrock Dedicated Server with selectable version
MIT License
1.15k stars 219 forks source link

The Server is not visible in Network/Friends Tab #287

Open Gegh opened 1 year ago

Gegh commented 1 year ago

Logfile:

[2022-11-02 13:20:06:203 INFO] Please note that LAN discovery will not function for this server.

This seems to be related to https://bugs.mojang.com/browse/BDS-1094?focusedId=1208365&page=com.atlassian.jira.plugin.system.issuetabpanels%3Acomment-tabpanel#comment-1208365

Do we need a 'enable-lan-visibility' enviroment variable?

itzg commented 1 year ago

Great find. Yes, looks like that needs to be added to https://github.com/itzg/docker-minecraft-bedrock-server/blob/master/property-definitions.json. A contribution would be great.

arogulin commented 1 year ago

I was going to make a PR but during local testing I noticed 2 things:

  1. enable-lan-visibility property is not yet supported by the server (and that was also mentioned in the bug linked by @Gegh). I did not find it in server.properties that I downloaded from https://minecraft.azureedge.net/bin-linux/bedrock-server-1.19.41.01.zip. I set it anyways (enable-lan-visibility=true) but that did not affect that log message, it printed Please note that LAN discovery will not function for this server again.
  2. I actually could not reproduce the issue - I was able to see the server in the Friends list as before, so that log message probably does not mean anything (yet), the server is visible no matter if enable-lan-visibility is set or not. I remember my son mentioned a couple weeks ago that he did not see the server in the list, so I was under assumption that it's still the case, but I think it was just a version mismatch between the client (iPad) and the server. As I restarted the server it downloaded the latest 1.19.41.01 and is perfectly visible to the latest iOS client. Or maybe they fixed the issue with visibility in this latest version.
itzg commented 1 year ago

I have found their LAN discovery to be extremely sporadic with at least iOS client for years now. FWIW, I went ahead and added the enable-lan-visibility mapping.

scott-force commented 1 year ago

Thanks for responding to this quickly. Will this require a github release to take effect, or is downloading the new dockerhub image sufficient?

itzg commented 1 year ago

The new variable is included in the latest image.

scott-force commented 1 year ago

Reporting back in hopes this helps someone

I have found their LAN discovery to be extremely sporadic with at least iOS client for years now

I noticed this as well. I have multiple computers in my house I connect with, and one seems to nearly never see the local game, every once in a while my server will appear in the local game section though.

The other computer will see the local game 100% of the time. No idea what is causing one to see it and the other not to, but it seems like it's probably not a server issue, rather a local network config or visibility issue of some sort.

AurimasNav commented 1 year ago

I can connect via android by adding the server IP, but from PS5 it is not visible as LAN server.

jurgenweber commented 5 months ago

Yeah, I am wondering why it isn't either but I am running it in k8s, but the port is just open on my lan but I can not see it in the friends list. Do you only need the one port 19132 open to see it? Is there more network config to do?

I can connect to the server under 'services' but I would really like the LAN discovery

jurgenweber commented 5 months ago

I solved this last night but adding

        hostNetwork: true
        extraPodSpec:
          hostNetwork: "{{ .Values.hostNetwork }}"

to the podSpec, this then attaches it to the host NIC on the same subnet as everything else on my network so broadcasting works. What I Find odd is I have two servers, a creative and survival one. On the Andoid tablet and phone, it can see both. On my windows 10 PC playing bedrock I can only see the creative server.

¯_(ツ)_/¯

jurgenweber commented 5 months ago

but you are not wrong about it be3ing sporatic, sometimes now on the tablets, there is one, or two. annoying.

Taxelas commented 3 months ago

I could make server visible from Win11 client by creating network with ipvlan driver, and linking it to physical interface

#docker network inspect Vlan10
{
        "Name": "Vlan10",
        "Id": "df32e8e897c5b21b4da3d2d84",
        "Created": "2024-07-07",
        "Scope": "local",
        "Driver": "ipvlan",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": null,
            "Config": [
                {
                    "Subnet": "192.168.1.0/24",
                    "Gateway": "192.168.1.1"
                }
            ]
        },
        "Internal": false,
        "Attachable": true,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "144af4ebeff9ded9516f3fe27a": {
                "Name": "minecraft-bds-1",
                "EndpointID": "3b6125194e7643",
                "MacAddress": "",
                "IPv4Address": "192.168.1.35/24",
                "IPv6Address": ""
            }
        },
        "Options": {
            "parent": "ens11"
        },
        "Labels": {}
    }
]

But I have challenge with Nintendo switch I can join win 11 client from Nintendo if users are friends But I can't join bedrock server. I think to be visible to Nintendo it should translate xuid that can be added to freinds

jurgenweber commented 3 months ago

Yeah, I found my solution is very sporadic, it will work and then is disappears over time.. restart the server, it comes back. I don't get it.