Skip to content
This repository has been archived by the owner. It is now read-only.

npm install does not work on an IPv6 only network #6857

Closed
igalic opened this Issue Dec 5, 2014 · 16 comments

Comments

Projects
None yet
5 participants
@igalic
Copy link

igalic commented Dec 5, 2014

our backends are only available over IPv6, because we're poor and can't afford IPv4 addresses.
npm install doesn't work:

root@app01:~# npm install -g bower
npm ERR! Linux 3.13.0-40-generic
npm ERR! argv "node" "/usr/bin/npm" "install" "-g" "bower"
npm ERR! node v0.10.33
npm ERR! npm  v2.1.11
npm ERR! code ENETUNREACH
npm ERR! errno ENETUNREACH
npm ERR! syscall connect

npm ERR! connect ENETUNREACH
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /root/npm-debug.log
root@app01:~#

here's how we resolve registry.npmjs.org using the third-party NAT64/DNS64 service:

root@app01:~# cat /etc/resolv.conf 
# File managed by puppet

domain esat
nameserver 2001:778::37
root@app01:~# getent hosts registry.npmjs.org
2001:778:0:ffff:64:0:b91f:11a2 a.sni.fastly.net registry.npmjs.org
root@app01:~#

and, curl works:

root@app01:~# curl https://registry.npmjs.org/
{"db_name":"registry","doc_count":116425,"doc_del_count":378,"update_seq":301743,"purge_seq":0,"compact_running":false,"disk_size":842129531,"data_size":419550252,"instance_start_time":"1413839504850820","disk_format_version":6,"committed_update_seq":301743}
root@app01:~# 

n.b.: this setup has worked for other hosts that are IPv4 only, such as github, apt.postgresql.org and ppa.launchpad.com — on a variety of protocols (http/s, git, ssh), with a variety of programs.

@othiym23 othiym23 added the support label Dec 5, 2014

@othiym23

This comment has been minimized.

Copy link
Contributor

othiym23 commented Dec 6, 2014

Our CDN does not support IPv6, so bamboozling your name servers into returning an address that works for them is a nice hack – good job!

npm doesn't do anything special at the transport layer (it defers things to request), so if there's a way to address this, it's probably going to be at the Node layer. I know that there have been at least a few patches landed on the 0.12 branch that improve Node's support for IPv6 stacks. Does switching to Node 0.11.14 still fail? If it doesn't, we can look at what knobs and levers are available to us in trying to you, but this is fundamentally an issue with how Node itself deals with IPv6, so we may not be able to solve it with changes to npm.

@igalic

This comment has been minimized.

Copy link
Author

igalic commented Dec 6, 2014

Thank you for this swift reply!

First of all, before upgrading node to an unstable version which i'd have to compile myself because the options documented will only get me stable, i'd like to point out that before upgrading npm manually it actually gave more info:

root@app01:~# /usr/bin/npm install --global bower
npm ERR! Error: connect ENETUNREACH
npm ERR!     at errnoException (net.js:904:11)
npm ERR!     at connect (net.js:766:19)
npm ERR!     at net.js:845:9
npm ERR!     at asyncCallback (dns.js:68:16)
npm ERR!     at Object.onanswer [as oncomplete] (dns.js:121:9)
npm ERR! If you need help, you may report this *entire* log,
npm ERR! including the npm and node versions, at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! System Linux 3.13.0-40-generic
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "--global" "bower"
npm ERR! cwd /root
npm ERR! node -v v0.10.33
npm ERR! npm -v 1.4.28
npm ERR! syscall connect
npm ERR! code ENETUNREACH
npm ERR! errno ENETUNREACH
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /root/npm-debug.log
npm ERR! not ok code 0
root@app01:~#
@igalic

This comment has been minimized.

Copy link
Author

igalic commented Dec 6, 2014

it would appear that the debug log says the same thing:

