Error tunneling socket could not be established cause socket hang up

I can't install any npms. I have to use a http proxy to connect internet. andrew@andrew-u-desktop:~$ npm install mongojs npm http GET https://registry.npmjs.org/mongojs npm ERR! Error: tunnelin...

I can’t install any npms.

I have to use a http proxy to connect internet.

andrew@andrew-u-desktop:~$ npm install mongojs
npm http GET https://registry.npmjs.org/mongojs

npm ERR! Error: tunneling socket could not be established, cause=socket hang up
npm ERR!     at ClientRequest.onError (/usr/lib/nodejs/npm/node_modules/request/tunnel.js:161:17)
npm ERR!     at ClientRequest.g (events.js:156:14)
npm ERR!     at ClientRequest.emit (events.js:67:17)
npm ERR!     at CleartextStream.socketCloseListener (http.js:1173:9)
npm ERR!     at CleartextStream.emit (events.js:64:17)
npm ERR!     at Array.0 (tls.js:792:22)
npm ERR!     at EventEmitter._tickCallback (node.js:190:38)
npm ERR! 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! 
npm ERR! System Linux 2.6.32-41-generic
npm ERR! command "node" "/usr/bin/npm" "install" "mongojs"
npm ERR! cwd /home/andrew
npm ERR! node -v v0.6.18
npm ERR! npm -v 1.1.21
npm ERR! code ECONNRESET
npm ERR! message tunneling socket could not be established, cause=socket hang up
npm ERR! errno {}
npm ERR! 
npm ERR! Additional logging details can be found in:
npm ERR!     /home/andrew/npm-debug.log
npm not ok


## /home/andrew/npm-debug.log:


info it worked if it ends with ok
verbose cli [ 'node', '/usr/bin/npm', 'install', 'mongojs' ]
info using npm@1.1.21
info using node@v0.6.18
verbose /usr/bin/node node symlink
verbose config file /home/andrew/.npmrc
verbose config file /usr/etc/npmrc
verbose config file /usr/lib/nodejs/npm/npmrc
verbose caching /home/andrew/node_modules/http-proxy/package.json
verbose loadDefaults http-proxy@0.7.6
verbose caching /home/andrew/node_modules/yql/package.json
verbose loadDefaults yql@0.4.6
verbose caching /home/andrew/node_modules/jquery-browserify/package.json
verbose loadDefaults jquery-browserify@1.6.2
verbose caching /home/andrew/node_modules/yui3/package.json
verbose loadDefaults yui3@0.7.11
verbose caching /home/andrew/node_modules/htmlparser/package.json
verbose loadDefaults htmlparser@1.7.3
verbose caching /home/andrew/node_modules/jquery/package.json
verbose loadDefaults jquery@1.6.3
verbose caching /home/andrew/node_modules/get/package.json
verbose loadDefaults get@1.1.0
verbose caching /home/andrew/node_modules/soupselect/package.json
verbose loadDefaults soupselect@0.2.0
verbose cache add [ 'mongojs', null ]
silly cache add: name, spec, args [ undefined, 'mongojs', [ 'mongojs', null ] ]
verbose parsed url { pathname: 'mongojs', path: 'mongojs', href: 'mongojs' }
verbose addNamed [ 'mongojs', '' ]
verbose addNamed [ null, '' ]
silly name, range, hasData [ 'mongojs', '', false ]
verbose raw, before any munging mongojs
verbose url resolving [ 'https://registry.npmjs.org/', './mongojs' ]
verbose url resolved https://registry.npmjs.org/mongojs
http GET https://registry.npmjs.org/mongojs
ERR! Error: tunneling socket could not be established, cause=socket hang up
ERR!     at ClientRequest.onError (/usr/lib/nodejs/npm/node_modules/request/tunnel.js:161:17)
ERR!     at ClientRequest.g (events.js:156:14)
ERR!     at ClientRequest.emit (events.js:67:17)
ERR!     at CleartextStream.socketCloseListener (http.js:1173:9)
ERR!     at CleartextStream.emit (events.js:64:17)
ERR!     at Array.0 (tls.js:792:22)
ERR!     at EventEmitter._tickCallback (node.js:190:38)
ERR! You may report this log at:
ERR!     <http://github.com/isaacs/npm/issues>
ERR! or email it to:
ERR!     <npm-@googlegroups.com>
ERR! 
ERR! System Linux 2.6.32-41-generic
ERR! command "node" "/usr/bin/npm" "install" "mongojs"
ERR! cwd /home/andrew
ERR! node -v v0.6.18
ERR! npm -v 1.1.21
ERR! code ECONNRESET
ERR! message tunneling socket could not be established, cause=socket hang up
ERR! errno {}
verbose exit [ 1, true ]



