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

Bedrock version is constantly disconnected #55

Open
marcusjwhelan opened this issue May 14, 2020 · 10 comments
Open

Bedrock version is constantly disconnected #55

marcusjwhelan opened this issue May 14, 2020 · 10 comments

Comments

@marcusjwhelan
Copy link

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

@marcusjwhelan
Copy link
Author

It seems like IPV6 needs to be there. How do i do that?

@marcusjwhelan
Copy link
Author

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

@itzg
Copy link
Owner

itzg commented May 15, 2020

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 itzg added the status/waiting on feedback Waiting on feedback from author of issue label May 15, 2020
@marcusjwhelan
Copy link
Author

@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?

@no-response no-response bot removed the status/waiting on feedback Waiting on feedback from author of issue label May 15, 2020
@marcusjwhelan
Copy link
Author

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.

@itzg
Copy link
Owner

itzg commented May 17, 2020

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.

@marcusjwhelan
Copy link
Author

@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.

@itzg
Copy link
Owner

itzg commented May 23, 2020

Sorry, I lost track of your reply in my other emails. Confusingly enough, the LAN games show up in the "Friends" tab:

image

@mwillfox
Copy link

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.

@arosado2895
Copy link

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 😂

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

No branches or pull requests

4 participants