Skip to content

0 I am getting error while deploying epic game (pixel streaming app) on AWS eks. When I applied the matchmaker.ymal file I checked that my matchmaker pod was not running. The current state of the matchmaker pod is in back loop crash-off. How to solve the issue. Getting this error- #24

@meghrajpawar1232

Description

@meghrajpawar1232

kubectl logs matchmaker-68c69f56b8-sc9jm -n ue4
Defaulted container "matchmaker" out of: matchmaker, copy (init)
/app/matchmaker.js:21
var configFile = (typeof argv.configFile != 'undefined') ? argv.configFile.toString() : path.join(__dirname, 'config.json');
^

ReferenceError: Cannot access 'path' before initialization
at Object. (/app/matchmaker.js:21:89)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
at Module.load (internal/modules/cjs/loader.js:950:32)
at Function.Module._load (internal/modules/cjs/loader.js:790:12)
at Module.require (internal/modules/cjs/loader.js:974:19)
at require (internal/modules/cjs/helpers.js:101:18)
at Object. (/app/wrapper.js:219:40)
at Module._compile (internal/modules/cjs/loader.js:1085:14)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)


Here my matchmaker.yaml file-

apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app.kubernetes.io/component: unrealengine
    app.kubernetes.io/part-of: ue4-on-eks
    app.kubernetes.io/version: 0.0.1
    app: matchmaker
  name: matchmaker
  namespace: ue4
spec:
  replicas: 1
  selector:
    matchLabels:
      app: matchmaker
      app.kubernetes.io/component: unrealengine
      app.kubernetes.io/part-of: ue4-on-eks
      app.kubernetes.io/version: 0.0.1
      app: matchmaker
  template:
    metadata:
      annotations:
        sidecar.istio.io/rewriteAppHTTPProbers: "true"
      labels:
        app: matchmaker
        app.kubernetes.io/component: unrealengine
        app.kubernetes.io/part-of: ue4-on-eks
        app.kubernetes.io/version: 0.0.1
    spec:
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
            - matchExpressions:
              - key: app.pixel/turn
                operator: In
                values:
                - "true"
      containers:
      - args:
        - --HttpPort=3000
        - --httpPort=3000
        - --MatchmakerPort=9999
        - --matchmakerPort=9999
        env:
        - name: STREAM_SERVICE_NAME
          value: stream-discovery
        - name: NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        envFrom:
        - configMapRef:
            name: pixel-app-configs         
        image: public.ecr.aws/i0s2o7q7/megaverse-eks-matchmaker:18
        imagePullPolicy: Always
      #  livenessProbe:
       #   httpGet:
        #    path: /
         #   port: http
        name: matchmaker
        ports:
        - containerPort: 3000
          name: http
        - containerPort: 9999
          name: socket
        - containerPort: 9000
          name: metrics
          protocol: TCP
       # readinessProbe:
        #  httpGet:
         #   path: /
          #  port: http
        resources:
          limits:
            cpu: 200m
            memory: 200Mi
          requests:
            cpu: 100m
            memory: 100Mi
        securityContext:
          capabilities:
            add:
            - NET_BIND_SERVICE
            drop:
            - all
          readOnlyRootFilesystem: true
          runAsNonRoot: true
          runAsUser: 10001
        volumeMounts:
        - mountPath: /config
          name: config
        - mountPath: /pixelconfig
          name: pixelconfig
      initContainers:
      - name: copy
        image: busybox
#        command: ["bash", "-c", "cp config/* /pixelconfig/"]
        envFrom:
        - configMapRef:
            name: pixel-app-configs        
        volumeMounts:
        - mountPath: /config
          name: config
        - mountPath: /pixelconfig
          name: pixelconfig        
      volumes:
      - configMap:
          name: pixel-app-configs
        name: config
      - name: pixelconfig
        emptyDir: {}
---
apiVersion: v1
kind: Service
metadata:
  annotations:
    prometheus.io/port: "9000"
    prometheus.io/scrape: "true"
  labels:
    app: matchmaker
    app.kubernetes.io/component: unrealengine
    app.kubernetes.io/part-of: ue4-on-eks
    app.kubernetes.io/version: 0.0.1
  name: matchmaker
  namespace: ue4
spec:
  ports:
  - name: http
    port: 3000
    targetPort: 3000
  - name: socket
    port: 9999
    targetPort: 9999
  - name: metrics
    port: 9000
    targetPort: 9000
  selector:
    app: matchmaker
  sessionAffinity: ClientIP
  sessionAffinityConfig:
    clientIP:
      timeoutSeconds: 10
  type: ClusterIP
---
apiVersion: v1
kind: ConfigMap
metadata:
  labels:
    app.kubernetes.io/component: unrealengine
    app.kubernetes.io/part-of: ue4-on-eks
    app.kubernetes.io/version: 0.0.1
  name: pixel-app-configs
  namespace: ue4
data:
  cirrus.json: "{\n\t\"UseFrontend\": false,\n\t\"UseMatchmaker\": false,\n\t\"UseHTTPS\":
    false,\n\t\"UseAuthentication\": false,\n\t\"LogToFile\": false,\n\t\"EnableWebserver\":
    false,\n\t\"HomepageFile\": null,\n\t\"HttpPort\": 3000,\n\t\"StreamerPort\":
    8888\n}"
  matchmaker.json: "{\n\t\"HttpPort\": 3000,\n\t\"UseHTTPS\": false,\n\t\"MatchmakerPort\":
    9999,\n\t\"LogToFile\": false,\n  \"enableRedirectionLinks\": false,\n  \"enableRESTAPI\":
    true\n}"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions