portainer: error reading server preface: http2: frame too large
Before you start please confirm the following.
- Yes, I’ve searched similar issues on GitHub.
- Yes, I’ve checked whether this issue is covered in the Portainer documentation or knowledge base.
Problem Description
Hi,
When I define new stack like this:
services:
test:
build: https://ghp_TOKEN@github.com/USERNAME/REPONAME.git#:FOLDER/SUBFOLDER
And deploy stack, it gives following error:
failed to deploy a stack: listing workers for Build: failed to list workers: Unavailable: connection error: desc = "error reading server preface: http2: frame too large"
If I put all this into file docker-compose.yaml locally on server and run docker compose up then deployment is successful.
Expected Behavior
Stack should be build properly as if I would build it from bash directly on server.
Actual Behavior
Stack throws error: failed to deploy a stack: listing workers for Build: failed to list workers: Unavailable: connection error: desc = "error reading server preface: http2: frame too large"
Steps to Reproduce
- Login to portainer
- Go to Stacks -> Add Stack
- Select Web Editor and paste there:
services:
test:
build: https://ghp_TOKEN@github.com/USERNAME/REPONAME.git#:FOLDER/SUBFOLDER
- Give it a name
- Press on Deploy the stack button.
Portainer logs or screenshots
Portainer version
2.19.1
Portainer Edition
Community Edition (CE)
Platform and Version
Docker Standalone 24.0.7
OS and Architecture
linux x86_64 Debian GNU/Linux 11 (bullseye)
Browser
Firefox 119.0 64-bit
What command did you use to deploy Portainer?
docker run -d -p 8000:8000 -p 9443:9443 --name portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
Additional Information
No response
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 10
- Comments: 47 (3 by maintainers)
Same problem here with the newest portainer version 2.27.3 lts…
Facing same issue on latest portainer/portainer-agent combo. After hours of debugging this, I found it’s rather a buildkit issue.
Temporary workaround is to fall back to legacy build by setting
DOCKER_BUILDKIT: 0env variable. If your portainer is deployed via docker, you can do it following way in compose file:Tagging jamescarppe
Same here using the latest version of Portainer BE. Seems to me like the Agent is that the GRPC version used in Portainer is buggy. In my case my Portainer instance is talking to a Portainer Agent on the other side of a Site-To-Site VPN, which probably changes the frame size. Portainer is the only app that has issues with this and I’ve been using this setup for the past 5 years without issues with other apps. Interestingly Portainer used to work perfectly fine with this setup before. It must have been a recent update who broke it for me. I even tried updating the Portainer Agent to the latest version, with the same result.
The error is always:
Failed to deploy a stack: compose build operation failed: listing workers for Build: failed to list workers: Unavailable: connection error: desc = "error reading server preface: http2: frame too large"This did not work for me.
DOCKER_BUILDKIT=0seems to cause issues when your github repository contains a docker compose with build in it:I let github build and store my images and Portainer retrieve those images.
DOCKER_BUILDKIT=0
DOCKER_BUILDKIT=1
Getting the same error on Community Edition v 2.27.4 LTS
I am getting this error in 2.27.4 trying to re-deploy to a remote docker instance over portainer-agent. The instance used to work before I updated about a week ago.
My
docker-compose.yaml:Placing this in a
docker-compose.yamland runningdocker compose upseems to work fine. Agent is also 2.27.4.Hi, I am experiencing the same issue. I resolved it simply by enabling
Enable relative path volumesin the stack.Any workaround for CE edition ?
This is likely due to your build requiring relative path support in order to build. Relative path volumes is a feature we provide in our Business Edition (which you can get for free for up to 3 nodes), and may help you work around this error.