madhuakula / hacker-container

The Swiss Army Container for Cloud Native Security. Container with all the list of useful tools/commands while hacking and securing Containers, Kubernetes Clusters, and Cloud Native workloads.
MIT License
253 stars 63 forks source link

dockerd is not getting started and erroring out on iptables legacy issue #5

Open santikris2003 opened 2 years ago

santikris2003 commented 2 years ago

dockerd

INFO[2021-09-27T10:31:59.154233728Z] Starting up
INFO[2021-09-27T10:31:59.155458114Z] libcontainerd: started new containerd process pid=301 INFO[2021-09-27T10:31:59.155510290Z] parsed scheme: "unix" module=grpc INFO[2021-09-27T10:31:59.155527513Z] scheme "unix" not registered, fallback to default scheme module=grpc INFO[2021-09-27T10:31:59.155551030Z] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 }] } module=grpc INFO[2021-09-27T10:31:59.155570358Z] ClientConn switching balancer to "pick_first" module=grpc INFO[2021-09-27T10:31:59.170060879Z] starting containerd revision=7ad184331fa3e55e52b890ea95e65ba581ae3429 version=v1.2.13 ERRO[2021-09-27T10:31:59.170130972Z] failed to change OOM score to -500 error="write /proc/301/oom_score_adj: permission denied" INFO[2021-09-27T10:31:59.170345114Z] loading plugin "io.containerd.content.v1.content"... type=io.containerd.content.v1 INFO[2021-09-27T10:31:59.170376282Z] loading plugin "io.containerd.snapshotter.v1.btrfs"... type=io.containerd.snapshotter.v1 WARN[2021-09-27T10:31:59.170638172Z] failed to load plugin io.containerd.snapshotter.v1.btrfs error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" INFO[2021-09-27T10:31:59.170689862Z] loading plugin "io.containerd.snapshotter.v1.aufs"... type=io.containerd.snapshotter.v1 WARN[2021-09-27T10:31:59.171331974Z] failed to load plugin io.containerd.snapshotter.v1.aufs error="modprobe aufs failed: "modprobe: can't change directory to '/lib/modules': No such file or directory\n": exit status 1" INFO[2021-09-27T10:31:59.171351431Z] loading plugin "io.containerd.snapshotter.v1.native"... type=io.containerd.snapshotter.v1 INFO[2021-09-27T10:31:59.171384552Z] loading plugin "io.containerd.snapshotter.v1.overlayfs"... type=io.containerd.snapshotter.v1 INFO[2021-09-27T10:31:59.171482278Z] loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1 INFO[2021-09-27T10:31:59.171726810Z] skip loading plugin "io.containerd.snapshotter.v1.zfs"... type=io.containerd.snapshotter.v1 INFO[2021-09-27T10:31:59.171764853Z] loading plugin "io.containerd.metadata.v1.bolt"... type=io.containerd.metadata.v1 WARN[2021-09-27T10:31:59.171793393Z] could not use snapshotter zfs in metadata plugin error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.zfs must be a zfs filesystem to be used with the zfs snapshotter: skip plugin" WARN[2021-09-27T10:31:59.171808584Z] could not use snapshotter btrfs in metadata plugin error="path /var/lib/docker/containerd/daemon/io.containerd.snapshotter.v1.btrfs must be a btrfs filesystem to be used with the btrfs snapshotter" WARN[2021-09-27T10:31:59.171822426Z] could not use snapshotter aufs in metadata plugin error="modprobe aufs failed: "modprobe: can't change directory to '/lib/modules': No such file or directory\n": exit status 1" INFO[2021-09-27T10:31:59.171920513Z] loading plugin "io.containerd.differ.v1.walking"... type=io.containerd.differ.v1 INFO[2021-09-27T10:31:59.171950507Z] loading plugin "io.containerd.gc.v1.scheduler"... type=io.containerd.gc.v1 INFO[2021-09-27T10:31:59.172004751Z] loading plugin "io.containerd.service.v1.containers-service"... type=io.containerd.service.v1 INFO[2021-09-27T10:31:59.172032848Z] loading plugin "io.containerd.service.v1.content-service"... type=io.containerd.service.v1 INFO[2021-09-27T10:31:59.172061335Z] loading plugin "io.containerd.service.v1.diff-service"... type=io.containerd.service.v1 INFO[2021-09-27T10:31:59.172078703Z] loading plugin "io.containerd.service.v1.images-service"... type=io.containerd.service.v1 INFO[2021-09-27T10:31:59.172114061Z] loading plugin "io.containerd.service.v1.leases-service"... type=io.containerd.service.v1 INFO[2021-09-27T10:31:59.172133283Z] loading plugin "io.containerd.service.v1.namespaces-service"... type=io.containerd.service.v1 INFO[2021-09-27T10:31:59.172149746Z] loading plugin "io.containerd.service.v1.snapshots-service"... type=io.containerd.service.v1 INFO[2021-09-27T10:31:59.172165105Z] loading plugin "io.containerd.runtime.v1.linux"... type=io.containerd.runtime.v1 INFO[2021-09-27T10:31:59.172246963Z] loading plugin "io.containerd.runtime.v2.task"... type=io.containerd.runtime.v2 INFO[2021-09-27T10:31:59.172316621Z] loading plugin "io.containerd.monitor.v1.cgroups"... type=io.containerd.monitor.v1 INFO[2021-09-27T10:31:59.172830133Z] loading plugin "io.containerd.service.v1.tasks-service"... type=io.containerd.service.v1 INFO[2021-09-27T10:31:59.172855990Z] loading plugin "io.containerd.internal.v1.restart"... type=io.containerd.internal.v1 INFO[2021-09-27T10:31:59.172891733Z] loading plugin "io.containerd.grpc.v1.containers"... type=io.containerd.grpc.v1 INFO[2021-09-27T10:31:59.172909331Z] loading plugin "io.containerd.grpc.v1.content"... type=io.containerd.grpc.v1 INFO[2021-09-27T10:31:59.172927521Z] loading plugin "io.containerd.grpc.v1.diff"... type=io.containerd.grpc.v1 INFO[2021-09-27T10:31:59.172943221Z] loading plugin "io.containerd.grpc.v1.events"... type=io.containerd.grpc.v1 INFO[2021-09-27T10:31:59.172954609Z] loading plugin "io.containerd.grpc.v1.healthcheck"... type=io.containerd.grpc.v1 INFO[2021-09-27T10:31:59.172973022Z] loading plugin "io.containerd.grpc.v1.images"... type=io.containerd.grpc.v1 INFO[2021-09-27T10:31:59.172989597Z] loading plugin "io.containerd.grpc.v1.leases"... type=io.containerd.grpc.v1 INFO[2021-09-27T10:31:59.173003375Z] loading plugin "io.containerd.grpc.v1.namespaces"... type=io.containerd.grpc.v1 INFO[2021-09-27T10:31:59.173016816Z] loading plugin "io.containerd.internal.v1.opt"... type=io.containerd.internal.v1 INFO[2021-09-27T10:31:59.173065528Z] loading plugin "io.containerd.grpc.v1.snapshots"... type=io.containerd.grpc.v1 INFO[2021-09-27T10:31:59.173115059Z] loading plugin "io.containerd.grpc.v1.tasks"... type=io.containerd.grpc.v1 INFO[2021-09-27T10:31:59.173135335Z] loading plugin "io.containerd.grpc.v1.version"... type=io.containerd.grpc.v1 INFO[2021-09-27T10:31:59.173153405Z] loading plugin "io.containerd.grpc.v1.introspection"... type=io.containerd.grpc.v1 INFO[2021-09-27T10:31:59.173405783Z] serving... address="/var/run/docker/containerd/containerd-debug.sock" INFO[2021-09-27T10:31:59.173497892Z] serving... address="/var/run/docker/containerd/containerd.sock" INFO[2021-09-27T10:31:59.173515172Z] containerd successfully booted in 0.003936s
INFO[2021-09-27T10:31:59.178963994Z] parsed scheme: "unix" module=grpc INFO[2021-09-27T10:31:59.178983939Z] scheme "unix" not registered, fallback to default scheme module=grpc INFO[2021-09-27T10:31:59.179026174Z] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 }] } module=grpc INFO[2021-09-27T10:31:59.179041994Z] ClientConn switching balancer to "pick_first" module=grpc INFO[2021-09-27T10:31:59.179808301Z] parsed scheme: "unix" module=grpc INFO[2021-09-27T10:31:59.179834427Z] scheme "unix" not registered, fallback to default scheme module=grpc INFO[2021-09-27T10:31:59.179859668Z] ccResolverWrapper: sending update to cc: {[{unix:///var/run/docker/containerd/containerd.sock 0 }] } module=grpc INFO[2021-09-27T10:31:59.179868818Z] ClientConn switching balancer to "pick_first" module=grpc INFO[2021-09-27T10:31:59.181143610Z] [graphdriver] using prior storage driver: aufs WARN[2021-09-27T10:31:59.181158714Z] [graphdriver] WARNING: the aufs storage-driver is deprecated, and will be removed in a future release WARN[2021-09-27T10:31:59.184272417Z] Your kernel does not support swap memory limit WARN[2021-09-27T10:31:59.184285777Z] Your kernel does not support cgroup rt period WARN[2021-09-27T10:31:59.184295754Z] Your kernel does not support cgroup rt runtime WARN[2021-09-27T10:31:59.184304577Z] Your kernel does not support cgroup blkio weight WARN[2021-09-27T10:31:59.184314438Z] Your kernel does not support cgroup blkio weight_device INFO[2021-09-27T10:31:59.184479006Z] Loading containers: start.
WARN[2021-09-27T10:31:59.185419454Z] Running iptables --wait -t nat -L -n failed with message: iptables v1.8.7 (legacy): can't initialize iptables tablenat': Permission denied (you must be root) Perhaps iptables or your kernel needs to be upgraded., error: exit status 3 INFO[2021-09-27T10:31:59.201562743Z] stopping event stream following graceful shutdown error="<nil>" module=libcontainerd namespace=moby INFO[2021-09-27T10:31:59.202006057Z] stopping healthcheck following graceful shutdown module=libcontainerd INFO[2021-09-27T10:31:59.202011436Z] stopping event stream following graceful shutdown error="context canceled" module=libcontainerd namespace=plugins.moby 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.7 (legacy): can't initialize iptables tablenat': Permission denied (you must be root) Perhaps iptables or your kernel needs to be upgraded. (exit status 3)

santikris2003 commented 2 years ago

reason for above issue raising is this error when trying to do docker run ... docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?.