Skip to content
This repository has been archived by the owner on Aug 11, 2022. It is now read-only.

Error: tunneling socket could not be established, cause=3074680576:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:766: #3639

Closed
ankitag2013 opened this issue Jul 9, 2013 · 10 comments
Labels

Comments

@ankitag2013
Copy link

Hi,
i was installing a new package via npm install restler csv accounting
and it is showing this error, i have also unset proxy

npm ERR! Error: tunneling socket could not be established, cause=3074680576:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:766:
npm ERR! 
npm ERR!     at ClientRequest.onError (/usr/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js:159:17)
npm ERR!     at ClientRequest.g (events.js:175:14)
npm ERR!     at ClientRequest.EventEmitter.emit (events.js:95:17)
npm ERR!     at CleartextStream.socketErrorListener (http.js:1517:9)
npm ERR!     at CleartextStream.EventEmitter.emit (events.js:95:17)
npm ERR!     at SecurePair.<anonymous> (tls.js:1376:15)
npm ERR!     at SecurePair.EventEmitter.emit (events.js:95:17)
npm ERR!     at SecurePair.error (tls.js:997:27)
npm ERR!     at CleartextStream.read [as _read] (tls.js:458:17)
npm ERR!     at CleartextStream.Readable.read (_stream_readable.js:320:10)
npm ERR! If you need help, you may report this log at:
npm ERR!     <http://github.com/isaacs/npm/issues>
npm ERR! or email it to:
npm ERR!     <npm-@googlegroups.com>

npm ERR! System Linux 3.2.0-49-generic-pae
npm ERR! command "/usr/bin/node" "/usr/bin/npm" "install" "restler" "csv" "accounting"
npm ERR! cwd /home/ankit/node-js
npm ERR! node -v v0.10.12
npm ERR! npm -v 1.2.32
npm ERR! code ECONNRESET
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/ankit/node-js/npm-debug.log
npm ERR! not ok code 0




debug file 
0 info it worked if it ends with ok
1 verbose cli [ '/usr/bin/node',
1 verbose cli   '/usr/bin/npm',
1 verbose cli   'install',
1 verbose cli   'restler',
1 verbose cli   'csv',
1 verbose cli   'accounting' ]
2 info using npm@1.2.32
3 info using node@v0.10.12
4 verbose node symlink /usr/bin/node
5 verbose read json /home/ankit/node-js/package.json
6 verbose read json /home/ankit/node-js/package.json
7 verbose cache add [ 'restler', null ]
8 verbose cache add name=undefined spec="restler" args=["restler",null]
9 verbose parsed url { protocol: null,
9 verbose parsed url   slashes: null,
9 verbose parsed url   auth: null,
9 verbose parsed url   host: null,
9 verbose parsed url   port: null,
9 verbose parsed url   hostname: null,
9 verbose parsed url   hash: null,
9 verbose parsed url   search: null,
9 verbose parsed url   query: null,
9 verbose parsed url   pathname: 'restler',
9 verbose parsed url   path: 'restler',
9 verbose parsed url   href: 'restler' }
10 verbose cache add [ 'csv', null ]
11 verbose cache add name=undefined spec="csv" args=["csv",null]
12 verbose parsed url { protocol: null,
12 verbose parsed url   slashes: null,
12 verbose parsed url   auth: null,
12 verbose parsed url   host: null,
12 verbose parsed url   port: null,
12 verbose parsed url   hostname: null,
12 verbose parsed url   hash: null,
12 verbose parsed url   search: null,
12 verbose parsed url   query: null,
12 verbose parsed url   pathname: 'csv',
12 verbose parsed url   path: 'csv',
12 verbose parsed url   href: 'csv' }
13 verbose cache add [ 'accounting', null ]
14 verbose cache add name=undefined spec="accounting" args=["accounting",null]
15 verbose parsed url { protocol: null,
15 verbose parsed url   slashes: null,
15 verbose parsed url   auth: null,
15 verbose parsed url   host: null,
15 verbose parsed url   port: null,
15 verbose parsed url   hostname: null,
15 verbose parsed url   hash: null,
15 verbose parsed url   search: null,
15 verbose parsed url   query: null,
15 verbose parsed url   pathname: 'accounting',
15 verbose parsed url   path: 'accounting',
15 verbose parsed url   href: 'accounting' }
16 silly lockFile fb93280d-restler restler
17 verbose lock restler /home/ankit/.npm/fb93280d-restler.lock
18 silly lockFile 6cc98174-csv csv
19 verbose lock csv /home/ankit/.npm/6cc98174-csv.lock
20 silly lockFile 1853fd42-accounting accounting
21 verbose lock accounting /home/ankit/.npm/1853fd42-accounting.lock
22 silly lockFile 6cc98174-csv csv
23 silly lockFile 6cc98174-csv csv
24 silly lockFile 1853fd42-accounting accounting
25 silly lockFile 1853fd42-accounting accounting
26 silly lockFile fb93280d-restler restler
27 silly lockFile fb93280d-restler restler
28 verbose addNamed [ 'csv', '' ]
29 verbose addNamed [ null, '' ]
30 silly lockFile 34c7fd74-csv csv@
31 verbose lock csv@ /home/ankit/.npm/34c7fd74-csv.lock
32 verbose addNamed [ 'restler', '' ]
33 verbose addNamed [ null, '' ]
34 silly lockFile e35561c0-restler restler@
35 verbose lock restler@ /home/ankit/.npm/e35561c0-restler.lock
36 verbose addNamed [ 'accounting', '' ]
37 verbose addNamed [ null, '' ]
38 silly lockFile 3f9a2321-accounting accounting@
39 verbose lock accounting@ /home/ankit/.npm/3f9a2321-accounting.lock
40 silly addNameRange { name: 'csv', range: '', hasData: false }
41 silly addNameRange { name: 'restler', range: '', hasData: false }
42 silly addNameRange { name: 'accounting', range: '', hasData: false }
43 verbose url raw csv
44 verbose url resolving [ 'https://registry.npmjs.org/', './csv' ]
45 verbose url resolved https://registry.npmjs.org/csv
46 info trying registry request attempt 1 at 20:36:02
47 http GET https://registry.npmjs.org/csv
48 verbose url raw restler
49 verbose url resolving [ 'https://registry.npmjs.org/', './restler' ]
50 verbose url resolved https://registry.npmjs.org/restler
51 info trying registry request attempt 1 at 20:36:02
52 http GET https://registry.npmjs.org/restler
53 verbose url raw accounting
54 verbose url resolving [ 'https://registry.npmjs.org/', './accounting' ]
55 verbose url resolved https://registry.npmjs.org/accounting
56 info trying registry request attempt 1 at 20:36:02
57 http GET https://registry.npmjs.org/accounting
58 info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=3074680576:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:766:
59 info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=3074680576:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:766:
60 info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=3074680576:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:766:
61 info trying registry request attempt 2 at 20:36:12
62 http GET https://registry.npmjs.org/csv
63 info trying registry request attempt 2 at 20:36:12
64 http GET https://registry.npmjs.org/restler
65 info trying registry request attempt 2 at 20:36:12
66 http GET https://registry.npmjs.org/accounting
67 info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=3074680576:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:766:
68 info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=3074680576:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:766:
69 info retry will retry, error on last attempt: Error: tunneling socket could not be established, cause=3074680576:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:766:
70 info trying registry request attempt 3 at 20:37:12
71 http GET https://registry.npmjs.org/csv
72 info trying registry request attempt 3 at 20:37:12
73 http GET https://registry.npmjs.org/restler
74 info trying registry request attempt 3 at 20:37:12
75 http GET https://registry.npmjs.org/accounting
76 silly lockFile 34c7fd74-csv csv@
77 silly lockFile 34c7fd74-csv csv@
78 silly lockFile e35561c0-restler restler@
79 silly lockFile e35561c0-restler restler@
80 silly lockFile 3f9a2321-accounting accounting@
81 silly lockFile 3f9a2321-accounting accounting@
82 error Error: tunneling socket could not be established, cause=3074680576:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:../deps/openssl/openssl/ssl/s23_clnt.c:766:
82 error
82 error     at ClientRequest.onError (/usr/lib/node_modules/npm/node_modules/request/node_modules/tunnel-agent/index.js:159:17)
82 error     at ClientRequest.g (events.js:175:14)
82 error     at ClientRequest.EventEmitter.emit (events.js:95:17)
82 error     at CleartextStream.socketErrorListener (http.js:1517:9)
82 error     at CleartextStream.EventEmitter.emit (events.js:95:17)
82 error     at SecurePair.<anonymous> (tls.js:1376:15)
82 error     at SecurePair.EventEmitter.emit (events.js:95:17)
82 error     at SecurePair.error (tls.js:997:27)
82 error     at CleartextStream.read [as _read] (tls.js:458:17)
82 error     at CleartextStream.Readable.read (_stream_readable.js:320:10)
83 error If you need help, you may report this log at:
83 error     <http://github.com/isaacs/npm/issues>
83 error or email it to:
83 error     <npm-@googlegroups.com>
84 error System Linux 3.2.0-49-generic-pae
85 error command "/usr/bin/node" "/usr/bin/npm" "install" "restler" "csv" "accounting"
86 error cwd /home/ankit/node-js
87 error node -v v0.10.12
88 error npm -v 1.2.32
89 error code ECONNRESET
90 verbose exit [ 1, true ]
@frague59
Copy link

+1

@iamsandesh
Copy link

+1

Getting same error while trying to install 'Grunt' using npm 1.3.5 and nodejs v0.10.15 on Ubuntu 13.04

@prateekbhatt
Copy link

+1

@domenic
Copy link
Contributor

domenic commented Sep 8, 2013

This is almost always an issue with you not setting up your proxy settings correctly. Try https://www.google.com/search?q=npm+proxy.

@domenic domenic closed this as completed Sep 8, 2013
@asci
Copy link

asci commented Oct 21, 2013

But what if I have not proxy?

@hjbolide
Copy link

Hey @asci ,

Hopefully this will help:

I installed Arch Linux myself, and it doesn't come with wget, I tried to install npm package, but the install always fails. When I get wget installed in my system, it seems working for me correctly.

If you are still experiencing the same error, check it out.

@jackmaney
Copy link

+1

1 similar comment
@brunowego
Copy link

+1

@xfenix
Copy link

xfenix commented Nov 26, 2014

And now i fix this error with two simple steps:

  1. Set .npmrc following settings:
    strict-ssl = false
    proxy = http://localhost:8765/
    https-proxy = http://localhost:8765/

  2. Run sudo docker run -d -p 8765:8888 paintedfox/tinyproxy (simplest way to set up proxy)

Big thanks chrismeyersfsu for this workaround (#2866 from here).
I think this can be helpful for some users.

PS. Probably, this is similar, but not exactly this problem. I cant figure it out. Sorry.

@othiym23
Copy link
Contributor

I don't understand what people are hoping to accomplish by adding "+1"s on a closed issue. For future reference:

  • setting strict-ssl=false should be only a temporary workaround, because it removes any guarantee that the npm client might have that it's actually talking to the real npm registry, along with making things work with proxies
  • npm@2.1.6 and newer have a bundled version of request that works much better with tunneling proxy connections
  • this error is almost inevitably a consequence of running either a very old npm / node or having some kind of proxy in between you and the registry.

I'm locking this issue now. For those of you encountering similar issues, please open a new issue with the details about the specific problem you're encountering.

@npm npm locked and limited conversation to collaborators Nov 26, 2014
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests