Cockroach: run build-docker-dev.sh in ubuntu, but it always connect to debian

Created on 17 Jul 2015  Â·  13Comments  Â·  Source: cockroachdb/cockroach

I run build-docker-dev.sh in ubuntu 14.04 in office. I found it connect to debian sourcelist but not ubuntu. But at home, it is ok. What make it decide which one to connect?

./build-docker-dev.sh
Building Docker Cockroach images...
Sending build context to Docker daemon 20.48 kB
Sending build context to Docker daemon
Step 0 : FROM golang:1.4.2
---> 124e2127157f
Step 1 : MAINTAINER Tobias Schottdorf [email protected]
---> Using cache
---> f63a69d6f272
Step 2 : RUN apt-get update -y && apt-get dist-upgrade -y && apt-get install --no-install-recommends --auto-remove -y git build-essential pkg-config file npm && apt-get clean autoclean && apt-get autoremove -y && rm -rf /tmp/* && ln -s /usr/bin/nodejs /usr/bin/node
---> Running in 7e19238782ad
Err http://httpredir.debian.org jessie InRelease

Err http://httpredir.debian.org jessie-updates InRelease

Err http://httpredir.debian.org jessie Release.gpg
Could not resolve 'httpredir.debian.org'
Err http://httpredir.debian.org jessie-updates Release.gpg
Could not resolve 'httpredir.debian.org'
Err http://security.debian.org jessie/updates InRelease

Err http://security.debian.org jessie/updates Release.gpg
Could not resolve 'security.debian.org'
Reading package lists...
W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/InRelease

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/InRelease

W: Failed to fetch http://security.debian.org/dists/jessie/updates/InRelease

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie/Release.gpg Could not resolve 'httpredir.debian.org'

W: Failed to fetch http://httpredir.debian.org/debian/dists/jessie-updates/Release.gpg Could not resolve 'httpredir.debian.org'

W: Failed to fetch http://security.debian.org/dists/jessie/updates/Release.gpg Could not resolve 'security.debian.org'

W: Some index files failed to download. They have been ignored, or old ones used instead.
Reading package lists...
Building dependency tree...
Reading state information...
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Reading package lists...
Building dependency tree...
Reading state information...
Package file is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

Package pkg-config is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Unable to locate package build-essential
E: Package 'pkg-config' has no installation candidate
E: Package 'file' has no installation candidate
E: Unable to locate package npm

Most helpful comment

solved. norasky figured out that in /etc/default/docker the DOCKER_OPTS line could be commented out. after that, just restart the docker daemon sudo restart docker and done. worked for me!

All 13 comments

Hi @YuleiXiao,

the error Could not resolve 'httpredir.debian.org' indicates that you've got a DNS problem at one of the locations.

Hi @tschottdorf ,
I know the reason, the proxy problem. I close it.

I'm having the same issue. what proxy problem could I be having? I can ping httpredir.debian.org from the host (the environment from which I run docker) but in building an image I get the same errors. I'm running this on brand new installation of Ubuntu 14.04 LTS

So you can ping httpredir.debian.org but are getting Could not resolve 'httpredir.debian.org' errors?

yes, I can ping that host but apparently whilst doing a docker build the host name is not available... I've pasted the output here: http://pastebin.com/1dAjy9vb

Can you ping that host from inside a docker container?
On Mar 22, 2016 18:07, "wintersylf" [email protected] wrote:

yes, I can ping that host but apparently whilst doing a docker build the
host name is not available... I've pasted the output here:
http://pastebin.com/1dAjy9vb

—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/cockroachdb/cockroach/issues/1716#issuecomment-200052268

docker run -it ubuntu bash and I can't ping it. a look at /etc/resolv.conf indicates that the only name server is that of my VPN

You've reached the end of my docker knowledge. Perhaps it's time to talk to
the docker folks.
On Mar 22, 2016 18:18, "wintersylf" [email protected] wrote:

docker run -it ubuntu bash and I can't ping it. a look at /etc/resolv.conf
indicates that the only name server is that of my VPN

—
You are receiving this because you commented.
Reply to this email directly or view it on GitHub
https://github.com/cockroachdb/cockroach/issues/1716#issuecomment-200057535

thanks tamird. I guess I'll hope someone else responds. for the sake of anyone looking at this. here's what dig reports from the docker host:

$ dig @10.4.0.1 httpredir.debian.org

; <<>> DiG 9.9.5-3ubuntu0.8-Ubuntu <<>> @10.4.0.1 httpredir.debian.org
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 32722
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 5, ADDITIONAL: 9

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;httpredir.debian.org.      IN  A

;; ANSWER SECTION:
httpredir.debian.org.   300 IN  A   176.9.184.93
httpredir.debian.org.   300 IN  A   5.153.231.35
httpredir.debian.org.   300 IN  A   128.31.0.66

;; AUTHORITY SECTION:
debian.org.     3535    IN  NS  debian1.dnsnode.net.
debian.org.     3535    IN  NS  dns4.easydns.info.
debian.org.     3535    IN  NS  sec2.rcode0.net.
debian.org.     3535    IN  NS  sec1.rcode0.net.
debian.org.     3535    IN  NS  dns1.easydns.com.

;; ADDITIONAL SECTION:
dns1.easydns.com.   7787    IN  A   64.68.192.10
dns1.easydns.com.   7787    IN  AAAA    2001:1838:f001::10
dns4.easydns.info.  20622   IN  A   194.0.2.19
dns4.easydns.info.  20622   IN  AAAA    2001:678:5::13
sec1.rcode0.net.    143896  IN  A   192.174.68.100
sec1.rcode0.net.    143896  IN  AAAA    2001:67c:1bc::100
sec2.rcode0.net.    143896  IN  A   176.97.158.100
sec2.rcode0.net.    143896  IN  AAAA    2001:67c:10b8::100

;; Query time: 183 msec
;; SERVER: 10.4.0.1#53(10.4.0.1)
;; WHEN: Tue Mar 22 15:22:23 PDT 2016
;; MSG SIZE  rcvd: 412

solved. norasky figured out that in /etc/default/docker the DOCKER_OPTS line could be commented out. after that, just restart the docker daemon sudo restart docker and done. worked for me!

Thanks @wintersylf!

On Tue, Mar 22, 2016, 20:10 wintersylf [email protected] wrote:

solved. norasky
https://norasky.wordpress.com/2015/06/09/docker-build-could-not-resolve/
figured out that in /etc/default/docker the DOCKER_OPTS line could be
commented out. after that, just restart the docker daemon sudo restart
docker and done. worked for me!

—
You are receiving this because you were mentioned.

Reply to this email directly or view it on GitHub
https://github.com/cockroachdb/cockroach/issues/1716#issuecomment-200089222

it's always good to leave a trail of crumbs. I spent a lot of time googling. maybe someone else will come across this. thanks for supporting this.

Must be something with google dns, I commented out the /etc/default/docker the DOCKER_OPTS line and restarted and boom it works.

Was this page helpful?
0 / 5 - 0 ratings