Scale up as you grow — whether you're running one virtual machine or ten thousand.

From GPU-powered inference and Kubernetes to managed databases and storage, get everything you need to build, scale, and deploy intelligent applications.

I am starting up MongoDB in a docker container running in an AWS EC2 instance. By company policy, the instance cannot connect to the internet, so I have created a custom Amazon Machine Image that has docker and two images of mongo (3.4 and latest as of the second-to-last week of October 2020). Docker seems to be installed and working fine when I bring up a new EC2 instance, but whenever I run
docker run -d -p 27017:27017 -v bigid-mongo-data:/data/db --name bigid-mongo mongo:3.4
I get the following line in the log
2020-11-02T16:14:55.138+0000 E NETWORK [initandlisten] listen(): bind() failed Permission denied for socket: /tmp/mongodb-27017.sock 2020-11-02T16:14:55.138+0000 E NETWORK [initandlisten] Failed to set up sockets during startup. 2020-11-02T16:14:55.138+0000 E STORAGE [initandlisten] Failed to set up listener: InternalError: Failed to set up sockets
which is followed by exit code 48.
Similarly, when I run
docker run -d -p 27017:27017 -v bigid-mongo-data:/data/db --name bigid-mongo mongo
to use the latest image, I see
{“t”:{“$date”:“2020-11-02T16:43:19.058+00:00”},“s”:“E”, “c”:“STORAGE”, “id”:20568, “ctx”:“initandlisten”,“msg”:“Error setting up listener”,“attr”:{“error”:{“code”:9001,“codeName”:“SocketException”,“errmsg”:“Permission denied”}}}
instead.
Docker works when I use the hello-world image that I pulled and I have already tried changing the permissions of /tmp using
chmod 1777 /tmp
so I am not sure what further steps to take to resolve this issue.
lwmeozrcbh
d1dd3d9538cc4d06b53e6d1d338d3f
50ff4e4b3c6c4999a12403b1ecda95
a6309a057c3f4cb38fb2e7feb67236
72e571841e7f4a6881090a2f3e93c0
7ce6bf277bff4d429ba493dd750e35
57a72a98162f46a5a5cd04d9b
Thomas Brocken
11575c6d695643cdb40ad47d0f1aea
tez.saad