Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error: failed to receive status: rpc error: code = Unavailable desc = closing transport due to: connection error: desc = "error reading from server: io: read/write on closed pipe", received prior goaway: code: NO_ERROR #1079

Closed
gitfxx opened this issue Apr 27, 2022 · 17 comments

Comments

@gitfxx
Copy link

gitfxx commented Apr 27, 2022

buildx-version:0.7.0
buildkit-version:0.9.0
driver: --driver kubenetes

image
Error: failed to receive status: rpc error: code = Unavailable desc = closing transport due to: connection error: desc = "error reading from server: io: read/write on closed pipe"

@crazy-max
Copy link
Member

Can you update buildx and BuildKit and let us known if you still have this issue? Thanks.

@g-kartik
Copy link

g-kartik commented May 11, 2022

I am facing a similar error while building

docker-compose build --no-cache --build-arg GIT_BRANCH=VIK-97-add-sign-in-with-google-ui  
  
.....  
=> exporting to image                                                                                                                                                             
 => => exporting layers                                                                                                                                                            
failed to receive status: rpc error: code = Unavailable desc = error reading from server: EOF  

@g-kartik
Copy link

Any updates on why this is happening and how it can be fixed?

@g-kartik
Copy link

g-kartik commented May 18, 2022

After this error, it requires PC restart to fix the issue and after that only building for a single time, the error repeats and again I restart the PC.

@yohnster
Copy link

After this error, it requires PC restart to fix the issue and after that only building for a single time, the error repeats and again I restart the PC.

This is what is happening to me right now. What fixed your issue?

@st-sukanta
Copy link

This is very frustrating and not stable Docker Desktop for Windows. My issue is still not fixed even after restart couple of times. I re-installled few times and then use "docker system prune" command as well.

How to fix this issue ?

@gitfxx
Copy link
Author

gitfxx commented Nov 24, 2022

@st-sukanta @g-kartik @yohnster I have found the cause of the problem, which is caused by a sudden outage of the buildkit server.

@Macil
Copy link

Macil commented Dec 28, 2022

I ran into this same error when trying to build a Dockerfile which had a make -j step, which can cause a ton of processes to run in parallel. The docker build process would halt for several minutes, docker ps calls would hang, and then eventually the build process would give this error. I was able to fix it by limiting the number of jobs make would start by changing the command to make -j $(nproc).

@sadeghesfahani
Copy link

I have had the same issue but I guess with different reason, as I left no stone unturned and found no clue about the reason, I will publish my answer here. I hope it saves you time.

after windows update KB5022845, based on their documentation you might come across some I/O problems. to solve this, the only thing you need to do is to run your docker desktop via admin permission. this is a simple solution but can waste days of your worktime to find it out.

@AntonOfTheWoods
Copy link

This also happens with Docker on Mac (desktop)...

@rogeriocassares
Copy link

rogeriocassares commented Apr 21, 2023

Hi! Editing .devcontainer/devcontainer.json file worker for me:

microsoft/vscode-remote-release#7958

...
"build": {
  "dockerfile": "Dockerfile",
  "args": {
    "USERNAME": "vscode",
    "BUILDKIT_INLINE_CACHE": "0"
  }
},
...

@anthonyalayo
Copy link

I solved it for myself by increasing the size of defaultKeepStorage and the virtual disk limit

@Fasunle
Copy link

Fasunle commented Jul 10, 2023

If you are using docker desktop, you just have to restart the docker desktop. Otherwise, restarting your computer will fix the error.

Why did the error occur?

This is because your docker desktop crash and exited. So, you need to restart it.

@jedevc
Copy link
Collaborator

jedevc commented Jul 12, 2023

The original error in this thread looks very similar to docker/build-push-action#761, which was fixed in BuildKit v0.11.2: docker/build-push-action#761 (comment). This error hopefully shouldn't appear anymore, so I'll close this issue (@gitfxx if it's still occurring, I can re-open).

The issue in #1079 (comment) is not actually the same at all, this is not an error during pushing, the buildkit server has crashed for some reason. This seems to be the case for other errors in this thread. If you are having this issue, please can you share the BuildKit logs from the container/pod/etc that hosts BuildKit (or the docker daemon logs if not using any special drivers) - without this info, we have no information as to what caused BuildKit to crash.

@jedevc jedevc closed this as completed Jul 12, 2023
@anthonyalayo
Copy link

I solved it for myself by increasing the size of defaultKeepStorage and the virtual disk limit

Coming back to this, it was only a fluke that changing the keep storage fixed it. I'm now hitting it continuously without fail. I opened a ticket here: docker/for-mac#6968

@AnotherYx
Copy link

I ran into this same error when trying to build a Dockerfile which had a make -j step, which can cause a ton of processes to run in parallel. The docker build process would halt for several minutes, docker ps calls would hang, and then eventually the build process would give this error. I was able to fix it by limiting the number of jobs make would start by changing the command to make -j $(nproc).

Thanks a lot! This method works for me!

@thany
Copy link

thany commented Jan 19, 2024

Same problem here. Is this getting a proper fix at some point? I've been having nothing but headaches when trying to run docker on windows. It's slow, produces errors randomly INSIDE dockers that a linux host doesn't, and it's also slow. Did I mention it's slow? It's slow. And now this. It's an unreliable piece of software, iyam.

But nevermind the rant, I'm sure the authors are working hard on it and all that, but reliability needs priority over features.

I am, however, seeing some promising remarks here.

Can you update buildx and BuildKit and let us known if you still have this issue? Thanks.

I thought if Docker Desktop is up to date, then all its components are, too. From your remarks, I assume that isn't the case. So, how to do that please?

@st-sukanta @g-kartik @yohnster I have found the cause of the problem, which is caused by a sudden outage of the buildkit server.

So who do we poke to make buildx more reliable?

I ran into this same error when trying to build a Dockerfile which had a make -j step, which can cause a ton of processes to run in parallel. The docker build process would halt for several minutes, docker ps calls would hang, and then eventually the build process would give this error. I was able to fix it by limiting the number of jobs make would start by changing the command to make -j $(nproc).

This is very specific to make, which is a piece of software many people probably aren't using, including me. I'm using Turbo, to build with Vite, which uses Rollup under the bonnet. Yes, that's Node.js. It doesn't have a process count limiter, afaik. Good find though, albeit for limited usecases.

If you are using docker desktop, you just have to restart the docker desktop. Otherwise, restarting your computer will fix the error.

"just" huh? As if it's obvious.. But how? I can't restart docker in the middle of a build, now can I? But more to the point, why does restarting docker "fix" the problem? Isn't that the strongest indication that something is really awfully wrong in docker desktop?

The original error in this thread looks very similar to docker/build-push-action#761, which was fixed in BuildKit v0.11.2: docker/build-push-action#761 (comment). This error hopefully shouldn't appear anymore, so I'll close this issue (@gitfxx if it's still occurring, I can re-open).

Please do. And I don't know what version of buildkit I have. I just installed docker desktop, assuming that whatever version it comes with is the correct (and latest stable) one. I didn't even know buildkit is a separate.. thing.

The issue in #1079 (comment) is not actually the same at all, this is not an error during pushing, the buildkit server has crashed for some reason. This seems to be the case for other errors in this thread. If you are having this issue, please can you share the BuildKit logs from the container/pod/etc that hosts BuildKit (or the docker daemon logs if not using any special drivers) - without this info, we have no information as to what caused BuildKit to crash.

I don't know how to provide you that information. Instructions? And also, at what point should those logs be collected: before, during, or after a build that ends in this error?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests