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

container won't start: Error: spawnSync /bin/sh EACCES #2

Open
marlon0 opened this issue Apr 5, 2023 · 6 comments
Open

container won't start: Error: spawnSync /bin/sh EACCES #2

marlon0 opened this issue Apr 5, 2023 · 6 comments

Comments

@marlon0
Copy link

marlon0 commented Apr 5, 2023

On running the docker container using the provided example settings:

mkdir -p /tmp/grist-test
docker run \
  -p 80:80 -p 443:443 \
  -e URL=https://cool-beans.example.com \
  -e HTTPS=auto \
  -e TEAM=cool-beans \
  -e EMAIL=owner@example.com \
  -e PASSWORD=topsecret \
  -v /tmp/grist-test:/persist \
  --name grist --rm \
  -it gristlabs/grist-omnibus  # or grist-ee-omnibus for enterprise

The following error is thrown, and the process dies:

<ref *1> Error: spawnSync /bin/sh EACCES
    at Object.spawnSync (internal/child_process.js:1107:20)
    at spawnSync (child_process.js:776:24)
    at Object.execSync (child_process.js:858:15)
    at invent (/grist/run.js:228:31)
    at prepareMainSettings (/grist/run.js:165:40)
    at main (/grist/run.js:18:3)
    at Object.<anonymous> (/grist/run.js:45:1)
    at Module._compile (internal/modules/cjs/loader.js:1114:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
    at Module.load (internal/modules/cjs/loader.js:979:32) {
  errno: -13,
  code: 'EACCES',
  syscall: 'spawnSync /bin/sh',
  path: '/bin/sh',
  spawnargs: [ '-c', 'pwgen -s 20' ],
  error: [Circular *1],
  status: null,
  signal: null,
  output: null,
  pid: 0,
  stdout: null,
  stderr: null
}

It seems this is related to running the command pwgen -s 20 to generate random values for variables.

@paulfitz
Copy link
Member

paulfitz commented Apr 5, 2023

That's odd, thanks for reporting. Not able to replicate yet. What architecture is the container running on?

@marlon0
Copy link
Author

marlon0 commented Apr 6, 2023

Thanks for looking at it. This is on a fresh lxc VPS running:

Operating System: Debian GNU/Linux 11 (bullseye)
Kernel: Linux 5.15.0-56-generic
Architecture: x86-64
Docker version 23.0.3, build 3e7cbfd

@marlon0
Copy link
Author

marlon0 commented Apr 6, 2023

Interestingly, the bug does not surface on a comparable VPS running
Ubuntu 22.04.1 LTS
with the same kernel and docker version.

@paulfitz
Copy link
Member

paulfitz commented Apr 6, 2023

If I had to guess, it is some weirdness related to the storage driver in use by docker (default of overlay2 is apparently not available under lxc?)
If so, squashing the image might work.

@paulfitz
Copy link
Member

paulfitz commented Apr 6, 2023

@marlon0 I pushed a squashed version of the gristlabs/grist image, if you get a chance to re-pull it I'd be interested in whether it changes anything.

paulfitz added a commit that referenced this issue Apr 18, 2023
I think I broke the omnibus when I flattened the image for
#2
since it lost some path information. Not sure why I didn't
catch this in testing.
@paulfitz
Copy link
Member

Update: I had to undo the squashing, it was causing other problems.

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