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

Failed to install grafana #759

Closed
joeytwiddle opened this issue Jul 20, 2022 · 2 comments
Closed

Failed to install grafana #759

joeytwiddle opened this issue Jul 20, 2022 · 2 comments

Comments

@joeytwiddle
Copy link
Contributor

Perhaps Grafana should not be recommended as default in whiptail.

 => [prometheus:local 4/4] COPY ./choose-config.sh /usr/local/bin/choose-config.sh                                                                                                                                                                                       0.5s
 => ERROR [grafana:local 2/7] RUN apk --update add wget tree jq sed                                                                                                                                                                                                     10.4s
------
 > [grafana:local 2/7] RUN apk --update add wget tree jq sed:
#0 0.334 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/main/x86_64/APKINDEX.tar.gz
#0 5.337 ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.15/main: temporary error (try again later)
#0 5.337 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/main: No such file or directory
#0 5.338 fetch https://dl-cdn.alpinelinux.org/alpine/v3.15/community/x86_64/APKINDEX.tar.gz
#0 10.34 ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.15/community: temporary error (try again later)
#0 10.34 WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.15/community: No such file or directory
#0 10.34 ERROR: unable to select packages:
#0 10.34   jq (no such package):
#0 10.34     required by: world[jq]
#0 10.34   sed (no such package):
#0 10.34     required by: world[sed]
#0 10.34   tree (no such package):
#0 10.34     required by: world[tree]
#0 10.34   wget (no such package):
#0 10.34     required by: world[wget]
------
failed to solve: executor failed running [/bin/sh -c apk --update add wget tree jq sed]: exit code: 4
@yorickdowne
Copy link
Contributor

That sounds like a local issue. Something with DNS maybe? Or maybe the alpine package repo was down for a bit? Just tried it here, and Grafana still builds.

@joeytwiddle
Copy link
Contributor Author

joeytwiddle commented Jul 26, 2022

You were right, it was a DNS issue. I found a solution for it here:

gliderlabs/docker-alpine#334 (comment)

I later ran into the issue again, and the above fix wasn't working. But I found I could get it working by adding network: host under the build and x-build sections of the relevant yml files. This was fiddly.

But then finally I found the real problem was with our firewall. We had it configured to whitelist incoming packets to the desired app ports, but reject everything else, which meant it was rejecting responses from DNS queries! I tried adding another rule, to fix that, but I'm not sure if it helped: iptables -A DOCKER-USER -m state --state ESTABLISHED,RELATED -j ACCEPT Docker docs actually recommend blacklisting instead of whitelisting.

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

2 participants