docker / buildx

Docker CLI plugin for extended build capabilities with BuildKit
Apache License 2.0
3.5k stars 471 forks source link

ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF #2380

Open demensdeum opened 6 months ago

demensdeum commented 6 months ago

Contributing guidelines

I've found a bug and checked that ...

Description

git clone https://github.com/demensdeum/Masonry-AR-Docker.git cd Masonry-AR-Docker docker buildx build .

ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF ### Expected behaviour Image build success ### Actual behaviour Image build failed ### Buildx version github.com/docker/buildx v0.12.1-desktop.4 6996841df2f61988c2794d84d33205368f96c317 ### Docker info ```text Client: Version: 25.0.3 Context: desktop-linux Debug Mode: false Plugins: buildx: Docker Buildx (Docker Inc.) Version: v0.12.1-desktop.4 Path: /Users/iliaprokhorov/.docker/cli-plugins/docker-buildx compose: Docker Compose (Docker Inc.) Version: v2.24.6-desktop.1 Path: /Users/iliaprokhorov/.docker/cli-plugins/docker-compose debug: Get a shell into any image or container. (Docker Inc.) Version: 0.0.24 Path: /Users/iliaprokhorov/.docker/cli-plugins/docker-debug dev: Docker Dev Environments (Docker Inc.) Version: v0.1.0 Path: /Users/iliaprokhorov/.docker/cli-plugins/docker-dev extension: Manages Docker extensions (Docker Inc.) Version: v0.2.22 Path: /Users/iliaprokhorov/.docker/cli-plugins/docker-extension feedback: Provide feedback, right in your terminal! (Docker Inc.) Version: v1.0.4 Path: /Users/iliaprokhorov/.docker/cli-plugins/docker-feedback init: Creates Docker-related starter files for your project (Docker Inc.) Version: v1.0.1 Path: /Users/iliaprokhorov/.docker/cli-plugins/docker-init sbom: View the packaged-based Software Bill Of Materials (SBOM) for an image (Anchore Inc.) Version: 0.6.0 Path: /Users/iliaprokhorov/.docker/cli-plugins/docker-sbom scout: Docker Scout (Docker Inc.) Version: v1.5.0 Path: /Users/iliaprokhorov/.docker/cli-plugins/docker-scout Server: Containers: 1 Running: 0 Paused: 0 Stopped: 1 Images: 4 Server Version: 25.0.3 Storage Driver: overlay2 Backing Filesystem: extfs Supports d_type: true Using metacopy: false Native Overlay Diff: true userxattr: false Logging Driver: json-file Cgroup Driver: cgroupfs Cgroup Version: 2 Plugins: Volume: local Network: bridge host ipvlan macvlan null overlay Log: awslogs fluentd gcplogs gelf journald json-file local splunk syslog Swarm: inactive Runtimes: io.containerd.runc.v2 runc Default Runtime: runc Init Binary: docker-init containerd version: ae07eda36dd25f8a1b98dfbf587313b99c0190bb runc version: v1.1.12-0-g51d5e94 init version: de40ad0 Security Options: seccomp Profile: unconfined cgroupns Kernel Version: 6.6.16-linuxkit Operating System: Docker Desktop OSType: linux Architecture: aarch64 CPUs: 8 Total Memory: 3.831GiB Name: docker-desktop ID: 8a77388d-38da-47e1-a973-63acdd60655c Docker Root Dir: /var/lib/docker Debug Mode: false HTTP Proxy: http.docker.internal:3128 HTTPS Proxy: http.docker.internal:3128 No Proxy: hubproxy.docker.internal Username: demensdeum Experimental: false Insecure Registries: hubproxy.docker.internal:5555 127.0.0.0/8 Live Restore Enabled: false ``` ### Builders list ```text NAME/NODE DRIVER/ENDPOINT STATUS BUILDKIT PLATFORMS default docker default default running v0.12.5 linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6 desktop-linux * docker desktop-linux desktop-linux running v0.12.5 linux/arm64, linux/amd64, linux/amd64/v2, linux/riscv64, linux/ppc64le, linux/s390x, linux/386, linux/mips64le, linux/mips64, linux/arm/v7, linux/arm/v6 ``` ### Configuration ```dockerfile FROM ubuntu RUN apt update RUN apt -y upgrade RUN DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get -y install tzdata RUN apt install -y wget RUN apt install -y apache2 RUN apt install -y php RUN apt install -y libapache2-mod-php RUN apt install -y php-mysql RUN apt install -y mariadb-server RUN apt install -y git RUN apt install -y unzip RUN apt install -y python3 RUN apt install -y curl RUN apt install -y composer RUN apt install -y php-pear RUN apt-get install -y php-dev RUN pecl install ast RUN ln -s /bin/python3 /bin/python RUN apt-get update && apt-get install -y wget && \ apt-get install -y autoconf pkg-config RUN apt-get update && apt-get install -y wget && \ apt-get install -y build-essential curl libpng-dev && \ wget https://github.com/ImageMagick/ImageMagick/archive/refs/tags/7.1.0-31.tar.gz && \ tar xzf 7.1.0-31.tar.gz && \ rm 7.1.0-31.tar.gz && \ apt-get clean && \ apt-get autoremove RUN sh ./ImageMagick-7.1.0-31/configure --prefix=/usr/local --with-bzlib=yes --with-fontconfig=yes --with-freetype=yes --with-gslib=yes --with-gvc=yes --with-jpeg=yes --with-jp2=yes --with-png=yes --with-tiff=yes --with-xml=yes --with-gs-font-dir=yes && \ make -j && make install && ldconfig /usr/local/lib/ RUN rm /var/www/html/index.html RUN a2enmod ssl RUN mkdir ssl RUN apt-get update && \ apt-get install -y openssl && \ openssl genrsa -des3 -passout pass:xxxx -out /ssl/server.pass.key 2048 && \ openssl rsa -passin pass:xxxx -in /ssl/server.pass.key -out /ssl/server.key && \ rm /ssl/server.pass.key && \ openssl req -new -key /ssl/server.key -out /ssl/server.csr \ -subj "/C=UK/ST=Warwickshire/L=Leamington/O=OrgName/OU=IT Department/CN=example.com" && \ openssl x509 -req -days 365 -in /ssl/server.csr -signkey /ssl/server.key -out /ssl/server.crt RUN rm /etc/apache2/sites-enabled/000-default.conf ADD ssl/000-default.conf /etc/apache2/sites-enabled/000-default.conf ADD script/installMasonryAR.sh / RUN rm /etc/php/8.1/cli/php.ini ADD php/php.ini /etc/php/8.1/cli/php.ini RUN apt install -y pip RUN apt-get install php-mysqli RUN echo "1" > /DockerImage ``` ### Build logs ```text docker buildx build . [+] Building 49.5s (25/38) docker:desktop-linux => CACHED [ 7/34] RUN apt install -y php 0.0s => CACHED [ 8/34] RUN apt install -y libapache2-mod-php 0.0s => CACHED [ 9/34] RUN apt install -y php-mysql 0.0s => CACHED [10/34] RUN apt install -y mariadb-server 0.0s => CACHED [11/34] RUN apt install -y git 0.0s => CACHED [12/34] RUN apt install -y unzip 0.0s => CACHED [13/34] RUN apt install -y python3 0.0s => CACHED [14/34] RUN apt install -y curl 0.0s => CACHED [15/34] RUN apt install -y composer 0.0s => CACHED [16/34] RUN apt install -y php-pear 0.0s => CACHED [17/34] RUN apt-get install -y php-dev 0.0s => CACHED [18/34] RUN pecl install ast 0.0s => CACHED [19/34] RUN ln -s /bin/python3 /bin/python 0.0s => CACHED [20/34] RUN apt-get update && apt-get install -y wget && a 0.0s => CACHED [21/34] RUN apt-get update && apt-get install -y wget && a 0.0s => [22/34] RUN sh ./ImageMagick-7.1.0-31/configure --prefix=/usr/local 49.5s => => # CXX Magick++/lib/libMagick___7_Q16HDRI_la-ResourceLimits.lo => => # CXX Magick++/lib/libMagick___7_Q16HDRI_la-SecurityPolicy.lo => => # CXX Magick++/lib/libMagick___7_Q16HDRI_la-Statistic.lo => => # CXX Magick++/lib/libMagick___7_Q16HDRI_la-STL.lo => => # CXX Magick++/lib/libMagick___7_Q16HDRI_la-Thread.lo => => # CXX Magick++/lib/libMagick___7_Q16HDRI_la-TypeMetric.lo ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF ``` ### Additional info Reproduces on Arch Linux machine and M2 MacBook
demensdeum commented 6 months ago

