-
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
Error on startup #2
Comments
Thanks for the report Alex, How are you running docker-dns? Is it from the published docker container at https://registry.hub.docker.com/u/bfoote/docker-dns/ or is it from source here? Could please you post your config file, your OS and in the case of the docker instance how you called |
Hi, my config looks the following: var config = {};
config.development = true;
config.debug = false;
// a fake top level domain
// appended to all generated hostnames
config.faketld = "local";
// frequency of dns entry refresh from docker containers
config.pollinterval = 17 * 1000;
// multiple dockers can be configured
// each one should gets it's own namespace
// hostname.publicname.faketld
config.dockers = [{
// for 'publicly' exposed ports
// when a service is offered on '0.0.0.0'
// this is the IP lookups will return
publicip: "10.20.0.100",
// the public name is to give this docker instance it's own namespace
publicname: "public.docker",
// the local name is to provide a namespace for routing 172.17.0.0 addresses
localname: "local.docker",
// dockerode config
// see: https://github.com/apocas/dockerode
// and http://docs.docker.io/en/latest/use/basics/#bind-docker
dockerode: {
socketPath: '/var/run/docker.sock'
}
}];
// node-named config
// see: https://github.com/trevoro/node-named
// bindip is for this container only, not docker-wide
config.node_named = {
port: 53,
bindip: '0.0.0.0'
};
module.exports = config; I cloned the git repository form here (github) and used build_docker.sh (sudo ./build_docker.sh) and run_docker.sh (sudo ./run_docker.sh local config/config.js). Edit: Os is Ubuntu 14.10 and I used the latest docker version from the docker repository not the Ubuntu one. Greetings, |
I've just cloned a fresh copy, built a fresh container and run it using your config and it worked well for me. Could you try since Does Cheers, ben Edit: just saw your edit wrt Ubuntu 14.10, thanks |
I already tried that, but I have no |
I also tried just now
and got a valid json response. |
If I install it directly on the host with npm it seems to work. Very strange... seems that the /var/run/docker.sock is not mapped correctly to the container or something like that. |
I saw the permissions for
at In addition |
aha! nice find I was about to ask you to run and then once at the bash prompt run
I'll document that here in case anyone else comes along.
Thanks! |
I notice that there was one question left. Yes my user is part of the docker group. |
Thanks again Alex, closing this. Please do let me know how it goes! |
Hi Ben,
I'm getting the following error in the logs:
/opt/docker-dns/lib/docker-inspect.js:78 self.log.debug(self.name, "inspecting " + containers.length +" containers"); ^ TypeError: Cannot read property 'length' of null at /opt/docker-dns/lib/docker-inspect.js:78:55 at /opt/docker-dns/node_modules/dockerode/lib/docker.js:192:5 at Modem.buildPayload (/opt/docker-dns/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:154:19) at ClientRequest.<anonymous> (/opt/docker-dns/node_modules/dockerode/node_modules/docker-modem/lib/modem.js:139:10) at ClientRequest.emit (events.js:95:17) at Socket.socketErrorListener (http.js:1551:9) at Socket.emit (events.js:95:17) at net.js:440:14 at process._tickCallback (node.js:419:13) [DD] info Loading config from /opt/docker-dns/config/config.js
My docker version is 1.3.2.
Greetings,
Alex
The text was updated successfully, but these errors were encountered: