Mongo server failed while running yarn test showing memory resources error in docker
I got the answer. I was using a alpine version of docker. I shifted to the bitnami version after pulling and running of bitnami/mongo:latest
Related
I have been using this MUP config for the deployment until recently. When I encountered an issue and I had to stop, reboot the Instance multiple times.
Then, This causes the meteor app container to shut down and the MongoDB container is running just fine but wasn't accessible through an SSH tunnel on a MongoDB GUI (but running systemctl status mongo shows active status: activating.
I troubleshoot and run docker ps -a. It shows the MongoDB container only as a running container and the meteor app container completely shutdown.
I tried running the MUP deployment in an attempt to get the meteor app container up and running.
However, I got an error Removing docker containers. Errors about nonexistent endpoints and containers are normal.
I run the mup setup command successfully and then I tried running mup reconfig and I got the same above error, I have attached the screenshot of the error below.
To Reproduce this error
Create a meteor app with Iron-meteor.
Setup an Instance (Ec2).
Setup Deployment with Meteor-up
Deploy your app with Meteor-up.
SSH into the instance and run cmd docker ps. Should see at least two running containers, app and mongo respectively.
Run a cmd to stop the app container while the mongo container is running.
Finally, Goto your project and redeployed with mup
Should see a similar error as above. for step 6 restarting the instance in my case shut down the two containers and I was able to get the mongo container back up and running.
However, I couldn't get the app container running, so I tried redeploying with the expectation that a new app container would be created if it doesn't exist on the instance.
UPDATED!
I don't know if this will help, but in my experience, mup likes a fresh instance better than an existing one.
My first step would be a mup stop command. This will shut down the docker instances. Then you can remove them with docker rm, and you can remove the images with docker rmi. Then do a mup setup again, followed by a mup deploy.
If the first one doesn't work, you can basically start with a fresh vm, as in the droplet or ec2 instance. This is generally quite successful.
We are running MongoDB as docker container and all of sudden it become unresponsive. We had tried to restart container but it didnt. The docker restart command was success but if we check the service it didnt restarted. We are not able to connect to DB from our Mongo client too.
After full VM restart the problem got solved. I would like to know if anyone has faced this issue and got any solution for it.
Here is the details my docker:
Docker version 19.03.12
Mongo 4.0
I am using latest MongoDB docker image in Ubuntu Host. Ubuntu version 20.04.
I am using the following command to start the container -
docker run --name local_mongo -d -p 27017:27017 mongo
Whenever I am trying to connect to Mongo Server I am getting the following error..
Any pointer will be helpful...
It is not the right answer but after spending some odd 11 hours found the following solution -
Downgraded the host OS from Ubuntu 20.04 to Ubuntu 18.04.4 LTS.
As per my limited knowledge working inside docker container should not get impacted even though the HOST OS are different. But at the same time I feel HOST to Container communication has changed in Ubuntu 20.04.
Because when I tried connecting MS SQL Server also in Ubuntu 20.04 as HOST my previous setup stopped working as it was working with Ubuntu 18.04.
So can't really comment whether it is a docker daemon issue or container issue. But something has changed.
Please keep posting your findings so that we can have a working solution in Ubuntu 20.04 as HOST.
I'm having docker container up and running by using the following command:
docker run -p 27017:27017 -d mongo
Docker Logs for reference.
Then I clone a github repo: https://github.com/springframeworkguru/spring-boot-mongodb.git
Import the project in IntelliJ IDE, build it and run.
SpringBoot App Error Logs here
Issue : I'm not able to connect to the mongo app running in the container from my SpringBoot application as I'm getting MongoSocketOpenException as shown in the logs.
Any help is appreciated?
Docker version 18.03.0-ce, build 0520e24302
OS: Windows 10
Docker for win has some problems with loopback interfaces.
https://blog.sixeyed.com/published-ports-on-windows-containers-dont-do-loopback/
Try run docker inspect and configure your application with the container address.
Problem: I was trying to configure SpringBoot Application to mongo container IP which I retrieved from mongo inspect <mongo_container> command which was incorrect.
Solution: Configured my application using docker IP retrieved by docker-machine <env> which resolved the problem.
Link to the post is here.
I'm using Minikube on Windows based machine. On the same machine, I also have docker-machine setup.
I've pointed docker client towards minikube’s docker environment. This way, can see Docker environment inside Kubernetes.
Without issues, I can build docker images & run docker containers from Minikube VM. However, when I try to start any docker container via kubectl(from PowerShell), its failing to start primarily as if kubectl can't find docker image due to following error -
Failed to pull image "image name": rpc error: code = Unknown desc =
Error response from daemon: repository "image-repo-name" not found:
does not exist or no pull access Error syncing pod
I don't know what's missing. If "docker run" can access the image why "kubectl" can not do?
Here my Dockerfile:
FROM node:4.4
EXPOSE 9002
COPY server.js .
CMD node server.js
Make sure your image path in your yaml is correct. That image should exist on your local machine. It should be named with a number not "latest"
Have this in your deployment yaml:
image: redis:1.0.48
run "> docker images" to see the list of images on your machine.