0 info it worked if it ends with ok
1 verbose cli [ 'node', '/usr/bin/npm', 'install', '-g', 'bower' ]
2 info using npm@2.1.11
3 info using node@v0.10.33
4 verbose node symlink /usr/bin/node
13 silly mapToRegistry using default registry
14 silly mapToRegistry registry https://registry.npmjs.org/
15 silly mapToRegistry uri https://registry.npmjs.org/bower
16 verbose addNameRange registry:https://registry.npmjs.org/bower not in flight; fetching
17 verbose request uri https://registry.npmjs.org/bower
18 verbose request no auth needed
19 info attempt registry request try #1 at 05:18:39
20 verbose request id 2f8d1d2e82de2a49
21 http request GET https://registry.npmjs.org/bower
22 info retry will retry, error on last attempt: Error: connect ENETUNREACH
23 info attempt registry request try #2 at 05:18:50
24 http request GET https://registry.npmjs.org/bower
25 info retry will retry, error on last attempt: Error: connect ENETUNREACH
26 info attempt registry request try #3 at 05:19:50
27 http request GET https://registry.npmjs.org/bower
28 verbose stack Error: connect ENETUNREACH
28 verbose stack     at errnoException (net.js:904:11)
28 verbose stack     at connect (net.js:766:19)
28 verbose stack     at net.js:845:9
28 verbose stack     at asyncCallback (dns.js:68:16)
28 verbose stack     at Object.onanswer [as oncomplete] (dns.js:121:9)
29 verbose cwd /root
30 error Linux 3.13.0-40-generic
31 error argv "node" "/usr/bin/npm" "install" "-g" "bower"
32 error node v0.10.33
33 error npm  v2.1.11
34 error code ENETUNREACH
35 error errno ENETUNREACH
36 error syscall connect
37 error connect ENETUNREACH
38 error If you need help, you may report this error at:
38 error     <http://github.com/npm/npm/issues>
39 verbose exit [ 1, true ]
@igalic

This comment has been minimized.

Copy link
Author

igalic commented Dec 6, 2014

to confirm this here, and not just on IRC:

installing nodejs 0.11.14 makes it work!


thanks everyone!

@igalic igalic closed this Dec 6, 2014

@jvmvik

This comment has been minimized.

Copy link

jvmvik commented Mar 14, 2015

This issue is back in the latest release: 2.5.1 / 0.12.0

0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node', '/usr/bin/npm', 'install' ]
2 info using npm@2.5.1
3 info using node@v0.12.0
4 verbose node symlink /usr/bin/node
5 verbose install where, deps [ '/home/victor/apps/wedding',
5 verbose install   [ 'body-parser',
5 verbose install     'cookie-parser',
5 verbose install     'debug',
5 verbose install     'express',
5 verbose install     'express-csv',
5 verbose install     'jade',
5 verbose install     'jspl',
5 verbose install     'morgan',
5 verbose install     'nedb',
5 verbose install     'static-favicon' ] ]
6 verbose install where, peers [ '/home/victor/apps/wedding', [] ]
7 info preinstall site@0.0.1
8 silly cache add args [ 'debug@~0.7.4', null ]
9 verbose cache add spec debug@~0.7.4
10 silly cache add parsed spec { raw: 'debug@~0.7.4',
10 silly cache add   scope: null,
10 silly cache add   name: 'debug',
10 silly cache add   rawSpec: '~0.7.4',
10 silly cache add   spec: '>=0.7.4 <0.8.0',
10 silly cache add   type: 'range' }
11 verbose addNamed debug@>=0.7.4 <0.8.0
12 silly addNamed semver.valid null
13 silly addNamed semver.validRange >=0.7.4 <0.8.0
14 silly addNameRange { name: 'debug', range: '>=0.7.4 <0.8.0', hasData: false }
15 silly mapToRegistry name debug
16 silly mapToRegistry using default registry
17 silly mapToRegistry registry https://registry.npmjs.org/
18 silly mapToRegistry uri https://registry.npmjs.org/debug
19 verbose addNameRange registry:https://registry.npmjs.org/debug not in flight; fetching
20 silly cache add args [ 'express@~4.2.0', null ]
21 verbose cache add spec express@~4.2.0
22 silly cache add parsed spec { raw: 'express@~4.2.0',
22 silly cache add   scope: null,
22 silly cache add   name: 'express',
22 silly cache add   rawSpec: '~4.2.0',
22 silly cache add   spec: '>=4.2.0 <4.3.0',
22 silly cache add   type: 'range' }
23 verbose addNamed express@>=4.2.0 <4.3.0
24 silly addNamed semver.valid null
25 silly addNamed semver.validRange >=4.2.0 <4.3.0
26 silly addNameRange { name: 'express', range: '>=4.2.0 <4.3.0', hasData: false }
27 silly mapToRegistry name express
28 silly mapToRegistry using default registry
29 silly mapToRegistry registry https://registry.npmjs.org/
30 silly mapToRegistry uri https://registry.npmjs.org/express
31 verbose addNameRange registry:https://registry.npmjs.org/express not in flight; fetching
32 silly cache add args [ 'express-csv@^0.6.0', null ]
33 verbose cache add spec express-csv@^0.6.0
34 silly cache add parsed spec { raw: 'express-csv@^0.6.0',
34 silly cache add   scope: null,
34 silly cache add   name: 'express-csv',
34 silly cache add   rawSpec: '^0.6.0',
34 silly cache add   spec: '>=0.6.0 <0.7.0',
34 silly cache add   type: 'range' }
35 verbose addNamed express-csv@>=0.6.0 <0.7.0
36 silly addNamed semver.valid null
37 silly addNamed semver.validRange >=0.6.0 <0.7.0
38 silly addNameRange { name: 'express-csv', range: '>=0.6.0 <0.7.0', hasData: false }
39 silly mapToRegistry name express-csv
40 silly mapToRegistry using default registry
41 silly mapToRegistry registry https://registry.npmjs.org/
42 silly mapToRegistry uri https://registry.npmjs.org/express-csv
43 verbose addNameRange registry:https://registry.npmjs.org/express-csv not in flight; fetching
44 silly cache add args [ 'jade@~1.3.0', null ]
45 verbose cache add spec jade@~1.3.0
46 silly cache add parsed spec { raw: 'jade@~1.3.0',
46 silly cache add   scope: null,
46 silly cache add   name: 'jade',
46 silly cache add   rawSpec: '~1.3.0',
46 silly cache add   spec: '>=1.3.0 <1.4.0',
46 silly cache add   type: 'range' }
47 verbose addNamed jade@>=1.3.0 <1.4.0
48 silly addNamed semver.valid null
49 silly addNamed semver.validRange >=1.3.0 <1.4.0
50 silly addNameRange { name: 'jade', range: '>=1.3.0 <1.4.0', hasData: false }
51 silly mapToRegistry name jade
52 silly mapToRegistry using default registry
53 silly mapToRegistry registry https://registry.npmjs.org/
54 silly mapToRegistry uri https://registry.npmjs.org/jade
55 verbose addNameRange registry:https://registry.npmjs.org/jade not in flight; fetching
56 silly cache add args [ 'jspl@0.0.4', null ]
57 verbose cache add spec jspl@0.0.4
58 silly cache add parsed spec { raw: 'jspl@0.0.4',
58 silly cache add   scope: null,
58 silly cache add   name: 'jspl',
58 silly cache add   rawSpec: '0.0.4',
58 silly cache add   spec: '0.0.4',
58 silly cache add   type: 'version' }
59 verbose addNamed jspl@0.0.4
60 silly addNamed semver.valid 0.0.4
61 silly addNamed semver.validRange 0.0.4
62 silly mapToRegistry name jspl
63 silly mapToRegistry using default registry
64 silly mapToRegistry registry https://registry.npmjs.org/
65 silly mapToRegistry uri https://registry.npmjs.org/jspl
66 verbose addNameVersion registry:https://registry.npmjs.org/jspl not in flight; fetching
67 silly cache add args [ 'morgan@~1.0.0', null ]
68 verbose cache add spec morgan@~1.0.0
69 silly cache add parsed spec { raw: 'morgan@~1.0.0',
69 silly cache add   scope: null,
69 silly cache add   name: 'morgan',
69 silly cache add   rawSpec: '~1.0.0',
69 silly cache add   spec: '>=1.0.0 <1.1.0',
69 silly cache add   type: 'range' }
70 verbose addNamed morgan@>=1.0.0 <1.1.0
71 silly addNamed semver.valid null
72 silly addNamed semver.validRange >=1.0.0 <1.1.0
73 silly addNameRange { name: 'morgan', range: '>=1.0.0 <1.1.0', hasData: false }
74 silly mapToRegistry name morgan
75 silly mapToRegistry using default registry
76 silly mapToRegistry registry https://registry.npmjs.org/
77 silly mapToRegistry uri https://registry.npmjs.org/morgan
78 verbose addNameRange registry:https://registry.npmjs.org/morgan not in flight; fetching
79 silly cache add args [ 'nedb@^1.1.1', null ]
80 verbose cache add spec nedb@^1.1.1
81 silly cache add parsed spec { raw: 'nedb@^1.1.1',
81 silly cache add   scope: null,
81 silly cache add   name: 'nedb',
81 silly cache add   rawSpec: '^1.1.1',
81 silly cache add   spec: '>=1.1.1 <2.0.0',
81 silly cache add   type: 'range' }
82 verbose addNamed nedb@>=1.1.1 <2.0.0
83 silly addNamed semver.valid null
84 silly addNamed semver.validRange >=1.1.1 <2.0.0
85 silly addNameRange { name: 'nedb', range: '>=1.1.1 <2.0.0', hasData: false }
86 silly mapToRegistry name nedb
87 silly mapToRegistry using default registry
88 silly mapToRegistry registry https://registry.npmjs.org/
89 silly mapToRegistry uri https://registry.npmjs.org/nedb
90 verbose addNameRange registry:https://registry.npmjs.org/nedb not in flight; fetching
91 silly cache add args [ 'static-favicon@~1.0.0', null ]
92 verbose cache add spec static-favicon@~1.0.0
93 silly cache add parsed spec { raw: 'static-favicon@~1.0.0',
93 silly cache add   scope: null,
93 silly cache add   name: 'static-favicon',
93 silly cache add   rawSpec: '~1.0.0',
93 silly cache add   spec: '>=1.0.0 <1.1.0',
93 silly cache add   type: 'range' }
94 verbose addNamed static-favicon@>=1.0.0 <1.1.0
95 silly addNamed semver.valid null
96 silly addNamed semver.validRange >=1.0.0 <1.1.0
97 silly addNameRange { name: 'static-favicon',
97 silly addNameRange   range: '>=1.0.0 <1.1.0',
97 silly addNameRange   hasData: false }
98 silly mapToRegistry name static-favicon
99 silly mapToRegistry using default registry
100 silly mapToRegistry registry https://registry.npmjs.org/
101 silly mapToRegistry uri https://registry.npmjs.org/static-favicon
102 verbose addNameRange registry:https://registry.npmjs.org/static-favicon not in flight; fetching
103 silly cache add args [ 'body-parser@~1.0.0', null ]
104 verbose cache add spec body-parser@~1.0.0
105 silly cache add parsed spec { raw: 'body-parser@~1.0.0',
105 silly cache add   scope: null,
105 silly cache add   name: 'body-parser',
105 silly cache add   rawSpec: '~1.0.0',
105 silly cache add   spec: '>=1.0.0 <1.1.0',
105 silly cache add   type: 'range' }
106 verbose addNamed body-parser@>=1.0.0 <1.1.0
107 silly addNamed semver.valid null
108 silly addNamed semver.validRange >=1.0.0 <1.1.0
109 silly addNameRange { name: 'body-parser', range: '>=1.0.0 <1.1.0', hasData: false }
110 silly mapToRegistry name body-parser
111 silly mapToRegistry using default registry
112 silly mapToRegistry registry https://registry.npmjs.org/
113 silly mapToRegistry uri https://registry.npmjs.org/body-parser
114 verbose addNameRange registry:https://registry.npmjs.org/body-parser not in flight; fetching
115 silly cache add args [ 'cookie-parser@~1.0.1', null ]
116 verbose cache add spec cookie-parser@~1.0.1
117 silly cache add parsed spec { raw: 'cookie-parser@~1.0.1',
117 silly cache add   scope: null,
117 silly cache add   name: 'cookie-parser',
117 silly cache add   rawSpec: '~1.0.1',
117 silly cache add   spec: '>=1.0.1 <1.1.0',
117 silly cache add   type: 'range' }
118 verbose addNamed cookie-parser@>=1.0.1 <1.1.0
119 silly addNamed semver.valid null
120 silly addNamed semver.validRange >=1.0.1 <1.1.0
121 silly addNameRange { name: 'cookie-parser',
121 silly addNameRange   range: '>=1.0.1 <1.1.0',
121 silly addNameRange   hasData: false }
122 silly mapToRegistry name cookie-parser
123 silly mapToRegistry using default registry
124 silly mapToRegistry registry https://registry.npmjs.org/
125 silly mapToRegistry uri https://registry.npmjs.org/cookie-parser
126 verbose addNameRange registry:https://registry.npmjs.org/cookie-parser not in flight; fetching
127 verbose request uri https://registry.npmjs.org/debug
128 verbose request no auth needed
129 info attempt registry request try #1 at 7:05:49 PM
130 verbose request id da294c5e3a2a4069
131 http request GET https://registry.npmjs.org/debug
132 verbose request uri https://registry.npmjs.org/express
133 verbose request no auth needed
134 info attempt registry request try #1 at 7:05:49 PM
135 http request GET https://registry.npmjs.org/express
136 verbose request uri https://registry.npmjs.org/express-csv
137 verbose request no auth needed
138 info attempt registry request try #1 at 7:05:49 PM
139 http request GET https://registry.npmjs.org/express-csv
140 verbose request uri https://registry.npmjs.org/jade
141 verbose request no auth needed
142 info attempt registry request try #1 at 7:05:49 PM
143 http request GET https://registry.npmjs.org/jade
144 verbose request uri https://registry.npmjs.org/jspl
145 verbose request no auth needed
146 info attempt registry request try #1 at 7:05:49 PM
147 http request GET https://registry.npmjs.org/jspl
148 verbose request uri https://registry.npmjs.org/morgan
149 verbose request no auth needed
150 info attempt registry request try #1 at 7:05:49 PM
151 http request GET https://registry.npmjs.org/morgan
152 verbose request uri https://registry.npmjs.org/nedb
153 verbose request no auth needed
154 info attempt registry request try #1 at 7:05:49 PM
155 http request GET https://registry.npmjs.org/nedb
156 verbose request uri https://registry.npmjs.org/static-favicon
157 verbose request no auth needed
158 info attempt registry request try #1 at 7:05:49 PM
159 http request GET https://registry.npmjs.org/static-favicon
160 verbose request uri https://registry.npmjs.org/body-parser
161 verbose request no auth needed
162 info attempt registry request try #1 at 7:05:49 PM
163 http request GET https://registry.npmjs.org/body-parser
164 verbose request uri https://registry.npmjs.org/cookie-parser
165 verbose request no auth needed
166 info attempt registry request try #1 at 7:05:49 PM
167 http request GET https://registry.npmjs.org/cookie-parser
168 info retry will retry, error on last attempt: Error: connect ENETUNREACH
169 info retry will retry, error on last attempt: Error: connect ENETUNREACH
170 info retry will retry, error on last attempt: Error: connect ENETUNREACH
171 info retry will retry, error on last attempt: Error: connect ENETUNREACH
172 info retry will retry, error on last attempt: Error: connect ENETUNREACH
173 info retry will retry, error on last attempt: Error: connect ENETUNREACH
174 info retry will retry, error on last attempt: Error: connect ENETUNREACH
175 info retry will retry, error on last attempt: Error: connect ENETUNREACH
176 info retry will retry, error on last attempt: Error: connect ENETUNREACH
177 info retry will retry, error on last attempt: Error: connect ENETUNREACH
178 info attempt registry request try #2 at 7:05:59 PM
179 http request GET https://registry.npmjs.org/debug
180 info attempt registry request try #2 at 7:05:59 PM
181 http request GET https://registry.npmjs.org/express-csv
182 info attempt registry request try #2 at 7:05:59 PM
183 http request GET https://registry.npmjs.org/express
184 info attempt registry request try #2 at 7:05:59 PM
185 http request GET https://registry.npmjs.org/jade
186 info attempt registry request try #2 at 7:05:59 PM
187 http request GET https://registry.npmjs.org/morgan
188 info attempt registry request try #2 at 7:05:59 PM
189 http request GET https://registry.npmjs.org/jspl
190 info attempt registry request try #2 at 7:05:59 PM
191 http request GET https://registry.npmjs.org/nedb
192 info attempt registry request try #2 at 7:05:59 PM
193 http request GET https://registry.npmjs.org/static-favicon
194 info attempt registry request try #2 at 7:05:59 PM
195 http request GET https://registry.npmjs.org/body-parser
196 info attempt registry request try #2 at 7:05:59 PM
197 http request GET https://registry.npmjs.org/cookie-parser
198 info retry will retry, error on last attempt: Error: connect ENETUNREACH
199 info retry will retry, error on last attempt: Error: connect ENETUNREACH
200 info retry will retry, error on last attempt: Error: connect ENETUNREACH
201 info retry will retry, error on last attempt: Error: connect ENETUNREACH
202 info retry will retry, error on last attempt: Error: connect ENETUNREACH
203 info retry will retry, error on last attempt: Error: connect ENETUNREACH
204 info retry will retry, error on last attempt: Error: connect ENETUNREACH
205 info retry will retry, error on last attempt: Error: connect ENETUNREACH
206 info retry will retry, error on last attempt: Error: connect ENETUNREACH
207 info retry will retry, error on last attempt: Error: connect ENETUNREACH
208 info attempt registry request try #3 at 7:06:59 PM
209 http request GET https://registry.npmjs.org/debug
210 info attempt registry request try #3 at 7:06:59 PM
211 http request GET https://registry.npmjs.org/express-csv
212 info attempt registry request try #3 at 7:06:59 PM
213 http request GET https://registry.npmjs.org/express
214 info attempt registry request try #3 at 7:06:59 PM
215 http request GET https://registry.npmjs.org/jade
216 info attempt registry request try #3 at 7:06:59 PM
217 http request GET https://registry.npmjs.org/morgan
218 info attempt registry request try #3 at 7:06:59 PM
219 http request GET https://registry.npmjs.org/jspl
220 info attempt registry request try #3 at 7:06:59 PM
221 http request GET https://registry.npmjs.org/nedb
222 info attempt registry request try #3 at 7:06:59 PM
223 http request GET https://registry.npmjs.org/static-favicon
224 info attempt registry request try #3 at 7:06:59 PM
225 http request GET https://registry.npmjs.org/body-parser
226 info attempt registry request try #3 at 7:06:59 PM
227 http request GET https://registry.npmjs.org/cookie-parser
228 verbose stack Error: connect ENETUNREACH
228 verbose stack     at exports._errnoException (util.js:746:11)
228 verbose stack     at connect (net.js:833:19)
228 verbose stack     at net.js:928:9
228 verbose stack     at GetAddrInfoReqWrap.asyncCallback [as callback] (dns.js:81:16)
228 verbose stack     at GetAddrInfoReqWrap.onlookup [as oncomplete] (dns.js:99:10)
229 verbose cwd /home/victor/apps/wedding
230 error Linux 3.12.36-guest-27-c9b6624-x86_64
231 error argv "/usr/bin/node" "/usr/bin/npm" "install"
232 error node v0.12.0
233 error npm  v2.5.1
234 error code ENETUNREACH
235 error errno ENETUNREACH
236 error syscall connect
237 error connect ENETUNREACH
238 error If you need help, you may report this error at:
238 error     <http://github.com/npm/npm/issues>
239 verbose exit [ 1, true ]
@igalic

This comment has been minimized.

Copy link
Author

igalic commented Mar 15, 2015

thanks for the heads-up!

@othiym23

This comment has been minimized.

Copy link
Contributor

othiym23 commented Mar 16, 2015

To be clear, this is a Node.js issue, and not an npm issue – npm just hands off outbound requests to the registry to request, which uses the built-in HTTP client and DNS module to connect to the registry CDN. npm's CDN is not yet ready for IPv6, and has indicated in previous discussions that they're looking to roll out IPv6 support sometime this year.

@telmich

This comment has been minimized.

Copy link

telmich commented Aug 8, 2017

It seems the problem exists again in v6.11.2:

[21:00:46] chat2:~# npm install -g n
npm ERR! Linux 3.16.0-4-amd64
npm ERR! argv "/usr/bin/nodejs" "/usr/bin/npm" "install" "-g" "n"
npm ERR! node v6.11.2
npm ERR! npm v3.10.10
npm ERR! code ENETUNREACH
npm ERR! errno ENETUNREACH
npm ERR! syscall connect

npm ERR! connect ENETUNREACH 151.101.64.162:443 - Local (0.0.0.0:0)
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! /root/npm-debug.log

Looking at the debug log:

13 silly mapToRegistry uri https://registry.npmjs.org/n
14 verbose request uri https://registry.npmjs.org/n
15 verbose request no auth needed
16 info attempt registry request try #1 at 9:02:13 PM
17 verbose request id 6675d4c9fa16a701
18 http request GET https://registry.npmjs.org/n
19 info retry will retry, error on last attempt: Error: connect ENETUNREACH 151.101.0.162:443 - Local (0.0.0.0:0)
20 info attempt registry request try #2 at 9:02:24 PM
21 http request GET https://registry.npmjs.org/n

[21:07:15] chat2:~# curl -I https://registry.npmjs.org/n
HTTP/2 200
date: Tue, 08 Aug 2017 21:07:22 GMT
server: nginx/1.10.1
content-type: application/json
last-modified: Fri, 04 Aug 2017 09:54:49 GMT
etag: "59844469-116c0"
cache-control: max-age=300
accept-ranges: bytes
via: 1.1 varnish
age: 0
x-served-by: cache-hhn1537-HHN
x-cache: MISS
x-cache-hits: 0
x-timer: S1502226443.775514,VS0,VE5
vary: Accept-Encoding, Accept
content-length: 71360

@telmich

This comment has been minimized.

Copy link

telmich commented Aug 8, 2017

@igalic Which node version did you find that worked with IPv6? Neither 4.8.2, 4.8.4 nor 6.11.2 seem to work with ipv6 only networks.

@othiym23 the repository does not need to support ipv6, as in dns64/nat64 the address is later translated into ipv4, prior to leaving the service providers network - so the registry actually only sees ipv4 requests.

@igalic

This comment has been minimized.

Copy link
Author

igalic commented Aug 9, 2017

@telmich it's really hard to trace back now
as you can tell, somewhere after 0.11.14, this issue was reintroduced, and has persisted since: nodejs/node#6307

@telmich

This comment has been minimized.

Copy link

telmich commented Aug 9, 2017

@igalic That is quite crazy!

@igalic

This comment has been minimized.

Copy link
Author

igalic commented Aug 9, 2017

nah, crazy is me tracing this issue thru musl and docker ignorant of the possibility that this could've been a regression.

@sudhagarc

This comment has been minimized.

Copy link

sudhagarc commented Feb 8, 2018

I'm noticing the same issue in my network (IPv6 only) & "docker" environment. Is there any solution that I could use from folks who have experienced in the past? In my network, I have DNS64/NAT64, so connecting to IPv4 network is not an issue. In other words, curl to registry.npmjs.org works fine; however npm install command fails with network unreachable code.

@telmich

This comment has been minimized.

Copy link

telmich commented Feb 9, 2018

@sudhagarc I have to say that the inability and inflexibility of nodejs forced us to abandon software based on nodejs in favor for other frameworks, as we are dealing with a lot of IPv6 only networks. For us, NodeJS is a relict from the old IPv4 world.

Just like telnet, not suitable for today's networks.

@telmich

This comment has been minimized.

Copy link

telmich commented Feb 9, 2018

@igalic I suggest to reopen this bug

@sudhagarc

This comment has been minimized.

Copy link

sudhagarc commented Feb 9, 2018

@telmich If you don't mind, could you tell what other framework(s) you have used to replace nodejs?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
You can’t perform that action at this time.