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

if start nsqjs ( nsq runnig locally) Error: getaddrinfo ENOTFOUND s-MacBook-Air.local s-MacBook-Air.local:4150 at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26) #248

Closed
triesa opened this issue Oct 2, 2018 · 4 comments

Comments

@triesa
Copy link

triesa commented Oct 2, 2018

macOs Mojave if i have running docker for mac and starting nodejs with nsqjs i got.

      ^

Error: getaddrinfo ENOTFOUND s-MacBook-Air.local s-MacBook-Air.local:4150
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:67:26)
Emitted 'error' event at:
    at NSQDConnection.conn.on.err (/Users/z/project/node_modules/nsqjs/lib/reader.js:207:12)
    at NSQDConnection.emit (events.js:185:15)
    at ConnectionState.Enter (/Users/z/project/node_modules/nsqjs/lib/nsqdconnection.js:723:17)
    at EventEmitter.emit (events.js:180:13)
    at callback (/Users/z/project/node_modules/node-state/lib/nodestate.js:84:32)
    at ConnectionState.ERROR (/Users/z/project/node_modules/nsqjs/lib/nsqdconnection.js:786:14)
    at ConnectionState.NodeState.goto (/Users/z/project/node_modules/node-state/lib/nodestate.js:90:16)
    at Socket.conn.on.err (/Users/z/project/node_modules/nsqjs/lib/nsqdconnection.js:189:25)
    at Socket.emit (events.js:180:13)
    at emitErrorNT (internal/streams/destroy.js:64:8)
    at process._tickCallback (internal/process/next_tick.js:178:19)

nsq running locally

@triesa
Copy link
Author

triesa commented Oct 2, 2018

seems related nodejs/node#5436

@dudleycarr
Copy link
Owner

Make sure that s-MacBook-Air.local actually resolves for you. If it doesn't then, you need to specify the broadcast address that nsqd uses to advertise itself to lookupd.

@triesa
Copy link
Author

triesa commented Oct 6, 2018

@dudleycarr you mean i should check the s-MacBook-Air.local - ping?

Here is what inside nodejs:

const reader = new nsq.Reader('message', 'message_channel', {
  lookupdHTTPAddresses: '127.0.0.1:4161',
});

@triesa
Copy link
Author

triesa commented Oct 6, 2018

@dudleycarr how can i recognise which broadcast address the nsqd uses to advertise itself to loojupd? or i should to choose that address by myself?

I tried nsqd --max-msg-timeout=1800000 --lookupd-tcp-address=127.0.0.1:4160 --broadcast-address=192.168.0.102 .
but the result is same:

etaddrinfo ENOTFOUND s-MacBook-Air.local s-MacBook-Air.local:4150
    at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:57:26)
Emitted 'error' event at:

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

2 participants