buildx: no active session for : context deadline exceeded
I’m seeing buildx error like this:
#25 exporting to image
#25 exporting layers
#25 exporting layers 2.4s done
#25 exporting manifest sha256:bee6a0ade00b7bc2bcaae86deefc8e88e6a274dee097c8ade078e4b3a88de520 done
#25 exporting config sha256:ac3b1fe36ac072dafadc6f2aed84ff305d810a92a3e62f71a820928c832d9ac9
#25 exporting config sha256:ac3b1fe36ac072dafadc6f2aed84ff305d810a92a3e62f71a820928c832d9ac9 0.0s done
#25 exporting manifest sha256:b7812799f180bbded0a8de865efba29dcf351c858f958e506cc13e612657e4b8 0.0s done
#25 exporting config sha256:b7efbce252b10357c495758cfb1299a4c6908153eec71fc8e3097bcca5d3eb8f done
#25 exporting manifest list sha256:cbf719abf8d8c678350283152e91f9f49c1138e0087758eeaa67f6697ae4dfda done
#25 ERROR: no active session for os44n22472jqaz3bk2t3jktq2: context deadline exceeded
Things to note:
- buildx v0.4.2
- build takes 4h50m
- it’s meant to push to quay.io
- full build log
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 40 (16 by maintainers)
Commits related to this issue
- updating version contribute to the error? https://github.com/docker/buildx/issues/456 — committed to Lightning-AI/pytorch-lightning by akihironitta 2 years ago
- CI/CD: Add CUDA version to docker image tags (#13831) * append cuda version to tags * revertme: push to hub * Update docker readme * Build base-conda-py3.9-torch1.12-cuda11.3.1 * Use new ... — committed to Lightning-AI/pytorch-lightning by akihironitta 2 years ago
- CI/CD: Add CUDA version to docker image tags (#13831) * append cuda version to tags * revertme: push to hub * Update docker readme * Build base-conda-py3.9-torch1.12-cuda11.3.1 * Use new ... — committed to Lightning-AI/pytorch-lightning by akihironitta 2 years ago
- CI/CD: Add CUDA version to docker image tags (#13831) * append cuda version to tags * revertme: push to hub * Update docker readme * Build base-conda-py3.9-torch1.12-cuda11.3.1 * Use new ... — committed to jessecambon/lightning by akihironitta 2 years ago
- Weekly patch release v1.7.2 (#14126) * update version and changelog for 1.7.2 release * Reset all results on epoch end (#14061) Co-authored-by: Carlos Mocholí <carlossmocholi@gmail.com> * Sk... — committed to Lightning-AI/pytorch-lightning by awaelchli 2 years ago
- CI/CD: Add CUDA version to docker image tags (#13831) * append cuda version to tags * revertme: push to hub * Update docker readme * Build base-conda-py3.9-torch1.12-cuda11.3.1 * Use new images i... — committed to Lightning-AI/pytorch-lightning by akihironitta 2 years ago
- CI/CD: Add CUDA version to docker image tags (#13831) * append cuda version to tags * revertme: push to hub * Update docker readme * Build base-conda-py3.9-torch1.12-cuda11.3.1 * Use new images i... — committed to Lightning-AI/pytorch-lightning by akihironitta 2 years ago
Hi everyone!
I add before " Build and push " step.
or
It works for me.
@Oliveirakun Temporary solutions can be used…
Add retry mechanism…
This also happens with short build times, in this case less than 10 minues. Often the same build passes with a build time of about 12 minutes. I’d say it fails in about 50 % of the jobs.
I confirmed that this is still an issue in version 4.9.1, this time testing on x86 macOS. As before, downgrading to 4.3.2 is an effective workaround.
I’ve been trying to figure out why I get this dreaded error when doing a few concurrent
DOCKER_BUILDKIT=1 docker build(x)builds:failed to solve with frontend dockerfile.v0: failed to read dockerfile: no active session for kqupcokbxys31oapli62ax81k: context deadline exceededBtw I don’t get the error when DOCKER_HOST is blank. Only get it when using DOCKER_HOST=ssh://docker.example.com. I’m on that server docker.example.com (passwordless ssh is configured and working).
Anyway I saw this closed bug and figure it’s been fixed for so long I must have the fix, but my docker 20.10.14 on ubuntu 20 still uses
buildx: Docker Buildx (Docker Inc., v0.8.1-docker)! Why is it so old? Is there any way to upgrade it?Still have it on Buildkit: moby/buildkit:v0.9.0-rootless, Azure Kubernetes service, Azure Container service
In my case was related to 2 concurrent cache exports:
2021-08-24T12:19:53.5930996Z #26 exporting cache 2021-08-24T12:19:53.5931582Z #26 sha256:2700d4ef94dee473593c5c614b55b2dedcca7893909811a8f2b48291a1f581e4 2021-08-24T12:19:53.5931959Z #26 preparing build cache for export 2021-08-24T12:19:54.1934009Z #26 preparing build cache for export 0.5s done 2021-08-24T12:19:54.1934497Z #26 writing layer sha256:0da622ee6d9e9d6172a4eb7e3647a200f74190536a9c3b8b53a9c2d014803b7d 2021-08-24T12:20:14.4543178Z #26 20.95 error: no active session for aim388ulrmif949ccgd2k0xza: context deadline exceeded 2021-08-24T12:20:14.4543633Z #26 20.95 retrying in 1s 2021-08-24T12:20:44.4583718Z #26 50.95 error: no active session for aim388ulrmif949ccgd2k0xza: context deadline exceeded 2021-08-24T12:20:44.4584324Z #26 50.95 retrying in 2s 2021-08-24T12:20:59.4693657Z #26 65.96 error: no active session for aim388ulrmif949ccgd2k0xza: context deadline exceeded 2021-08-24T12:20:59.4694097Z #26 65.96 retrying in 4s 2021-08-24T12:21:09.4759423Z #26 writing layer sha256:0da622ee6d9e9d6172a4eb7e3647a200f74190536a9c3b8b53a9c2d014803b7d 75.4s done 2021-08-24T12:21:09.4760392Z #26 75.97 error: no active session for aim388ulrmif949ccgd2k0xza: context deadline exceeded 2021-08-24T12:21:09.4760992Z #26 ERROR: error writing layer blob: no active session for aim388ulrmif949ccgd2k0xza: context deadline exceeded
2021-08-24T12:19:39.0062856Z #43 exporting cache 2021-08-24T12:19:39.0063170Z #43 sha256:2700d4ef94dee473593c5c614b55b2dedcca7893909811a8f2b48291a1f581e4 2021-08-24T12:19:39.0063480Z #43 preparing build cache for export 2021-08-24T12:19:39.4326968Z #43 preparing build cache for export 0.5s done 2021-08-24T12:19:39.5829077Z #43 writing layer sha256:0da622ee6d9e9d6172a4eb7e3647a200f74190536a9c3b8b53a9c2d014803b7d 2021-08-24T12:19:54.4506394Z #43 15.50 error: no active session for aim388ulrmif949ccgd2k0xza: context deadline exceeded 2021-08-24T12:19:54.4506870Z #43 15.50 retrying in 1s 2021-08-24T12:20:24.4557915Z #43 45.50 error: no active session for aim388ulrmif949ccgd2k0xza: context deadline exceeded 2021-08-24T12:20:24.4558485Z #43 45.50 retrying in 2s 2021-08-24T12:20:54.4602936Z #43 75.51 error: no active session for aim388ulrmif949ccgd2k0xza: context deadline exceeded 2021-08-24T12:20:54.4604240Z #43 75.51 retrying in 4s 2021-08-24T12:21:04.4717026Z #43 writing layer sha256:0da622ee6d9e9d6172a4eb7e3647a200f74190536a9c3b8b53a9c2d014803b7d 85.0s done 2021-08-24T12:21:04.4717958Z #43 85.52 error: no active session for aim388ulrmif949ccgd2k0xza: context deadline exceeded 2021-08-24T12:21:04.4718705Z #43 ERROR: error writing layer blob: no active session for aim388ulrmif949ccgd2k0xza: context deadline exceeded
Guys I have stopped seeing the problem after update to Buildkit: moby/buildkit:v0.9.0-rootless and increasing cache size from default to 50 GB ( --oci-worker-gc-keepstorage=50000)