njs: failed to create js VM
Hey, I run into issues regarding the example njs config and nginx build from source (for a container image) and hope for someone to give me a hint what / where I might be missing something.
The error message, on container start:
nginx | 2022/09/07 22:14:55 [emerg] 1#1: failed to create js VM
nginx | nginx: [emerg] failed to create js VM
The build config: Dockerfile The runtime config: njs git test branch commit
The error message shows as soon as js_import http.js; is added into the http block in nginx.conf.
I’ve already looked at #57 and #18 but don’t see how this would apply here.
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (7 by maintainers)
Commits related to this issue
- resolve njs issue https://github.com/nginx/njs/issues/574 — committed to compilenix/docker-nginx by compilenix 2 years ago
Hi @compilenix,
I stripped additional modules, and simplified build script
Dockerfile.574
This way, nginx/njs works as expected (no
failed to create js VM).So, If I were you, I would start adding everything else back by chunks and see the result.
My guess the problem is related to one of the following:
-staticto the linker)--with-ld-opt="-s -static"?)