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

'RUN apk update ' return temporary error (try again later) #3636

Closed
1 of 2 tasks
maxvint opened this issue Apr 15, 2019 · 3 comments
Closed
1 of 2 tasks

'RUN apk update ' return temporary error (try again later) #3636

maxvint opened this issue Apr 15, 2019 · 3 comments
Labels
area/buildpack area/jenkins area/jenkins indicates the bug was reported against the "Classic Jenkins" installation type kind/question Issue is a question open for discussion priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.

Comments

@maxvint
Copy link

maxvint commented Apr 15, 2019

Summary

Jenkins-x return temporary error in the Building [changeme] step.

Steps to reproduce the behavior

When building job I've got:

Starting build...
Building [changeme]...
Sending build context to Docker daemon  2.048kB

Step 1/7 : FROM python:3.6-alpine
 ---> 148efb059c7f
Step 2/7 : ENV PYTHONUNBUFFERED 1
 ---> Using cache
 ---> 9d171d2a811a
Step 3/7 : RUN echo "Asia/Shanghai" > /etc/timezone;
 ---> Using cache
 ---> 3d0703f67143
Step 4/7 : RUN echo "==========================="
 ---> Using cache
 ---> 6e422b094ed8
Step 5/7 : RUN apk update
 ---> Running in ea097de39341
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
[91mERROR: http://dl-cdn.alpinelinux.org/alpine/v3.9/main: temporary error (try again later)
WARNING: Ignoring APKINDEX.b89edf6e.tar.gz: No such file or directory
[91mERROR: http://dl-cdn.alpinelinux.org/alpine/v3.9/community: temporary error (try again later)
WARNING: Ignoring APKINDEX.737f7e01.tar.gz: No such file or directory
[0m2 errors; 34 distinct packages available
Complete in 4.733236596s
time="2019-04-15T13:17:49Z" level=fatal msg="build failed: building [changeme]: build artifact: The command '/bin/sh -c apk update' returned a non-zero code: 2"

Jx version

The output of jx version is:

WARN[0001] Failed to find helm installs: failed to run 'helm list' command in directory '', output: 'Error: configmaps is forbidden: User "system:serviceaccount:kube-system:default" cannot list resource "configmaps" in API group "" in the namespace "kube-system"' 
NAME               VERSION
jx                 1.3.1116
Kubernetes cluster v1.12.6-eks-d69f1b
kubectl            v1.11.5
helm client        v2.13.1+g618447c
helm server        v2.13.1+g618447c
git                git version 2.14.5
Operating System   Unkown Linux distribution Linux version 4.14.106-79.86.amzn1.x86_64 (mockbuild@gobi-build-64002) (gcc version 7.2.1 20170915 (Red Hat 7.2.1-2) (GCC)) #1 SMP Tue Mar 19 00:48:07 UTC 2019

Dockerfile

I just use a simple dockerfile for testing.

FROM python:3.6-alpine

ENV PYTHONUNBUFFERED 1

RUN echo "==========================="

RUN apk update

WORKDIR /app

ENTRYPOINT ["/entrypoint"]

Jenkins type

  • Classic Jenkins
  • Serverless Jenkins

Kubernetes cluster

I created cluster by using eksctl.

Operating system / Environment

Linux ip-x-x-x-x 4.14.106-79.86.amzn1.x86_64 #1 SMP Tue Mar 19 00:48:07 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

@maxvint maxvint changed the title 'Run apk update ' return temporary error (try again later) 'RUN apk update ' return temporary error (try again later) Apr 15, 2019
@ccojocar
Copy link
Contributor

@yuwenhui Can you build this docker file on you workstation?

@ccojocar ccojocar added area/buildpack kind/question Issue is a question open for discussion priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done. labels Apr 18, 2019
@maxvint
Copy link
Author

maxvint commented Jun 23, 2019

This problem was caused by the EKS config. I was created my EKS cluster by eksctl firstly until i saw this: enable-docker-bridge, eksctl disable the docker bridge so the pods couldn't connect external network.

Finally i resolved this problem by recreated EKS cluster use Terrform, and use this module terraform-aws-eks.

By the way, i found that Terrform is an very awesome tool to manage cluster and do some other things.

@deanesmith
Copy link
Contributor

/area jenkins

@jenkins-x-bot jenkins-x-bot added the area/jenkins area/jenkins indicates the bug was reported against the "Classic Jenkins" installation type label Jul 26, 2019
@maxvint maxvint closed this as completed Jul 27, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/buildpack area/jenkins area/jenkins indicates the bug was reported against the "Classic Jenkins" installation type kind/question Issue is a question open for discussion priority/awaiting-more-evidence Lowest priority. Possibly useful, but not yet enough support to actually get it done.
Projects
None yet
Development

No branches or pull requests

4 participants