-
Notifications
You must be signed in to change notification settings - Fork 9
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
TypeError: Cannot read property 'length' of null #5
Comments
Thanks for the report(s)! Could you please add the
Thanks! |
Hi @bnfinet, that seems to make some difference, here's what I get: [~/.docker-dns/docker-dns]$ docker run -d -t \
> --privileged=true \
> --name docker-dns -p 172.17.42.1:53:53/udp \
> -v /var/run/docker.sock:/var/run/docker.sock \
> -v /home/cristian/.docker-dns/docker-dns/docker/log:/var/log/supervisor \
> -v /home/cristian/.docker-dns/docker-dns/docker/./config/config.js:/opt/docker-dns/config/config.js \
> bfoote/docker-dns
83998f152f1001ce41fce0772c5da78d65e9ae4504c00019f7d0b6d700b834f1 and [~/.docker-dns/docker-dns]$ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
83998f152f10 bfoote/docker-dns:latest "supervisord -n" 6 seconds ago Up 5 seconds 172.17.42.1:53->53/udp docker-dns Running the two commands you suggest to run in the helper text of your [~/.docker-dns/docker-dns]$ dig -t SRV \* @172.17.42.1
;; Warning: Message parser reports malformed message packet.
; <<>> DiG 9.9.5-4.3ubuntu0.1-Ubuntu <<>> -t SRV * @172.17.42.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44135
;; flags: qr rd ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;*. IN SRV
;; ANSWER SECTION:
*. 5 IN SRV 0 10 53 83998f152f10.local.dockerA.docker.local.
*. 5 IN SRV 0 10 53 83998f152f10.public.dockerA.docker.local.
;; Query time: 7 msec
;; SERVER: 172.17.42.1#53(172.17.42.1)
;; WHEN: Mon Dec 15 09:56:35 CET 2014
;; MSG SIZE rcvd: 140 and [~/.docker-dns/docker-dns]$ dig -t SRV _domain._udp\* @172.17.42.1 [master]
;; Warning: Message parser reports malformed message packet.
; <<>> DiG 9.9.5-4.3ubuntu0.1-Ubuntu <<>> -t SRV _domain._udp* @172.17.42.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4162
;; flags: qr rd ad; QUERY: 1, ANSWER: 2, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;_domain._udp*. IN SRV
;; ANSWER SECTION:
_domain._udp*. 5 IN SRV 0 10 53 83998f152f10.local.dockerA.docker.local.
_domain._udp*. 5 IN SRV 0 10 53 83998f152f10.public.dockerA.docker.local.
;; Query time: 0 msec
;; SERVER: 172.17.42.1#53(172.17.42.1)
;; WHEN: Mon Dec 15 09:59:11 CET 2014
;; MSG SIZE rcvd: 176 The problem then, as I see it, is the following: $ ping 83998f152f10.public.dockerA.docker.local
ping: unknown host 83998f152f10.public.dockerA.docker.local and if I start some containers I cannot ping them. For example: $ docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e271fc9e7adc cristiancantoro/hadoop-mrjob:latest "/etc/bootstrap.sh - 8 minutes ago Up 8 minutes 50010/tcp, 50020/tcp, 8030/tcp, 50070/tcp, 50075/tcp, 22/tcp, 8088/tcp, 8033/tcp, 49707/tcp, 50090/tcp, 8031/tcp, 8040/tcp, 8042/tcp, 8032/tcp elegant_blackwell
77759268965c sequenceiq/ambari:1.6.0 "/usr/local/serf/bin 13 minutes ago Up 13 minutes 7373/tcp, 7946/tcp, 0.0.0.0:49153->8080/tcp ambari-singlenode
83998f152f10 bfoote/docker-dns:latest "supervisord -n" 16 minutes ago Up 16 minutes 172.17.42.1:53->53/udp docker-dns also executing the two dig commands above I still get the same result. Is this right? |
in order to ping /etc/resolv.conf
then:
make sure these may be helpful: |
@CristianCantoro did that help any? |
closing |
Hi, I'm sorry for not giving a reply earlier. After editing
and if I start another container
then I can ping it as well:
But (and that's quite a big but) if I do so I lost the ability to resolve domains from the internet so if I ping, say, [google.com] this is what I get:
I need to have this line in my (host's)
but if I put it there then everything else stops working and I can not ping Furthermore it seems that my conrtainers have lost the ability to resolve urls, for example if I do (in the container above named
but the container is able to contact the internet using IP addresses (
Also, I can not find a way to restore the ability of my containers to resolve urls. |
Hello again! docker-dns is not a "forwarding dns resolver" Any domain names which docker-dns does not know about will not resolv. Before showing you a couple options I'll add the caveat that dns setups can be tricky and what might work in one environment may not work in another. add multiple dns servers to /etc/hosts
run a more robust dns server in front of docker-dns such as dnsmasqadd these lines to dnsmasq
In addition you should have an understanding of how the dns environment get constructed inside the containers.... The I had thought of providing dns forwarding features in Please do post back here to share your ventures. |
A quick update. Following the advice in this AskUbuntu post I disabled Here's how my new
(unitn.it is the network of my university where I am now). Then I added the following:
and both local and external DNS resolution work.
The last question that I have is: how can I configure everything such taht I do not have to modify manually |
this is one of the tricky parts your /etc/resolv.conf is getting manipulated by |
(I have seen now the answer you posted while I was writing my other comment. I will try to firstly understand it 😅 and then try again). |
I think that the easiest solution is to add the line:
to the file:
In this way the NetworkManager produces a (/etc/) For completeness, ,my attempt at configuring
in a file called My last point would be to point out that I cannot ping a container (say |
Steps to reproduce
Using Docker version 1.3.2, build 39fa2fa
Outpt
The logfile contains
The text was updated successfully, but these errors were encountered: