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

Container urls not resolving #92

Closed
evancauwenberg opened this issue Jan 7, 2017 · 13 comments
Closed

Container urls not resolving #92

evancauwenberg opened this issue Jan 7, 2017 · 13 comments

Comments

@evancauwenberg
Copy link

Hi!

First of all thnx for creating this little application!

I have followed the steps to build and run the dnsdock from source, when i start the application it seems to work:

[evancauwenberg@MacBook-Pro-van-Evert ~/go/bin]$ ★ sudo ./dnsdock -v 14:19:31.129 | DEBUG ▶ Handling DNS requests for 'docker'. 14:19:56.019 | DEBUG ▶ Started container 'b34830d018bd6228449dc3b4d7bb5d3945e1ea233b1f9c764da3283097357111' 14:19:56.030 | DEBUG ▶ Added service: 'b34830d018bd6228449dc3b4d7bb5d3945e1ea233b1f9c764da3283097357111': {api test [172.17.0.2] %!s(int=-1) [test.docker]}. 14:19:56.031 | DEBUG ▶ Handling DNS requests for 'test.docker'.

I have added also the following file in the /etc/resolver/
docker
nameserver 172.17.0.2

But when i use dig *.docker i don't receive the expected output:
`[evancauwenberg@MacBook-Pro-van-Evert ~]$
★ dig *.docker

; <<>> DiG 9.8.3-P1 <<>> *.docker
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 1140
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;*.docker. IN A

;; AUTHORITY SECTION:
. 86392 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2017010700 1800 900 604800 86400

;; Query time: 22 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Sat Jan 7 14:23:36 2017
;; MSG SIZE rcvd: 101`

Thnx in advance!

@aacebedo
Copy link
Owner

aacebedo commented Jan 7, 2017

Hi !
Great that dnsdock is useful to you !
I am not the original creator of the app I just took over for the maintenace.
I am currently working on issue #91 so it may take some time before I process this issue.

From what I see from your log you have set the address of the container you've spawned as a nameserver, however you've launch dnsdock on your host so you shall add 127.0.0.1 in your resolver file instead

@evancauwenberg
Copy link
Author

evancauwenberg commented Jan 7, 2017

Hi

Thnx for the quick response!

I have changed the nameserver to 127.0.0.1 and now i received the expected response, some debug output was dumped to!

I will try further, the url isn't working yet but i guess their is something wrong in the container itself.

Edit: still no succes, when i try to browse the urls i receive "ERR_NAME_NOT_RESOLVED"

Thnx in advance!

Kind regards
Evert

@aacebedo
Copy link
Owner

aacebedo commented Jan 7, 2017

I see that you are using a mac. Are you using docker toolbox or docker on mac ?

Another user had a network issue on mac because he was using docker on mac.
What is happening when you do a ping ?
Do you see the dns request when trying to access through your browser ?

@evancauwenberg
Copy link
Author

evancauwenberg commented Jan 7, 2017

Jeps i am working on a mac :)

this is the response from the ping request:
[evancauwenberg@MacBook-Pro-van-Evert ~/Projects/milker]$★ ping test.docker ping: cannot resolve bamboo.docker: Unknown host

@aacebedo
Copy link
Owner

aacebedo commented Jan 9, 2017

And when you execute dig with the address 127.0.0.1 are you receiving something?
What are the log of dnsdock (started with -v flag)?
Can you check issue #89 to be sure you don't have the same problem ?

@evancauwenberg
Copy link
Author

evancauwenberg commented Jan 9, 2017

`
★ dig 127.0.0.1

; <<>> DiG 9.8.3-P1 <<>> 127.0.0.1
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 16964
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;127.0.0.1. IN A

;; AUTHORITY SECTION:
. 80001 IN SOA a.root-servers.net. nstld.verisign-grs.com. 2017010900 1800 900 604800 86400

;; Query time: 27 msec
;; SERVER: 8.8.8.8#53(8.8.8.8)
;; WHEN: Mon Jan 9 11:35:29 2017
;; MSG SIZE rcvd: 102
`

[evancauwenberg@MacBook-Pro-van-Evert ~/go/bin]$ ★ sudo ./dnsdock -v Password: 15:42:04.119 | DEBUG ▶ Handling DNS requests for 'docker'. 15:42:04.127 | DEBUG ▶ Added service: '6df47ae583568235ccd86ff094de8f782d28316aaf5c4e09902c13c80472871c': {temp_nginx_1 nginx [172.17.0.4] %!s(int=-1) [test.docker]}. 15:42:04.127 | DEBUG ▶ Handling DNS requests for 'test.docker'. 15:42:04.129 | DEBUG ▶ Added service: a2f43b78fec7105807457cb9bada2a19d2454d62cb594c1dd22c0568b3f5dd22': {temp_php_1 php [172.17.0.2] %!s(int=-1) []}. 15:42:04.131 | DEBUG ▶ Added service: 'af6d1f137eb50a131c1f6656f9fa24630f596779a014260828305ae2e0835a32': {temp_mysql_1 mysql [172.17.0.3] %!s(int=-1) [mysql.test.docker]}. 15:42:04.131 | DEBUG ▶ Handling DNS requests for 'mysql.test.docker'.

I will check issue 89 :)

@evancauwenberg
Copy link
Author

evancauwenberg commented Jan 10, 2017

`ERROR: for api Cannot start service api: invalid header field value "oci runtime error: container_linux.go:247: starting container process caused "exec: \"/app/docker/apache/run.sh\": stat /app/docker/apache/run.sh: no such file or directory"\n"

ERROR: for dnsdock Cannot start service dnsdock: driver failed programming external connectivity on endpoint test_dnsdock_1 (9886cba2805d1e91fb20c31e6ea152d8609e33ee5b2d978aa2649b7e6543901e): Error starting userland proxy: Bind for 172.20.200.1:53: unexpected error (Failure EADDRNOTAVAIL)
ERROR: Encountered errors while bringing up the project.`

I have tried the solution given in #89 .. the only difference is that i'm using the native docker.
https://www.docker.com/products/docker#/mac

@aacebedo
Copy link
Owner

Docker for Mac has some issues on the netwoking aspect. This bug is not related to dnsdock
Please use a linux VM or switch to docker toolbox

@evancauwenberg
Copy link
Author

Oooh oke, i will try that later today .. thnx for the quick response!

@wclr
Copy link

wclr commented Jan 11, 2017

@evancauwenberg
What command (or config) do you use to start dnsdock container?

@aacebedo
nice to hear that you are working on the issues, waiting for the release.

@evancauwenberg
Copy link
Author

@whitecolor .. tried it via docker-compose or just the native binary

./dnsdock

@wclr
Copy link

wclr commented Jan 11, 2017

@evancauwenberg show your docker-compose config for launching service? With docker for mac/windows you need to map docker.sock: -v /var/run/docker.sock:/var/run/docker.sock

@aacebedo aacebedo closed this as completed Mar 5, 2017
@aacebedo
Copy link
Owner

aacebedo commented Mar 5, 2017

Closing the issue as no activity has been registered since one month

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

3 participants