Posted on
—/—/—- —:— AM

sonali_somase



Reply posted on
—/—/—- —:— AM

hi @Rajarshee, Have you tried to deploy with -U option.This will uploads Node.js modules from your system to Apigee Edge rather than resolving the modules directly on Apigee Edge.



Posted on
—/—/—- —:— AM



Reply posted on
—/—/—- —:— AM

apigeetool deploynodeapp -u Rajarshee.Mukhopadhyay@cognizant.com -o raj_3105 -e test -n ‘hellonode’ -d . -m server.js -b /myNodeApp

I used this command to deploy.

Is there anything else i should be using?? @Sonali



Posted on
—/—/—- —:— AM

sonali_somase



Reply posted on
—/—/—- —:— AM



Posted on
—/—/—- —:— AM



Reply posted on
—/—/—- —:— AM

@Sonali

Error: tunneling socket could not be established, cause=write EPROTO

got this error after using -U



Posted on
—/—/—- —:— AM



Reply posted on
—/—/—- —:— AM

@Rajarshee Mukhopadhyay,

Can you post the complete error?

If you see the following in your error » If you are behind a proxy, please make sure that the
npm ERR! network ‘proxy’ config is set properly. «

Then its your corporate proxy issue.You may have to contact your network administrator if so.



Posted on
—/—/—- —:— AM



Reply posted on
—/—/—- —:— AM

@RadK4 i am not getting the corporate proxy error.

I got this error:-

Error: tunneling socket could not be established, cause=write EPROTO



Posted on
—/—/—- —:— AM



Reply posted on
—/—/—- —:— AM

I got same error for an npm command execution.But continuation of the error was corporate proxy error in the same error message.Thatswhy asked for complete error details.Was this the only error message you got?



Posted on
—/—/—- —:— AM



Reply posted on
—/—/—- —:— AM

Yes this was the only error message i got.

пакеты не устанавливаются — «Ошибка: не удалось установить туннельный сокет» [закрыто]

Сжатие Debian (подключение к Интернету через Tor), nodejs, созданный из текущего источника — ошибка только начала появляться:

root@...# npm install coffee-script
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/coffee-script
npm http GET https://registry.npmjs.org/coffee-script
npm ERR! Error: tunneling socket could not be established, cause=socket hang up
npm ERR!     at ClientRequest.onError (/usr/local/lib/node_modules/npm/node_modules/request/tunnel.js:161:17)
npm ERR!     at ClientRequest.g (events.js:193:14)
npm ERR!     at ClientRequest.EventEmitter.emit (events.js:93:17)
npm ERR!     at CleartextStream.socketErrorListener (http.js:1330:9)
npm ERR!     at CleartextStream.EventEmitter.emit (events.js:93:17)
npm ERR!     at SecurePair.exports.connect.cleartext._controlReleased (tls.js:1298:15)
npm ERR!     at SecurePair.EventEmitter.emit (events.js:93:17)
npm ERR!     at SecurePair.error (tls.js:952:10)
npm ERR!     at EncryptedStream.CryptoStream._done (tls.js:432:17)
npm ERR!     at EncryptedStream.CryptoStream._pull (tls.js:577:12)
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-3-486
npm ERR! command "/usr/local/bin/node" "/usr/local/bin/npm" "install" "coffee-script"
npm ERR! cwd /home/...
npm ERR! node -v v0.8.11
npm ERR! npm -v 1.1.62
npm ERR! code ECONNRESET
npm ERR! 
...
npm ERR! not ok code 0

Iceweasel также показывает ошибку недопустимого сертификата безопасности для https://registry.npmjs.org/coffee-script.

Кто-нибудь знает, чего здесь не хватает? (Это случалось в прошлом, хотя по какой-то странной причине исправилось.)

1 ответы

Пробовал настройку ca и strict-ssl параметры конфигурации (null и false соответственно) не работали, однако установка registry параметр конфигурации для http://registry.npmjs.org/ и пакеты снова устанавливаются — тогда это должен быть домен ssl?

ответ дан 04 окт ’12, 11:10

Не тот ответ, который вы ищете? Просмотрите другие вопросы с метками

npm

or задайте свой вопрос.

Понравилась статья? Поделить с друзьями:
  • Error ts5055 cannot write file because it would overwrite input file
  • Error ts2769 no overload matches this call
  • Error ts2532 object is possibly undefined
  • Error ts2503 cannot find namespace nodejs
  • Error ts18003 no inputs were found in config file