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

Crash at startup due to "unable to determine boolean value" #177

Open
werdnum opened this issue Jun 27, 2023 · 1 comment
Open

Crash at startup due to "unable to determine boolean value" #177

werdnum opened this issue Jun 27, 2023 · 1 comment

Comments

@werdnum
Copy link

werdnum commented Jun 27, 2023

Running as a Kubernetes pod, has been running normally for quite a long time.

Seemingly a v0.13.1 issue? Seems to work fine on v0.13.0, but crashes on v0.13.1.

Logs:

{"level":"debug","message":"cache opts: {\"store\":\"memory\",\"max\":0,\"ttl\":0}","service":"external-auth-server","timestamp":"2023-06-27T13:04:25.023Z"}
{"date":"Tue Jun 27 2023 13:04:31 GMT+0000 (Coordinated Universal Time)","error":{},"exception":true,"level":"error","message":"uncaughtException: unable to determine boolean value\nError: unable to determine boolean value\n    at Object.toBoolean (/home/eas/app/src/utils.js:151:9)\n    at Object.<anonymous> (/home/eas/app/src/server.js:48:31)\n    at Module._compile (node:internal/modules/cjs/loader:1196:14)\n    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)\n    at Module.load (node:internal/modules/cjs/loader:1074:32)\n    at Function.Module._load (node:internal/modules/cjs/loader:909:12)\n    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)\n    at node:internal/main/run_main_module:22:47","os":{"loadavg":[15.16,14.81,14.55],"uptime":2574515.71},"process":{"argv":["/usr/local/bin/node","/home/eas/app/src/server.js"],"cwd":"/home/eas/app","execPath":"/usr/local/bin/node","gid":1001,"memoryUsage":{"arrayBuffers":290001,"external":2114225,"heapTotal":55889920,"heapUsed":52866616,"rss":96600064},"pid":17,"uid":1001,"version":"v16.20.0"},"service":"external-auth-server","stack":"Error: unable to determine boolean value\n    at Object.toBoolean (/home/eas/app/src/utils.js:151:9)\n    at Object.<anonymous> (/home/eas/app/src/server.js:48:31)\n    at Module._compile (node:internal/modules/cjs/loader:1196:14)\n    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1250:10)\n    at Module.load (node:internal/modules/cjs/loader:1074:32)\n    at Function.Module._load (node:internal/modules/cjs/loader:909:12)\n    at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)\n    at node:internal/main/run_main_module:22:47","timestamp":"2023-06-27T13:04:31.130Z","trace":[{"column":9,"file":"/home/eas/app/src/utils.js","function":"Object.toBoolean","line":151,"method":"toBoolean","native":false},{"column":31,"file":"/home/eas/app/src/server.js","function":null,"line":48,"method":null,"native":false},{"column":14,"file":"node:internal/modules/cjs/loader","function":"Module._compile","line":1196,"method":"_compile","native":false},{"column":10,"file":"node:internal/modules/cjs/loader","function":"Module._extensions..js","line":1250,"method":".js","native":false},{"column":32,"file":"node:internal/modules/cjs/loader","function":"Module.load","line":1074,"method":"load","native":false},{"column":12,"file":"node:internal/modules/cjs/loader","function":"Module._load","line":909,"method":"_load","native":false},{"column":12,"file":"node:internal/modules/run_main","function":"Function.executeUserEntryPoint [as runMain]","line":81,"method":"executeUserEntryPoint [as runMain]","native":false},{"column":47,"file":"node:internal/main/run_main_module","function":null,"line":22,"method":null,"native":false}]}
npm notice
npm notice New major version of npm available! 8.19.4 -> 9.7.2
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.7.2>
npm notice Run `npm install -g npm@9.7.2` to update!
npm notice

Configuration:

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    deployment.kubernetes.io/revision: "54"
    meta.helm.sh/release-name: eas
    meta.helm.sh/release-namespace: external-auth-server
  creationTimestamp: "2021-03-06T02:28:29Z"
  generation: 56
  labels:
    app.kubernetes.io/instance: eas
    app.kubernetes.io/managed-by: Helm
    app.kubernetes.io/name: external-auth-server
    app.kubernetes.io/version: "1.0"
    helm.sh/chart: external-auth-server-0.2.3
  name: eas-external-auth-server
  namespace: external-auth-server
  resourceVersion: "126809143"
  uid: 2d80d027-687b-4678-8b62-41583e4e4618
spec:
  progressDeadlineSeconds: 600
  replicas: 1
  revisionHistoryLimit: 10
  selector:
    matchLabels:
      app.kubernetes.io/instance: eas
      app.kubernetes.io/name: external-auth-server
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      annotations:
        checksum/configmap: 8f5071f7b29d4fa4f3b6d51a8aafade8a1b420dfbe72835f5d02e9a9aad4702b
        checksum/secret: cd87816d3a73859553c490aecce726a7586e75b34e5ef602bb0df205b683fc46
        kubectl.kubernetes.io/restartedAt: "2023-06-27T23:00:26+10:00"
        prometheus.io/port: "8080"
        prometheus.io/scrape: "true"
      creationTimestamp: null
      labels:
        app.kubernetes.io/instance: eas
        app.kubernetes.io/name: external-auth-server
    spec:
      containers:
      - env:
        - name: NODE_ENV
          value: production
        - name: EAS_ALLOW_EVAL
          value: "1"
        - name: EAS_PORT
          value: "8080"
        - name: EAS_GRPC_PORT
          value: "50051"
        - name: EAS_LOG_LEVEL
          value: debug
        - name: EAS_CONFIG_TOKEN_STORES
          valueFrom:
            secretKeyRef:
              key: config-token-stores
              name: eas-external-auth-server
        - name: EAS_CONFIG_TOKEN_SIGN_SECRET
          valueFrom:
            secretKeyRef:
              key: config-token-sign-secret
              name: eas-external-auth-server
        - name: EAS_CONFIG_TOKEN_ENCRYPT_SECRET
          valueFrom:
            secretKeyRef:
              key: config-token-encrypt-secret
              name: eas-external-auth-server
        - name: EAS_ISSUER_SIGN_SECRET
          valueFrom:
            secretKeyRef:
              key: issuer-sign-secret
              name: eas-external-auth-server
        - name: EAS_ISSUER_ENCRYPT_SECRET
          valueFrom:
            secretKeyRef:
              key: issuer-encrypt-secret
              name: eas-external-auth-server
        - name: EAS_COOKIE_SIGN_SECRET
          valueFrom:
            secretKeyRef:
              key: cookie-sign-secret
              name: eas-external-auth-server
        - name: EAS_COOKIE_ENCRYPT_SECRET
          valueFrom:
            secretKeyRef:
              key: cookie-encrypt-secret
              name: eas-external-auth-server
        - name: EAS_SESSION_ENCRYPT_SECRET
          valueFrom:
            secretKeyRef:
              key: session-encrypt-secret
              name: eas-external-auth-server
        image: travisghansen/external-auth-server:v0.13.0
        imagePullPolicy: Always
        livenessProbe:
          failureThreshold: 6
          httpGet:
            path: /ping
            port: http
            scheme: HTTP
          initialDelaySeconds: 120
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        name: external-auth-server
        ports:
        - containerPort: 8080
          name: http
          protocol: TCP
        - containerPort: 50051
          name: grpc
          protocol: TCP
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /ping
            port: http
            scheme: HTTP
          initialDelaySeconds: 60
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 1
        resources:
          limits:
            cpu: 250m
            memory: 256Mi
          requests:
            cpu: 150m
            memory: 128Mi
        terminationMessagePath: /dev/termination-log
        terminationMessagePolicy: File
        volumeMounts:
        - mountPath: /tmp/certs
          name: node-extra-ca-certs
        - mountPath: /etc/config_store
          name: config-store
      dnsPolicy: ClusterFirst
      restartPolicy: Always
      schedulerName: default-scheduler
      securityContext: {}
      terminationGracePeriodSeconds: 30
      volumes:
      - configMap:
          defaultMode: 420
          items:
          - key: node-extra-ca-certs
            path: node-extra-ca-certs.crt
          name: eas-external-auth-server
        name: node-extra-ca-certs
      - configMap:
          defaultMode: 420
          name: eas-config-tokens
        name: config-store
status:
  availableReplicas: 1
  conditions:
  - lastTransitionTime: "2023-06-27T13:04:57Z"
    lastUpdateTime: "2023-06-27T13:04:57Z"
    message: Deployment has minimum availability.
    reason: MinimumReplicasAvailable
    status: "True"
    type: Available
  - lastTransitionTime: "2022-07-05T15:41:54Z"
    lastUpdateTime: "2023-06-27T13:07:12Z"
    message: ReplicaSet "eas-external-auth-server-64f47b7d45" has successfully progressed.
    reason: NewReplicaSetAvailable
    status: "True"
    type: Progressing
  observedGeneration: 56
  readyReplicas: 1
  replicas: 1
  updatedReplicas: 1
@travisghansen
Copy link
Owner

3cfba92

The images are still building but it should fix your issue.

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

2 participants