docker-minecraft-bedrock-server
                                
                                 docker-minecraft-bedrock-server copied to clipboard
                                
                                    docker-minecraft-bedrock-server copied to clipboard
                            
                            
                            
                        Bedrock version is constantly disconnected
I have the same setup for my Java version excep that I changed everything to UDP. I get these logs
Downloading Bedrock server version 1.14.60.5 ...
2020/05/14 16:27:38 Setting difficulty to normal in server.properties
2020/05/14 16:27:38 Setting max-players to 16 in server.properties
2020/05/14 16:27:38 Setting default-player-permission-level to operator in server.properties
Starting Bedrock server...
NO LOG FILE! - setting up server logging...
[2020-05-14 16:27:38 INFO] Starting Server
[2020-05-14 16:27:38 INFO] Version 1.14.60.5
[2020-05-14 16:27:38 INFO] Session ID 66254136-498c-407e-979a-f5f55155efe3
[2020-05-14 16:27:38 INFO] Level Name: Bedrock level
[2020-05-14 16:27:38 INFO] Game mode: 0 Survival
[2020-05-14 16:27:38 INFO] Difficulty: 2 NORMAL
[2020-05-14 16:27:38 INFO] opening worlds/Bedrock level/db
[2020-05-14 16:27:53 INFO] IPv4 supported, port: 19132
[2020-05-14 16:27:53 INFO] IPv6 not supported
[2020-05-14 16:27:53 INFO] IPv4 supported, port: 44642
[2020-05-14 16:27:53 INFO] IPv6 not supported
[2020-05-14 16:27:54 INFO] Server started.
[2020-05-14 16:29:52 INFO] Player connected: mjwrazor, xuid: 2535409695687979
[2020-05-14 16:30:03 INFO] Player disconnected: mjwrazor, xuid: 2535409695687979
[2020-05-14 16:30:12 INFO] Player connected: mjwrazor, xuid: 2535409695687979
[2020-05-14 16:30:23 INFO] Player disconnected: mjwrazor, xuid: 2535409695687979
[2020-05-14 16:32:48 INFO] Player connected: mjwrazor, xuid: 2535409695687979
[2020-05-14 16:32:59 INFO] Player disconnected: mjwrazor, xuid: 2535409695687979
[2020-05-14 16:33:06 INFO] Player connected: mjwrazor, xuid: 2535409695687979
[2020-05-14 16:33:17 INFO] Player disconnected: mjwrazor, xuid: 2535409695687979
Where my character is instantly kicked out. my kubernetes file is
apiVersion: apps/v1
kind: StatefulSet
metadata:
  labels:
    instance: game-1
  name: game-statefulset-1
spec:
  serviceName: game-svc-1
  selector:
    matchLabels:
      instance: game-1 # has to match .spec.template.metadata.labels
  template:
    metadata:
      labels:
        instance: game-1 # has to match .spec.selector.matchLabels
    spec:
      terminationGracePeriodSeconds: 30
      containers:
      - image: itzg/minecraft-bedrock-server:latest
        name: game-server-1
        imagePullPolicy: IfNotPresent
        ports:
        - containerPort: 19132
        resources:
          limits:
            memory: 2Gi
            cpu: 1800m
          requests:
            memory: 2Gi
            cpu: 1600m
        env:
        - name: EULA
          value: 'TRUE'
        - name: VERSION
          value: '1.14'
        - name: DIFFICULTY
          value: normal
        - name: MAX_PLAYERS
          value: '16'
        - name: DEFAULT_PLAYER_PERMISSION_LEVEL
          value: 'operator'
        # SERVER CONFIG
        - name: MEMORY
          value: 2G
        readinessProbe:
          exec:
            command: 
              - /usr/local/bin/mc-monitor
              - status-bedrock 
              - --host 
              - 127.0.0.1
              - --port 
              - "19132"
          initialDelaySeconds: 120
          periodSeconds: 60
          failureThreshold: 10
        livenessProbe:
          exec:
            command: 
              - /usr/local/bin/mc-monitor
              - status-bedrock 
              - --host 
              - 127.0.0.1
              - --port
              - "19132"
          initialDelaySeconds: 120
          periodSeconds: 60
          failureThreshold: 10
        volumeMounts:
        - name: game-server-storage-1
          mountPath: /data
      # Make sure and set Volumes in patch, dif requirements per provider
      volumes:
      - name: game-server-storage-1
        persistentVolumeClaim:
          claimName: game-server-pvc-1
The server has 2cpu and 4gb of ram. only 2.2gb are able to allocate on that node
It seems like IPV6 needs to be there. How do i do that?
If you want to take a look here is the setup. https://github.com/marcusjwhelan/minecraft_docker/tree/master/k8s/prod-azure-multi-pod-node
Your issue inspired me to update the example here in the repo to use a StatefulSet. The example works on a Linux server on my LAN using microk8s and there's a few specific things you may want to try in yours:
The BDS process also binds IPv6 to 19133, so if your Azure deployment insists on IPv6 then you can add the port bits for 19133 also.
I'm hoping one or all of the above help your setup.
@itzg It looks like it still instantly disconnects the server once connected. I am trying to avoid using a load balancer because I am testing out a process to have 1000 or more servers up on one IP. I am using Ingress-nginx.
Any suggestions with that?
Tried running this version just with docker or the kubernetes example on my local computer (Windows10) neither worked. The kubernetes version didn't have an exposed IP. I followed the commands and even added a volume for the docker version but no dice.
That's strange the local usage didn't work for you. I used:
kubectl apply -f https://github.com/itzg/docker-minecraft-bedrock-server/raw/master/examples/kubernetes.yml
kubectl patch svc bds -p '{"spec":{"type":"LoadBalancer"}}'
and I was able to see the server in "LAN Games" section.
I only use nginx-ingress for the standard HTTP/HTTPS ingress support, so I haven't tried out their UDP extension. That would be the most likely culprit IMHO.
@itzg I don't know which version you are using. I am using the Microsoft Minecraft for windows 10. There is no "LAN Games" section I can find. Just servers.
Sorry, I lost track of your reply in my other emails. Confusingly enough, the LAN games show up in the "Friends" tab:

Sorry to resurrect this old issue, but it's the only reference I've been able to find to the issue I'm running into. I'm running the itzg/docker-minecraft-bedrock-server image as a StatefulSet on Ubuntu Server with Microk8s. As long as I expose the Service with NodePort everything works great on the port I've assigned. However, I'd like to run it on the usual port 19132, so I'm trying to do it with nginx ingress and UDP stream.
I can connect via 19132 using the nginx ingress addon in Microk8s, however, after just a few moments the Minecraft client will give the "Disconnected from server" error message. It does seem like the issue is Nginx in this case, but I'm wondering if anyone knows of any configuration or setting that could be breaking the Nginx UDP Stream capability with Minecraft Bedrock Server. I've even used Wireshark at this point to see if I can notice anything strange. Wireshark recognizes the Minecraft Bedrock UDP traffic as the RakNet game networking protocol but only shows that after a few moments the server (probably Nginx) stops responding completely while the client continues sending data. Eventually the client determines that the server must have disconnected and displays the message.
I'm mentioning this in the hopes that maybe someone else has solved this issue.
I'm having a similar issue. I'm although I'm using playit.gg to tunnel my udp and port to play with some friends. After a few hours the game would just randomly disconnect.
I have another game running with playit (valheim), it doesn't disconnect so I now the tunnel client is not the issue. I've tried to reserved the port for game and machine as well. I'm hitting a snag 😂