You are not logged in.

#1 2022-10-19 18:28:14

iceberg21
Member
Registered: 2022-10-19
Posts: 1

Cannot start Docker in Arch AWS EC2 instance

Hello, I'm using an AWS EC2 instance of Arch Linux and cannot start the Docker service right now. I first thought the problem was with using EC2, so I tried running docker in another EC2 instance with Ubuntu but Docker worked there. Thus, I think there's some problem with Arch AMI.


"sudo docker info" returns "ERROR: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?"

Therefore, I ran "sudo systemctl start docker.service," and it says that "Job for docker.service failed because the control process exited with error code."


Following is the result of "sudo systemctl status docker.service" :

× docker.service - Docker Application Container Engine
     Loaded: loaded (/usr/lib/systemd/system/docker.service; disabled; preset: disabled)
     Active: failed (Result: exit-code) since Wed 2022-10-19 18:20:58 UTC; 52s ago
TriggeredBy: × docker.socket
       Docs: https://docs.docker.com
    Process: 4323 ExecStart=/usr/bin/dockerd -H fd:// (code=exited, status=1/FAILURE)
   Main PID: 4323 (code=exited, status=1/FAILURE)
        CPU: 141ms

Oct 19 18:20:58 ip-172-31-12-74 systemd[1]: docker.service: Main process exited, code=exited, status=1/FAILURE
Oct 19 18:20:58 ip-172-31-12-74 systemd[1]: docker.service: Failed with result 'exit-code'.
Oct 19 18:20:58 ip-172-31-12-74 systemd[1]: Failed to start Docker Application Container Engine.
Oct 19 18:20:58 ip-172-31-12-74 systemd[1]: docker.service: Scheduled restart job, restart counter is at 3.
Oct 19 18:20:58 ip-172-31-12-74 systemd[1]: Stopped Docker Application Container Engine.
Oct 19 18:20:58 ip-172-31-12-74 systemd[1]: docker.service: Start request repeated too quickly.
Oct 19 18:20:58 ip-172-31-12-74 systemd[1]: docker.service: Failed with result 'exit-code'.
Oct 19 18:20:58 ip-172-31-12-74 systemd[1]: Failed to start Docker Application Container Engine.


Following is the result of "journalctl -u docker.service -b" :

Oct 19 18:20:58 ip-172-31-12-74 dockerd[4323]: failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to create NAT chain DOCKER: iptables failed: iptables -t nat -N DOCKER: iptables v1.8.8 (legacy): can't initialize iptables table `nat': Table does not exist (do you need to insmod?)
Oct 19 18:20:58 ip-172-31-12-74 dockerd[4323]: Perhaps iptables or your kernel needs to be upgraded.
Oct 19 18:20:58 ip-172-31-12-74 dockerd[4323]:  (exit status 3)

Offline

#2 2022-10-19 19:33:13

twelveeighty
Member
Registered: 2011-09-04
Posts: 1,453

Re: Cannot start Docker in Arch AWS EC2 instance

Welcome to Arch. If you've never used Arch before and used some kind of prebuilt AMI you are going to have a hard time with Arch, since everyone here on the forums require you to do the install yourself so you know exactly what was installed and how it was installed/configured. I would argue that if your only goal is to run docker in a Linux distro on AWS, use a different distro. If your goal is to learn Arch, then read our fine Wiki, especially:

https://wiki.archlinux.org/title/Nftabl … ith_Docker

Offline

Board footer

Powered by FluxBB