mvertes / docker-alpine-mongo

MongoDB Dockerfile based on light alpine container
MIT License
189 stars 82 forks source link

MongoDB shell error #2

Closed franz-josef-kaiser closed 8 years ago

franz-josef-kaiser commented 8 years ago

When accessing the container via

docker exec -it mongodb /bin/sh

and executing just mongo or any of the provided cli/shell functions, I get the following error:

/ # mongo --verbose
MongoDB shell version: 3.2.1
too much recursion
2016-02-14T21:49:01.670+0000 D -        [thread1] User Assertion: 139:Failed to initialize JSContext
2016-02-14T21:49:01.690+0000 D -        [main] User Assertion: 139:Failed to initialize JSContext
exception: Failed to initialize JSContext

Update: Above mongo command now with --verbose flag.

After some searching to see if I can find the source of this error, I found the following definition:

Objective-CJSContext is an environment for running JavaScript code. A JSContext instance represents the global object in the environment—if you’ve written JavaScript that runs in a browser, JSContext is analogous to window. Source: NSHipster

Going down the rabbit hole, I looked up what an Assertion is in Objective-C and found that it throws an Exception in case the assertion fails. I'm assuming that the too much recursion error happened first and caused the program to break. As I saw that the first error is actually an Internal Error in the JavaScript core, I now assume that there's some internals broken and not the JSContext not being available in Alpine in this scenario.

Found a similar error in the following repo/issue: gliderlabs/docker-alpine#137 (cross referenced).

mvertes commented 8 years ago

Raised a bug upstream: http://bugs.alpinelinux.org/issues/5117