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

[BUG] Flame crashes after updating to version 2.1.1 while running on k3s. #242

Closed
jojotastic777 opened this issue Dec 3, 2021 · 9 comments · Fixed by #248 or #262
Closed

[BUG] Flame crashes after updating to version 2.1.1 while running on k3s. #242

jojotastic777 opened this issue Dec 3, 2021 · 9 comments · Fixed by #248 or #262
Labels
🐞 Bug Something isn't working

Comments

@jojotastic777
Copy link

Deployment details:

  • App version [e.g. v1.7.4]: v2.1.1
  • Platform [e.g. amd64, arm64, arm/v7]: arm64, amd64
  • Docker image tag [e.g. latest, multiarch]: multiarch2.1.1

Bug description:

After updating to version 2.1.1, my previously-working flame installation has started crashing with the following error:

node:internal/fs/utils:344
    throw err;
    ^

Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (node:fs:723:3)
    at tryReadSync (node:fs:433:20)
    at Object.readFileSync (node:fs:479:19)
    at /app/node_modules/docker-secret/dist/index.js:17:39
    at Array.forEach (<anonymous>)
    at getSecrets (/app/node_modules/docker-secret/dist/index.js:14:15)
    at Object.<anonymous> (/app/node_modules/docker-secret/dist/index.js:28:19)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/app/utils/init/initDockerSecrets.js:1:24)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) {
  errno: -21,
  syscall: 'read',
  code: 'EISDIR'
}

Steps to reproduce:

  1. Start with a base k3s installation.
  2. Deploy the following resource to the cluster:
apiVersion: apps/v1
kind: Deployment
metadata:
  name: flame
spec:
  selector:
    matchLabels:
      app: flame
  template:
    metadata:
      labels:
        app: flame
    spec:
      volumes:
        - name: flame-volume
          emptyDir: {}
      containers:
      - name: flame
        image: pawelmalak/flame:multiarch2.1.1
        ports:
        - containerPort: 5005
        volumeMounts:
        - mountPath: /app/data
          name: flame-volume
        env:
        - name: PASSWORD
          value: flame_password
  1. Watch the logs of the newly-deployed pod.
@pawelmalak
Copy link
Owner

I can't test it right now but can you pull pawelmalak/flame:dev and check if anything has changed?

@jojotastic777
Copy link
Author

No apparent change, it seems like:

node:internal/fs/utils:344
    throw err;
    ^

Error: EISDIR: illegal operation on a directory, read
    at Object.readSync (node:fs:723:3)
    at tryReadSync (node:fs:433:20)
    at Object.readFileSync (node:fs:479:19)
    at /app/node_modules/docker-secret/dist/index.js:17:39
    at Array.forEach (<anonymous>)
    at getSecrets (/app/node_modules/docker-secret/dist/index.js:14:15)
    at Object.<anonymous> (/app/node_modules/docker-secret/dist/index.js:28:19)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19)
    at require (node:internal/modules/cjs/helpers:102:18)
    at Object.<anonymous> (/app/utils/init/initDockerSecrets.js:1:24)
    at Module._compile (node:internal/modules/cjs/loader:1101:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10) {
  errno: -21,
  syscall: 'read',
  code: 'EISDIR'
}

@c0depool
Copy link

c0depool commented Dec 4, 2021

Getting the same error on microk8s as well. Was working fine on v2.1.0.

@kooskaspers
Copy link

Same problem here.
Back to 2.1.0.

@Seanland
Copy link

Seanland commented Dec 4, 2021

Getting the exact same error here. If it helps, these are my environment details:

App version [e.g. v1.7.4]: 2.1.1
Platform [e.g. amd64, arm64, arm/v7]: amd64
Docker image tag [e.g. latest, multiarch]: latest

I am running mine on a bare-metal k8s cluster using kubeadm

@IDevJoe
Copy link
Contributor

IDevJoe commented Dec 6, 2021

App version [e.g. v1.7.4]: 2.1.1
Platform [e.g. amd64, arm64, arm/v7]: arm64
Docker image tag [e.g. latest, multiarch]: multiarch

Same issue.

Edit: Seems to be a problem within the docker-secret module. I'm gonna see if I can come up with a fix

IDevJoe pushed a commit to IDevJoe/flame that referenced this issue Dec 6, 2021
This commit fixes pawelmalak#242 by catching the error thrown by getSecrets(). The underlying issue exists in docker-secret and has to do with the serviceAccount secret installed automatically by kubernetes.
@IDevJoe
Copy link
Contributor

IDevJoe commented Dec 6, 2021

You (theoretically) should be able to work around this issue by disabling the service account token like so:

kind: Pod
metadata:
  name: my-pod
spec:
  automountServiceAccountToken: false
  ...

@Seanland
Copy link

Seanland commented Dec 6, 2021

@IDevJoe Your theory worked (at least for me). Thanks for the workaround.

@odinsride
Copy link

odinsride commented Dec 12, 2021

Just want to mention I am encountering this error as well, but on openSUSE Leap Server, using a docker-compose .env file:

Docker version 20.10.9-ce, build 79ea9d308018
docker-compose version 1.25.1, build a82fef0
  flame:
    image: pawelmalak/flame:latest
    container_name: flame
    volumes:
      - ${APPDATA_BASE}/flame:/app/data
      - /var/run/docker.sock:/var/run/docker.sock
    ports:
      - "5005:5005"
    restart: unless-stopped

Downgrading to 2.1.0 tag fixes the issue

@pawelmalak pawelmalak linked a pull request Dec 17, 2021 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐞 Bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants