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

Error on running docker exec -it catalog-mongo /bin/bash #9

Closed
jainashish1711 opened this issue Jan 28, 2021 · 5 comments
Closed

Error on running docker exec -it catalog-mongo /bin/bash #9

jainashish1711 opened this issue Jan 28, 2021 · 5 comments

Comments

@jainashish1711
Copy link

jainashish1711 commented Jan 28, 2021

@mehmetozkaya
I am able to successfully install container for mongo DB and but executing command for mongo DB throws below error.

C:\Users\ashishjain4>docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
039ab1536008 mongo "mongod --bind_ip_all" 39 seconds ago Up 36 seconds 0.0.0.0:27017->27017/tcp catalog-mongo

C:\Users\ashishjain4>docker exec -it catalog-mongo /bin/bash

container bce995a3638f836b3ddf864e0bf002c658f5c3901264a444f8b89b0fd6e80f16 encountered an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system cannot find the file specified. (0x2)
[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF6F18F9D2B: (caller: 00007FF6F18AE13A) Exception(9) tid(3f4) 80070002 The system cannot find the file specified.
CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess]
Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandLine":"/bin/bash","WorkingDirectory":"/","Environment":{"MONGO_DOWNLOAD_SHA256":"d811282527bbdc3266244209ad0971c0d375dbb209bb8eb4ae66ba576b19e9f6","MONGO_DOWNLOAD_URL":"https://fastdl.mongodb.org/windows/mongodb-windows-x86_64-4.4.3-signed.msi","MONGO_VERSION":"4.4.3"},"EmulateConsole":true,"CreateStdInPipe":true,"CreateStdOutPipe":true,"ConsoleSize":[0,0]}

image

@mehmetozkaya
Copy link
Member

Actually it was worked for me but not sure that why its happened. When I checked the official image;
https://hub.docker.com/_/mongo

I saw that below part, so could you try with only bash instead of bin/bash

Container shell access and viewing MongoDB logs
The docker exec command allows you to run commands inside a Docker container. The following command line will give you a bash shell inside your mongo container:

$ docker exec -it some-mongo bash

@jainashish1711
Copy link
Author

Still having same issue. Please find screenshot below.
I am stuck here now.

image
@mehmetozkaya

@mehmetozkaya
Copy link
Member

I also don't know why it is giving this error but if you can try with fresh test with delete and re-create mongo image and try. If nothing change then it could be network problem that you can't insert your docker image from your computer.

@jainashish1711
Copy link
Author

jainashish1711 commented Jan 29, 2021

Thanks for the response. I tried all . may be its with mongo DB something . I will try this out with Sql instead of mongo and creating Catalog DB over there.
Although when i replace exec with run i get some different. if you make out of it something. or is it might be due to bin path is not located
image

thanks for your support
@mehmetozkaya

@madhu23rima
Copy link

madhu23rima commented Sep 11, 2022

I ran into the same issue. We need to use mongosh instead of mongo

Found solution here
https://stackoverflow.com/questions/73582703/mongo-command-not-found-on-mongodb-6-0-docker-container

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

3 participants