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

failed to connect RCON console #2508

Closed
Mr-Ao-Dragon opened this issue Nov 24, 2023 · 5 comments
Closed

failed to connect RCON console #2508

Mr-Ao-Dragon opened this issue Nov 24, 2023 · 5 comments

Comments

@Mr-Ao-Dragon
Copy link

Mr-Ao-Dragon commented Nov 24, 2023

Describe the problem

# mraodragon @ localhost in ~/repos/mohist-docker on git:main x [15:17:24] 
$ mcrcon -H 39.105.171.196 -p ***                                                                                                        
Connection failed.
Error 110: Connection timed out

Container definition

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: '13'
    kubectl.kubernetes.io/last-applied-configuration: >
      {"apiVersion":"apps/v1","kind":"Deployment","metadata":{"annotations":{},"creationTimestamp":null,"labels":{"app":"minecraft"},"name":"minecraft","namespace":"default"},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"minecraft"}},"strategy":{},"template":{"metadata":{"creationTimestamp":null,"labels":{"app":"minecraft"}},"spec":{"containers":[{"env":[{"name":"EULA","value":"TRUE"},{"name":"ONLINE_MODE","value":"FALSE"},{"name":"DIFFICULTY","value":"peaceful"},{"name":"PVP","value":"false"},{"name":"UID","value":"0"},{"name":"GID","value":"0"},{"name":"MEMORY","value":"4G"}],"image":"itzg/minecraft-server:java17","name":"minecraft-server","ports":[{"containerPort":25565,"protocol":"TCP"}],"resources":{},"volumeMounts":[{"mountPath":"/data","name":"persistent-storage"}]}],"volumes":[{"name":"persistent-storage","persistentVolumeClaim":{"claimName":"minecraft-pvc"}}]}}}}
  creationTimestamp: '2023-11-23T09:13:45Z'
  generation: 13
  labels:
    app: minecraft
  managedFields:
    - apiVersion: apps/v1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            .: {}
            'f:kubectl.kubernetes.io/last-applied-configuration': {}
          'f:labels':
            .: {}
            'f:app': {}
        'f:spec':
          'f:progressDeadlineSeconds': {}
          'f:replicas': {}
          'f:revisionHistoryLimit': {}
          'f:selector': {}
          'f:strategy':
            'f:rollingUpdate':
              .: {}
              'f:maxSurge': {}
              'f:maxUnavailable': {}
            'f:type': {}
          'f:template':
            'f:metadata':
              'f:labels':
                .: {}
                'f:app': {}
            'f:spec':
              'f:containers':
                'k:{"name":"minecraft-server"}':
                  .: {}
                  'f:env':
                    .: {}
                    'k:{"name":"DIFFICULTY"}':
                      .: {}
                      'f:name': {}
                    'k:{"name":"EULA"}':
                      .: {}
                      'f:name': {}
                      'f:value': {}
                    'k:{"name":"GID"}':
                      .: {}
                      'f:name': {}
                      'f:value': {}
                    'k:{"name":"MEMORY"}':
                      .: {}
                      'f:name': {}
                    'k:{"name":"ONLINE_MODE"}':
                      .: {}
                      'f:name': {}
                    'k:{"name":"PVP"}':
                      .: {}
                      'f:name': {}
                    'k:{"name":"UID"}':
                      .: {}
                      'f:name': {}
                      'f:value': {}
                  'f:imagePullPolicy': {}
                  'f:name': {}
                  'f:ports':
                    .: {}
                    'k:{"containerPort":25565,"protocol":"TCP"}':
                      .: {}
                      'f:containerPort': {}
                      'f:protocol': {}
                  'f:resources': {}
                  'f:terminationMessagePath': {}
                  'f:terminationMessagePolicy': {}
                  'f:volumeMounts':
                    .: {}
                    'k:{"mountPath":"/data"}':
                      .: {}
                      'f:mountPath': {}
              'f:dnsPolicy': {}
              'f:restartPolicy': {}
              'f:schedulerName': {}
              'f:securityContext': {}
              'f:terminationGracePeriodSeconds': {}
              'f:volumes': {}
      manager: kubectl-client-side-apply
      operation: Update
      time: '2023-11-23T09:13:45Z'
    - apiVersion: apps/v1
      fieldsType: FieldsV1
      fieldsV1:
        'f:spec':
          'f:template':
            'f:metadata':
              'f:annotations':
                .: {}
                'f:redeploy-timestamp': {}
            'f:spec':
              'f:containers':
                'k:{"name":"minecraft-server"}':
                  'f:env':
                    'k:{"name":"DIFFICULTY"}':
                      'f:value': {}
                    'k:{"name":"MEMORY"}':
                      'f:value': {}
                    'k:{"name":"ONLINE_MODE"}':
                      'f:value': {}
                    'k:{"name":"PVP"}':
                      'f:value': {}
                    'k:{"name":"RCON_PASSWORD"}':
                      .: {}
                      'f:name': {}
                      'f:value': {}
                    'k:{"name":"aliyun_logs_gamelog"}':
                      .: {}
                      'f:name': {}
                      'f:value': {}
                  'f:image': {}
                  'f:livenessProbe':
                    .: {}
                    'f:failureThreshold': {}
                    'f:initialDelaySeconds': {}
                    'f:periodSeconds': {}
                    'f:successThreshold': {}
                    'f:tcpSocket':
                      .: {}
                      'f:port': {}
                    'f:timeoutSeconds': {}
                  'f:readinessProbe':
                    .: {}
                    'f:failureThreshold': {}
                    'f:initialDelaySeconds': {}
                    'f:periodSeconds': {}
                    'f:successThreshold': {}
                    'f:tcpSocket':
                      .: {}
                      'f:port': {}
                    'f:timeoutSeconds': {}
                  'f:resources':
                    'f:requests':
                      .: {}
                      'f:cpu': {}
                      'f:memory': {}
                  'f:startupProbe':
                    .: {}
                    'f:failureThreshold': {}
                    'f:initialDelaySeconds': {}
                    'f:periodSeconds': {}
                    'f:successThreshold': {}
                    'f:tcpSocket':
                      .: {}
                      'f:port': {}
                    'f:timeoutSeconds': {}
                  'f:volumeMounts':
                    'k:{"mountPath":"/data"}':
                      'f:name': {}
              'f:imagePullSecrets':
                .: {}
                'k:{"name":"beijing-repo"}': {}
              'f:volumes':
                'k:{"name":"volume-1700732033569"}':
                  .: {}
                  'f:name': {}
                  'f:persistentVolumeClaim':
                    .: {}
                    'f:claimName': {}
      manager: ACK-Console Apache-HttpClient
      operation: Update
      time: '2023-11-24T12:55:01Z'
    - apiVersion: apps/v1
      fieldsType: FieldsV1
      fieldsV1:
        'f:metadata':
          'f:annotations':
            'f:deployment.kubernetes.io/revision': {}
        'f:status':
          'f:availableReplicas': {}
          'f:conditions':
            .: {}
            'k:{"type":"Available"}':
              .: {}
              'f:lastTransitionTime': {}
              'f:lastUpdateTime': {}
              'f:message': {}
              'f:reason': {}
              'f:status': {}
              'f:type': {}
            'k:{"type":"Progressing"}':
              .: {}
              'f:lastTransitionTime': {}
              'f:lastUpdateTime': {}
              'f:message': {}
              'f:reason': {}
              'f:status': {}
              'f:type': {}
          'f:observedGeneration': {}
          'f:readyReplicas': {}
          'f:replicas': {}
          'f:updatedReplicas': {}
      manager: kube-controller-manager
      operation: Update
      subresource: status
      time: '2023-11-24T12:57:11Z'
  name: minecraft
  namespace: default
  resourceVersion: '125415805'
  uid: eda0443f-a561-4573-951b-4f512a774225
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app: minecraft
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      annotations:
        redeploy-timestamp: '1700827580635'
      labels:
        app: minecraft
    spec:
      containers:
        - env:
            - name: EULA
              value: 'TRUE'
            - name: ONLINE_MODE
              value: 'TRUE'
            - name: DIFFICULTY
              value: hard
            - name: PVP
              value: 'true'
            - name: UID
              value: '0'
            - name: GID
              value: '0'
            - name: MEMORY
              value: 8G
            - name: RCON_PASSWORD
              value: ******
            - name: aliyun_logs_gamelog
              value: stdout
          image: >-
            registry-vpc.cn-beijing.aliyuncs.com/mydockerlab/minecraft-server:java17
          imagePullPolicy: IfNotPresent
          livenessProbe:
            failureThreshold: 3
            initialDelaySeconds: 15
            periodSeconds: 10
            successThreshold: 1
            tcpSocket:
              port: 25565
            timeoutSeconds: 1
          name: minecraft-server
          ports:
            - containerPort: 25565
              protocol: TCP
          readinessProbe:
            failureThreshold: 3
            initialDelaySeconds: 15
            periodSeconds: 10
            successThreshold: 1
            tcpSocket:
              port: 25565
            timeoutSeconds: 1
          resources:
            requests:
              cpu: '4'
              memory: 8Gi
          startupProbe:
            failureThreshold: 3
            initialDelaySeconds: 15
            periodSeconds: 10
            successThreshold: 1
            tcpSocket:
              port: 25565
            timeoutSeconds: 1
          terminationMessagePath: /dev/termination-log
          terminationMessagePolicy: File
          volumeMounts:
            - mountPath: /data
              name: volume-1700732033569
      dnsPolicy: ClusterFirst
      imagePullSecrets:
        - name: beijing-repo
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
        - name: volume-1700732033569
          persistentVolumeClaim:
            claimName: data.storage
