Closed JustcallmeTuner closed 1 year ago
That's unfortunate; a syscall.Errno
got returned without being annotated with any context which could tell us which operation wasn't supported. Could you please enable debug mode on the daemon and post the debug logs? Even though it likely is some disabled feature in your custom kernel, the resulting error from the daemon not being actionable or even particularly troubleshoot-able is itself a bug.
thanks for your reply. I have fixed this bug by run the custom os on the disk rather than ram. I suspect the reason is no enouth resource to run docker virtualization.
@JustcallmeTuner glad you found a solution, but the uninformative error message is still unfixed. It would really help out other people who will run into the same issue in the future if you could help us fix it by reproducing the issue and provide us the debug logs.
Hi, I am in the exact same situation (glad I've found this thread!!!).... that is:
docker --version
outputs the docker versiondocker pull hello-world:linux
looks like it worksdocker image ls
shows the pulled imagedocker run hello-world:linux
results in:
docker: Error response from daemon: operation not supported.
time="2023-07-20T17:03:01.389212715+10:00" level=error msg="Handler for POST /v1.41/containers/create returned error: operation not supported"
I'm not sure how to do as @corhere asked:
Could you please enable debug mode on the daemon and post the debug logs?
I tried docker --debug run hello-world:linux
but this resulted in the same log message in /var/log/dockerd. I will Google and try to find out how to run the dockerd
process in debug mode
@nocker01 You have to follow this docs section to enable debug mode: https://docs.docker.com/config/daemon/logs/#enable-debugging
Once the debug mode is enabled, you have to:
Handler for POST /v1.41/containers/create returned error: operation not supported
;Thanks for the guidance @akerouanton .
Here are the logs I've captured with debug mode enabled:
time="2023-07-20T20:51:44.651398670+10:00" level=debug msg="Calling HEAD /_ping"
time="2023-07-20T20:51:44.654996491+10:00" level=debug msg="Calling POST /v1.41/containers/create"
time="2023-07-20T20:51:44.655883758+10:00" level=debug msg="form data: {\"AttachStderr\":true,\"AttachStdin\":false,\"AttachStdout\":true,\"Cmd\":null,\"Domainname\":\"\",\"Entrypoint\":null,\"Env\":null,\"HostConfig\":{\"AutoRemove\":false,\"Binds\":null,\"BlkioDeviceReadBps\":null,\"BlkioDeviceReadIOps\":null,\"BlkioDeviceWriteBps\":null,\"BlkioDeviceWriteIOps\":null,\"BlkioWeight\":0,\"BlkioWeightDevice\":[],\"CapAdd\":null,\"CapDrop\":null,\"Cgroup\":\"\",\"CgroupParent\":\"\",\"CgroupnsMode\":\"\",\"ConsoleSize\":[0,0],\"ContainerIDFile\":\"\",\"CpuCount\":0,\"CpuPercent\":0,\"CpuPeriod\":0,\"CpuQuota\":0,\"CpuRealtimePeriod\":0,\"CpuRealtimeRuntime\":0,\"CpuShares\":0,\"CpusetCpus\":\"\",\"CpusetMems\":\"\",\"DeviceCgroupRules\":null,\"DeviceRequests\":null,\"Devices\":[],\"Dns\":[],\"DnsOptions\":[],\"DnsSearch\":[],\"ExtraHosts\":null,\"GroupAdd\":null,\"IOMaximumBandwidth\":0,\"IOMaximumIOps\":0,\"IpcMode\":\"\",\"Isolation\":\"\",\"KernelMemory\":0,\"KernelMemoryTCP\":0,\"Links\":null,\"LogConfig\":{\"Config\":{},\"Type\":\"\"},\"MaskedPaths\":null,\"Memory\":0,\"MemoryReservation\":0,\"MemorySwap\":0,\"MemorySwappiness\":-1,\"NanoCpus\":0,\"NetworkMode\":\"default\",\"OomKillDisable\":false,\"OomScoreAdj\":0,\"PidMode\":\"\",\"PidsLimit\":0,\"PortBindings\":{},\"Privileged\":false,\"PublishAllPorts\":false,\"ReadonlyPaths\":null,\"ReadonlyRootfs\":false,\"RestartPolicy\":{\"MaximumRetryCount\":0,\"Name\":\"no\"},\"SecurityOpt\":null,\"ShmSize\":0,\"UTSMode\":\"\",\"Ulimits\":null,\"UsernsMode\":\"\",\"VolumeDriver\":\"\",\"VolumesFrom\":null},\"Hostname\":\"\",\"Image\":\"hello-world:linux\",\"Labels\":{},\"NetworkingConfig\":{\"EndpointsConfig\":{}},\"OnBuild\":null,\"OpenStdin\":false,\"StdinOnce\":false,\"Tty\":false,\"User\":\"\",\"Volumes\":{},\"WorkingDir\":\"\"}"
time="2023-07-20T20:51:44.661517869+10:00" level=error msg="Handler for POST /v1.41/containers/create returned error: operation not supported"
Unfortunately, the debug logs hold no clues either. Anyone willing and able to reproduce the issue while running the daemon under strace
and provide the (unabridged) strace log? Or provide me with a prebuilt disk image I could use to reproduce the issue in a VM?
Hi, here are the logs I've captured. Let me know if these are not what was requested. Thanks.
Hi, I've just come across this check-config.sh script that is used to identify if your system is able to run docker containers. I have several kernel modules that are missing. I will address these and then try again. I will post an update if I do or don't get it running. Apologies if I've wasted anyone time.
@nocker01 it looks like you captured an strace log of a docker
CLI invocation. Unfortunately that does not contain the information I need to track down which operation is in need of better error handling. I need an strace log of the dockerd
daemon process for that. Thanks!
@corhere forgive my lack of knowledge, here is the strace log from the dockerd
process:
strace_dockerd.log
@nocker01 perfect, that's exactly what I needed.
1431 lgetxattr("/var/lib/docker/vfs/dir/fc42475c78ab05f736abd9ebd676e6268a0f19c4434ca19b0dd397956d66cb17", "security.capability", 0x40006cd400, 128) = -1 EOPNOTSUPP (Operation not supported)
Ah, that's a known issue: #45417. It has been fixed by #45463 and the error handling was improved in https://github.com/moby/moby/pull/45464/commits/0cdfd5f27582a5fb2e9627fbec1245453eac4c15. More recent versions of Moby handle missing xattr support more gracefully.
Given that @JustcallmeTuner was able to work around the error by switching the backing filesystem, it's probably safe to assume that their kernel was configured with CONFIG_TMPFS_XATTR=n
. I'm closing this issue as a duplicate of #45417
Description
I use yocto to build a 4.19 kernel image, and embeded docker to the image. After successfully running the Linux system, when I execute "docker pull hello-world", but when I run "docker run hello-world", it gives me an error message: "docker: Error response from daemon: operation not supported. See
docker run --help
." Then I executejournalctl -exu docker
, the message is following:Reproduce
docker pull hello-world
docker run hello-world
Expected behavior
docker version
docker info
Additional Info
I have executed the check-config.sh scrip, and the message is the following: info: reading kernel config from /proc/config.gz ...