-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Server crashes on node:alpine images #4654
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
Comments
Parse server uses bcrypt, which includes native extensions. Incorrectly-built native extensions are often cause segfaults in NodeJS. Did your docker build run |
Apologies... I missed the part where you said you were using the Dockerfile from parse server. It's probably a similar issue though. From what I've been told, Alpine uses a completely different set of C standard libraries than your typical linux installation. It's part of how they get the image so small. There's probably some incompatibility between the native extensions in libraries like bcrypt and the alpine distribution. Would be helpful to know which module caused the crash... I'm not close enough to Parse to recognize anything in the error output. |
One last thing... do you think you could put the log output in a fenced code block please? It would preserve the spacing and make it easier to read. Fenced codeblocks start and end with three backticks, like this:
|
Yes I run Now I have tried copying local node_module, and it works fine. Sorry about the logs, here is formatted
|
For me it was the bcrypt error. Just resorted to If you have a pressing need to use Alpine, let me know and I will investigate. |
As @nbering mentions, if you want to use node alpine, you’ll need to change the dockerfile so it runs ‘npm install’ and therefore installs all the dependencies for the right architecture. Also, this is an issue with parse-server-example which is not the recommended way to get started. |
Issue Description
Parse server is crashing on Login and Sign up requests for
node:9-alpine
or any otheralpine
images. It works fine onnode:9
or any other node images.Steps to reproduce
FROM node:latest
toFROM node:9-alpine
Expected Results
Should create new user
Actual Outcome
The server will crash with following trace
Segmentation fault npm ERR! code ELIFECYCLE npm ERR! errno 139 npm ERR! [email protected] start:
node index.jsnpm ERR! Exit status 139 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. 2018-03-16T11:00:21.637131130Z npm ERR! A complete log of this run can be found in:
Environment Setup
Server
Database
Logs/Trace
Log output
1 verbose cli [ '/usr/local/bin/node', '/usr/local/bin/npm', 'start' ] 2 info using [email protected] 3 info using [email protected] 4 verbose run-script [ 'prestart', 'start', 'poststart' ] 5 info lifecycle [email protected]~prestart: [email protected] 6 info lifecycle [email protected]~start: [email protected] 7 verbose lifecycle [email protected]~start: unsafe-perm in lifecycle true 8 verbose lifecycle [email protected]~start: PATH: /usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/node-gyp-bin:/parse/node_m 9 verbose lifecycle [email protected]~start: CWD: /parse 10 silly lifecycle [email protected]~start: Args: [ '-c', 'node index.js' ] 11 silly lifecycle [email protected]~start: Returned: code: 139 signal: null 12 info lifecycle [email protected]~start: Failed to exec start script 13 verbose stack Error: [email protected] start:
node index.js13 verbose stack Exit status 139 13 verbose stack at EventEmitter.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/index.js:285:16) 13 verbose stack at EventEmitter.emit (events.js:127:13) 13 verbose stack at ChildProcess.<anonymous> (/usr/local/lib/node_modules/npm/node_modules/npm-lifecycle/lib/spawn.js:55:14) 13 verbose stack at ChildProcess.emit (events.js:127:13) 13 verbose stack at maybeClose (internal/child_process.js:936:16) 13 verbose stack at Process.ChildProcess._handle.onexit (internal/child_process.js:220:5) 14 verbose pkgid [email protected] 15 verbose cwd /parse 16 verbose Linux 4.9.60-linuxkit-aufs 17 verbose argv "/usr/local/bin/node" "/usr/local/bin/npm" "start" 18 verbose node v9.7.1 19 verbose npm v5.6.0 20 error code ELIFECYCLE 21 error errno 139 22 error [email protected] start:
node index.js22 error Exit status 139 23 error Failed at the [email protected] start script. 23 error This is probably not a problem with npm. There is likely additional logging output above. 24 verbose exit [ 139, true ]
The text was updated successfully, but these errors were encountered: