node icon indicating copy to clipboard operation
node copied to clipboard

unable to connect to remote host with ipv6 address

Open devdil opened this issue 10 years ago • 3 comments

Version: 0.10.25 Platform:Liux 3.19.0-25-generic Ubuntu 14.04.1 2015 x86_64 GNU/Linux

Tried out this following snippet :

require('net').connect(22, 'fe80:0:0:0:9f18:e22a:e52e:1ae6%eth0').on('connect', function() {
  console.log('Connected');
  this.end();
});

Reported with following error message:

Error: connect EINVAL
    at errnoException (net.js:901:11)
    at connect (net.js:764:19)
    at net.js:842:9
    at dns.js:72:18
    at process._tickCallback (node.js:415:13)
    at Function.Module.runMain (module.js:499:11)
    at startup (node.js:119:16)
    at node.js:902:3

cc: @mscdex

devdil avatar Nov 03 '16 12:11 devdil

v0.10 doesn't support link-local addresses and never will because it's EOL. Upgrade to v4.x or newer and it should work.

bnoordhuis avatar Nov 03 '16 13:11 bnoordhuis

@devdil Looking at the issue you linked in mcsdex/ssh2, it looks like you might be using v6.7.0, if that's the case feel free to comment in here explaining that!

gibfahn avatar Nov 03 '16 16:11 gibfahn

It works fine now tested

devdil avatar Nov 03 '16 17:11 devdil