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 building image: error building stage: failed to get filesystem from image: stream error: stream ID 3; PROTOCOL_ERROR #1360

Open
ijaouani opened this issue Jul 28, 2020 · 9 comments
Labels
area/errorhandling For all bugs having to do with handling problems during kaniko execution area/registry For all bugs having to do with pushing/pulling into registries gitlab kind/bug Something isn't working needs-reproduction platform/tekton work-around-available

Comments

@ijaouani
Copy link

Actual behavior
kaniko breaks from time to time with this error:

error building image: error building stage: failed to get filesystem from image: stream error: stream ID 3; PROTOCOL_ERROR

I don't have find a way to systematically reproduice it.
Context : I use kaniko with GitLab CI (GitLab Runner).

Expected behavior

Log when it's working:

DEBU[0011] Mounted directories: [{/kaniko false} {/etc/mtab false} {/tmp/apt-key-gpghome true} {/var/run false} {/proc false} {/dev false} {/dev/pts false} {/sys false} {/sys/fs/cgroup false} {/sys/fs/cgroup/systemd false} {/sys/fs/cgroup/cpu,cpuacct false} {/sys/fs/cgroup/hugetlb false} {/sys/fs/cgroup/cpuset false} {/sys/fs/cgroup/pids false} {/sys/fs/cgroup/net_cls,net_prio false} {/sys/fs/cgroup/memory false} {/sys/fs/cgroup/rdma false} {/sys/fs/cgroup/devices false} {/sys/fs/cgroup/freezer false} {/sys/fs/cgroup/blkio false} {/sys/fs/cgroup/perf_event false} {/dev/mqueue false} {/builds false} {/busybox false} {/dev/termination-log false} {/etc/resolv.conf false} {/etc/hostname false} {/etc/hosts false} {/dev/shm false} {/var/run/secrets/kubernetes.io/serviceaccount false}] 
DEBU[0011] Not adding /dev because it is ignored        
DEBU[0011] Not adding /etc/hostname because it is ignored 
DEBU[0011] Not adding /etc/resolv.conf because it is ignored 
DEBU[0011] Not adding /proc because it is ignored       
DEBU[0011] Not adding /sys because it is ignored        
DEBU[0013] Not adding /var/run because it is ignored    

Log when it's not working:

DEBU[0010] optimize: cache key for command RUN npm run build ffa994c48d8ca1e707d097d4468b3ab8727b27a1b44d3945dee2b81d9c329d0b 
INFO[0010] Unpacking rootfs as cmd COPY portal/package*.json portal/.npmrc ./ requires it. 
DEBU[0010] Mounted directories: [{/kaniko false} {/etc/mtab false} {/tmp/apt-key-gpghome true} {/var/run false} {/proc false} {/dev false} {/dev/pts false} {/sys false} {/sys/fs/cgroup false} {/sys/fs/cgroup/systemd false} {/sys/fs/cgroup/cpu,cpuacct false} {/sys/fs/cgroup/hugetlb false} {/sys/fs/cgroup/cpuset false} {/sys/fs/cgroup/pids false} {/sys/fs/cgroup/net_cls,net_prio false} {/sys/fs/cgroup/memory false} {/sys/fs/cgroup/rdma false} {/sys/fs/cgroup/devices false} {/sys/fs/cgroup/freezer false} {/sys/fs/cgroup/blkio false} {/sys/fs/cgroup/perf_event false} {/dev/mqueue false} {/builds false} {/busybox false} {/dev/termination-log false} {/etc/resolv.conf false} {/etc/hostname false} {/etc/hosts false} {/dev/shm false} {/var/run/secrets/kubernetes.io/serviceaccount false}] 
DEBU[0010] Not adding /dev because it is ignored        
DEBU[0077] Not adding /etc/hostname because it is ignored 
DEBU[0077] Not adding /etc/resolv.conf because it is ignored 
error building image: error building stage: failed to get filesystem from image: stream error: stream ID 3; PROTOCOL_ERROR
ERROR: Job failed: command terminated with exit code 1

To Reproduce

$ echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
$ /kaniko/executor --verbosity=debug --context $CI_PROJECT_DIR/client --dockerfile $CI_PROJECT_DIR/client/$IFCHOR_APP/Dockerfile --destination $CI_REGISTRY_IMAGE/$APP:$TAG

Additional Information
kaniko version : i use the docker image gcr.io/kaniko-project/executor:debug
GitLab Runner version 13.1.1
Runner host inside kubernetes 1.17.7 in Azure Kubernetes Service.

Triage Notes for the Maintainers

Description Yes/No
Please check if this a new feature you are proposing
Please check if the build works in docker but not in kaniko
Please check if this error is seen when you use --cache flag
Please check if your dockerfile is a multistage dockerfile
@feifeixiyu
Copy link

also see this error from time to time, using jenkins + kubernetes plugin

@wsszh
Copy link

wsszh commented Nov 30, 2021

Same problem running tekton...

@wowq
Copy link

wowq commented Mar 15, 2022

Any idea for this?

@LPX-E5BD8
Copy link

Any idea for this?

try to reset GOPROXY

export GOPROXY=""

@toby1991
Copy link

same error

1 similar comment
@zhonghuali
Copy link

same error

@toby1991
Copy link

same error

Seems like docker hub pull frequency issue,when I change the registry to private, this problem not show again!!

@aaron-prindle aaron-prindle added kind/bug Something isn't working area/errorhandling For all bugs having to do with handling problems during kaniko execution area/registry For all bugs having to do with pushing/pulling into registries needs-reproduction labels May 29, 2023
@aaron-prindle
Copy link
Collaborator

aaron-prindle commented Jul 4, 2023

Can anyone in the thread here confirm:

  1. If this is still an issue in the latest version of Kaniko, v1.12.1
  2. If the suggested workaround of setting GOPROXY="" works to resolve this issue - error building image: error building stage: failed to get filesystem from image: stream error: stream ID 3; PROTOCOL_ERROR #1360 (comment)
  3. If this is related to docker throttling as mentioned in the comment above -
    error building image: error building stage: failed to get filesystem from image: stream error: stream ID 3; PROTOCOL_ERROR #1360 (comment)

Trying to understand if this issue is still relevant, if this is a kaniko issue, and how to address the friction here - possibly a fix (depending on root cause), a better error message (if possible) or some documentation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/errorhandling For all bugs having to do with handling problems during kaniko execution area/registry For all bugs having to do with pushing/pulling into registries gitlab kind/bug Something isn't working needs-reproduction platform/tekton work-around-available
Projects
None yet
Development

No branches or pull requests

9 participants