status:
  availableReplicas: 1
  conditions:
    - lastTransitionTime: '2023-11-24T10:16:25Z'
      lastUpdateTime: '2023-11-24T10:16:25Z'
      message: Deployment has minimum availability.
      reason: MinimumReplicasAvailable
      status: 'True'
      type: Available
    - lastTransitionTime: '2023-11-24T12:44:27Z'
      lastUpdateTime: '2023-11-24T12:57:11Z'
      message: ReplicaSet "minecraft-5fc448d4c5" has successfully progressed.
      reason: NewReplicaSetAvailable
      status: 'True'
      type: Progressing
  observedGeneration: 13
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1

Container logs

[init] Running as uid=0 gid=0 with /data as 'drwxrwxrwx 1 0 0 0 Jan  1  1970 /data'
[init] Resolving type given VANILLA
[init] Resolved version given LATEST into 1.20.2
[mc-image-helper] 12:56:38.644 INFO  : Created/updated 1 property in /data/server.properties
[init] Setting initial memory to 8G and max to 8G
[init] Starting the Minecraft server...
Starting net.minecraft.server.Main
[12:57:00] [ServerMain/INFO]: Environment: Environment[accountsHost=https://api.mojang.com, sessionHost=https://sessionserver.mojang.com, servicesHost=https://api.minecraftservices.com, name=PROD]
[12:57:02] [ServerMain/INFO]: Loaded 7 recipes
[12:57:02] [ServerMain/INFO]: Loaded 1271 advancements
[12:57:03] [Server thread/INFO]: Starting minecraft server version 1.20.2
[12:57:03] [Server thread/INFO]: Loading properties
[12:57:03] [Server thread/INFO]: Default game type: SURVIVAL
[12:57:03] [Server thread/INFO]: Generating keypair
[12:57:03] [Server thread/INFO]: Starting Minecraft server on *:25565
[12:57:03] [Server thread/INFO]: Using epoll channel type
[12:57:04] [Server thread/INFO]: Preparing level "world"
[12:57:08] [Server thread/INFO]: Preparing start region for dimension minecraft:overworld
[12:57:12] [Worker-Main-3/INFO]: Preparing spawn area: 0%
[12:57:12] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[12:57:12] [Worker-Main-2/INFO]: Preparing spawn area: 0%
[12:57:12] [Worker-Main-3/INFO]: Preparing spawn area: 0%
[12:57:12] [Worker-Main-3/INFO]: Preparing spawn area: 0%
[12:57:12] [Worker-Main-3/INFO]: Preparing spawn area: 0%
[12:57:13] [Worker-Main-3/INFO]: Preparing spawn area: 0%
[12:57:13] [Worker-Main-3/INFO]: Preparing spawn area: 0%
[12:57:13] [Worker-Main-3/INFO]: Preparing spawn area: 0%
[12:57:13] [Worker-Main-3/INFO]: Preparing spawn area: 0%
[12:57:13] [Worker-Main-3/INFO]: Preparing spawn area: 0%
[12:57:13] [Worker-Main-3/INFO]: Preparing spawn area: 9%
[12:57:14] [Worker-Main-2/INFO]: Preparing spawn area: 37%
[12:57:14] [Worker-Main-1/INFO]: Preparing spawn area: 63%
[12:57:15] [Worker-Main-1/INFO]: Preparing spawn area: 69%
[12:57:15] [Worker-Main-3/INFO]: Preparing spawn area: 84%
[12:57:16] [Worker-Main-2/INFO]: Preparing spawn area: 89%
[12:57:16] [Worker-Main-3/INFO]: Preparing spawn area: 99%
[12:57:17] [Server thread/INFO]: Time elapsed: 8599 ms
[12:57:17] [Server thread/INFO]: Done (12.422s)! For help, type "help"
[12:57:17] [Server thread/INFO]: Starting remote control listener
[12:57:17] [Server thread/INFO]: Thread RCON Listener started
[12:57:17] [Server thread/INFO]: RCON running on 0.0.0.0:25575
[13:01:10] [Server thread/WARN]: handleDisconnection() called twice
[13:33:01] [Server thread/WARN]: handleDisconnection() called twice
[13:36:30] [Server thread/WARN]: handleDisconnection() called twice
@itzg
Copy link
Owner

itzg commented Nov 24, 2023

It doesn't look like you created a service object for RCON's port 25575.

@Mr-Ao-Dragon
Copy link
Author

It doesn't look like you created a service object for RCON's port 25575.

image

@Mr-Ao-Dragon
Copy link
Author

It doesn't look like you created a service object for RCON's port 25575.

image

image

@itzg
Copy link
Owner

itzg commented Nov 25, 2023

In that case, I don't have any other ideas. The container is correct since the log reported:

[Server thread/INFO]: RCON running on 0.0.0.0:25575

@Mr-Ao-Dragon
Copy link
Author

In that case, I don't have any other ideas. The container is correct since the log reported:

[Server thread/INFO]: RCON running on 0.0.0.0:25575

ok,well call alibaba cloud

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

No branches or pull requests

2 participants