Questions tagged amazon-ec2

Explore the latest questions and answers asked by our top developers.

connection <monitor> to timed out

I am getting connection time out error description: i am running node js api in docker container and mongodb is running on ec2 instnace with 3 node cluster and attached network load balancer and while running the nodejs api with npm the database is connecting and working fine and while when i ran the same […]

By Vamsi Krishna
Categorised as amazon-ec2, amazon-ecs, docker, mongodb, node.js Tagged , , , ,

boto3 gives error when trying to stop an AWS EC2 instance using Ansible

I am trying to create an ansible playbook to install docker & docker-compose on the host server, stop and start the AWS EC2 instance and then restart docker. Everything goes well until I try to stop the instance, then this happens: TASK [docker_setup : Gather facts] ****************************************************************************************************************************************** [DEPRECATION WARNING]: The ‘ec2_instance_facts’ module has been renamed […]

By josegp
Categorised as amazon-ec2, ansible, docker, playbook, python Tagged , , , ,

Cannot access a docker webapp on EC2 from a web browser

I am running a webapp in a docker container on Amazon EC2, but my web browser doesn’t show anything and it fails to access. Did I forget anything? I would appreciate it if anybody could point out the cause and provide me with the hint. This is how I run a webapp: [email protected]:~$ sudo docker […]

Docker creates a new volume everytime I do docker compose up

I have a docker-compose file that spins up several services. I just got an error stating I ran out of disk space so I typed "docker system df" and saw I have 21 volumes. If I have 3 docker containers with each having a volume attached to them, why its showing me a total count […]

By BitQueen
Categorised as amazon-ec2, amazon-web-services, docker Tagged , ,

AWS EC2 dockerized Nodejs app to listen over ssl (443)

I have a nodejs api dockerized running on an EC2 instance. The app itself is running inside the container on port 5000 and is mapped via docker-compose to 5000:5000. I actually wanted the API to listen on the port I can access via https so I tried mapping the ports in the docker-compose like this […]

By BitQueen
Categorised as amazon-ec2, docker, node.js Tagged , ,

How to connect to existing Docker Machine (Now Deprecated) Using Docker Desktop

I want to connect (ssh) to an existing docker-machine deployed on AWS EC2. Sadly, the docker-machine feature has now been deprecated (in 2022), and the docs point towards using the Docker Desktop. I do have Docker Desktop installed on my macbook (m1 chip). But I don’t know how I can connect to my docker-machine (on […]

Docker Swarm hybrid cloud

I am trying to setup a docker swarm cluster composed of 2 nodes on my local network, and one ec2 node. So two networks. I have opened the following ports on both side: 2377(tcp), 2376 (tcp), 7946(tcp/udp), 4789(udp). Port are opened, I checked with netcat. Master is init from local node with public address advertising, […]

By Pdeuxa
Categorised as amazon-ec2, docker, docker-swarm Tagged , ,

why docker container is exiting instantly but working fine in aws userdata with same cmd

Query A : docker run -p 80:80 –detach=true -v /var/log/container/nginx:/var/log –name=nginx -t image path Query B : docker run -d -p 80:80 –name=nginx -t image path what is difference between this 2 query . why query B is working but not A ? mean when i am running query B nginx container is not exiting […]

By user9083933
Categorised as amazon-ec2, centos, docker, linux, nginx Tagged , , , ,

Two identically configured Elastic Beanstalk environments, log streaming works in one but not the other

I have a node.js application running in docker, deployed to an Elastic Beanstalk cluster via ECS. This application has two environments, call them "stage" and "prod". Both environments are configured to stream (non-custom) instance logs to cloudwatch with identical security policies in place. Log streaming works correctly in one environment ("stage") while the other ("prod") […]

Why can’t SSH to my server from Docker container inside a GitLab public-runner, while I can from my computer using the same exact image?

I’m trying to SSH to an EC2 instance from a Docker container inside GitLab public runner running my CICD ‘deploy’ job. when I spin a Docker container on my machine with the same exact image, I can SSH to my EC2 instance just fine. I have Terraform to start the instance on AWS, I tried […]

By Snake
Categorised as amazon-ec2, amazon-web-services, docker, ssh Tagged , , ,
1 2 3 42

Still Have Questions?

Our dedicated development team is here for you!

We can help you find answers to your question for as low as 5$.

Contact Us