Reproducable only on Arch Linux and MacOS M2. Everything good on Windows 11.

thompson-shaun commented 3 months ago

šŸ‘‹ @demensdeum -- any chance you've given this a try lately? I was able to build on and M1 running MacOS 14.2.1 and github.com/docker/buildx v0.14.0-desktop.1.

demensdeum commented 3 months ago

@thompson-shaun I will try and respond

lenhartd-apex commented 2 months ago

I have the same issue when trying to update to buildkit v0.12.5 (and docker:27.1.1) from docker 19. After reading the initial post here I also tried it with docker:25.0.5 and docker:24.0.9 and the outcome is exactly the same.

on amd64

default        docker                                                  
 \_ default   \_ default        running    v0.12.5    linux/amd64, linux/amd64/v2, linux/amd64/v3, linux/386

on arm64

NAME/NODE     DRIVER/ENDPOINT   STATUS    BUILDKIT   PLATFORMS
default*      docker                                 
 \_ default    \_ default       running   v0.12.5    linux/arm64, linux/arm/v7, linux/arm/v6

After trying to update the docker-engine (and switching to buildx) for a large docker image build (based on Ubuntu 20.04.6 LTS).

ERROR: failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF

It consistently fails (30 out of 30 tries) after completing roughly half the build which is at 100 minutes in.

I have tried disabling inline cache with BUILDKIT_INLINE_CACHE=0 as suggested in some tickets

thompson-shaun commented 1 month ago

šŸ‘‹ @lenhartd-apex - What version did you update to that produced the failed to receive status terminal output above?

lenhartd-apex commented 1 month ago

@thompson-shaun

šŸ‘‹ @lenhartd-apex - What version did you update to that produced the failed to receive status terminal output above?

I updated to buildkit v0.12.5 (and docker:27.1.1)? Maybe I phrased this ambiguously: "After trying to update the docker-engine". What I meant is: I tried to update to buildkit v0.12.5 (and docker:27.1.1) and face this issue. I tried to update to an older version (25 and 24) and they all have the same issue. Only going back to 19 fixes it.