Coder Social home page Coder Social logo

bind EINVAL error about docker-dns HOT 3 CLOSED

bnfinet avatar bnfinet commented on August 29, 2024
bind EINVAL error

from docker-dns.

Comments (3)

bnfinet avatar bnfinet commented on August 29, 2024

fixed in docker-dns 0.2.6 which has just been published to npm

could you please try again and let me know how it goes?

from docker-dns.

CristianCantoro avatar CristianCantoro commented on August 29, 2024

Hi,
I have upgraded docker-dns from npm but I still get the same error.

[~/.docker-dns]$ npm install -g docker-dns
/home/cristian/.nvm/v0.11.14/bin/docker-dns -> /home/cristian/.nvm/v0.11.14/lib/node_modules/docker-dns/bin/docker-dns.js
[email protected] /home/cristian/.nvm/v0.11.14/lib/node_modules/docker-dns
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected]
├── [email protected] ([email protected], [email protected])
└── [email protected] ([email protected], [email protected])

Check that the installed version is correct.

$ docker-dns --version                                                      
util.puts: Use console.log instead
docker-dns version 0.2.6

Run docker-dns

[~/.docker-dns]$ ls
config.js  config.js.example  docker-dns
[~/.docker-dns]$ docker-dns --config config.js                                
[DD] info Loading config from /home/cristian/.docker-dns/config.js
[DD] info debuging enabled
[DD] debug public.dockerA new Dinspect for docker public.dockerA
[DD] debug public.dockerA getting containers for docker public.dockerA
[DD] debug public.dockerA inspecting 2 containers
[DD] debug e271fc9e7adc new containter object with uuid12: e271fc9e7adc
[DD] debug 77759268965c new containter object with uuid12: 77759268965c
[DD] debug ip  { internal: '', exposed: null }
[DD] debug e271fc9e7adc imgname: elegant_blackwell
[DD] debug e271fc9e7adc hostname: pippo
[DD] debug e271fc9e7adc services:  []
[DD] debug ip  { internal: '', exposed: null }
[DD] debug 77759268965c imgname: ambari-singlenode
[DD] debug 77759268965c hostname: amb0
[DD] debug 77759268965c ports:  8080/tcp [ { HostIp: '', HostPort: '' } ]
[DD] debug 77759268965c services:  [ { port: '',
    boundip: '',
    portproto: '8080/tcp',
    lookup: 
     { name: 'http-alt',
       port: 8080,
       proto: 'tcp',
       portproto: '8080/tcp' } } ]
[DD] debug back from inspection, off to build
[DD] debug e271fc9e7adc starting _buildAnCNAMERecords
[DD] debug e271fc9e7adc no ip, calling back
[DD] debug e271fc9e7adc done with A and CNAME records for local ip 
[DD] debug e271fc9e7adc starting _buildAnCNAMERecords
[DD] debug e271fc9e7adc no ip, calling back
[DD] debug e271fc9e7adc done with A and CNAME records for exposed ip null
[DD] debug e271fc9e7adc no service records
[DD] debug e271fc9e7adc done with SRVrecords
[DD] debug e271fc9e7adc all records built, calling back
[DD] debug public.dockerA _.union of records finished
[DD] debug 77759268965c starting _buildAnCNAMERecords
[DD] debug 77759268965c no ip, calling back
[DD] debug 77759268965c done with A and CNAME records for local ip 
[DD] debug 77759268965c starting _buildAnCNAMERecords
[DD] debug 77759268965c no ip, calling back
[DD] debug 77759268965c done with A and CNAME records for exposed ip null
[DD] debug service port or bound ip missing:  { port: '',
  boundip: '',
  portproto: '8080/tcp',
  lookup: 
   { name: 'http-alt',
     port: 8080,
     proto: 'tcp',
     portproto: '8080/tcp' } }
[DD] debug 77759268965c calling back from _buildSRVRecords
[DD] debug 77759268965c done with SRVrecords
[DD] debug 77759268965c all records built, calling back
[DD] debug public.dockerA _.union of records finished
[DD] info public.dockerA built records
[DD] debug back from build, deliver recs to dns server
[DD] info loading new dns records
[DD] info docker-dns initialized
events.js:85
      throw er; // Unhandled 'error' event
            ^
Error: bind EINVAL
    at exports._errnoException (util.js:742:11)
    at dgram.js:222:28
    at dns.js:82:18
    at process._tickCallback (node.js:372:11)

Funnily enough, launching with the relative path gives me an error:

$ docker-dns --config ./config.js                                                                                                                                                      
[DD] info Loading config from ./config.js
module.js:338
    throw err;
          ^
Error: Cannot find module './config.js'
    at Function.Module._resolveFilename (module.js:336:15)
    at Function.Module._load (module.js:278:25)
    at Module.require (module.js:365:17)
    at require (module.js:384:17)
    at configureApp (/home/cristian/.nvm/v0.11.14/lib/node_modules/docker-dns/bin/docker-dns.js:55:16)
    at main (/home/cristian/.nvm/v0.11.14/lib/node_modules/docker-dns/bin/docker-dns.js:71:2)
    at Object.<anonymous> (/home/cristian/.nvm/v0.11.14/lib/node_modules/docker-dns/bin/docker-dns.js:141:1)
    at Module._compile (module.js:460:26)
    at Object.Module._extensions..js (module.js:478:10)
    at Module.load (module.js:355:32)

from docker-dns.

bnfinet avatar bnfinet commented on August 29, 2024

I can reproduce your results using nvm, but I'm not in a position to start
supporting the v.0.11 development version of nodejs

once v0.12 drops I'll start looking at porting the code, but of course,
only after the dependent libraries are ready.

for the time being, docker-dns works well with v0.10.33

That said, patches are welcome :)

from docker-dns.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.