title: network connect ETIMEDOUT for Protractor instalaltion in a VM
body: <p>Background_Note: 
  I have installed protractor successfully in all global/host machines. But the same does't work in VMs.</p>
  
  <p>That is, this issue appears only in a Windows 7 Virtual machine, not otherwise.
  All these machines (VM, hosts and individual machines) have the same Proxy settings, and I have set the same in npm config everywhere.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>npm config set proxy http://proxy_server:8080
  npm config set https-proxy http://proxy_server:8080</code></pre>
  </div>
  </div>
  </p>
  
  <hr>
  
  <p>Now the procedure I tried: </p>
  
  <ol>
  <li>I am in a windows 7 remote desktop (VM), logged in as a non administrator user</li>
  <li>I opened cmd window as administrator.</li>
  <li>Tried installing protractor as </li>
  </ol>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>npm install -g protractor</code></pre>
  </div>
  </div>
  </p>
  
  <ol start="3">
  <li>This installation fails, log and config lists are attached below. </li>
  <li>Tried all the possible answers from <a href="https://stackoverflow.com/questions/17324438/bower-error-tunneling-socket-could-not-be-established-cause-parse-error">Bower error tunneling socket could not be established, cause=Parse Error</a>
  ==> They don't work for me.</li>
  </ol>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>C:\Windows\system32&gt;npm config list
  ; cli configs
  registry = "http://registry.npmjs.org/"
  user-agent = "npm/1.4.28 node/v0.10.33 win32 x64"
  
  ; userconfig C:\Users\test\.npmrc
  registry = "http://registry.npmjs.org/"
  
  ; builtin config undefined
  prefix = "C:\\Users\\test\\AppData\\Roaming\\npm"
  
  ; node bin location = C:\Program Files\nodejs\\node.exe
  ; cwd = C:\Windows\system32
  ; HOME = C:\Users\test
  ; 'npm config ls -l' to show all defaults.</code></pre>
  </div>
  </div>
  </p>
  
  <p>C:\Windows\system32></p>
  
  <p>Log written at npm-debug.log:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>0 info it worked if it ends with ok
  1 verbose cli [ 'C:\\Program Files\\nodejs\\\\node.exe',
  1 verbose cli   'C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js',
  1 verbose cli   'install',
  1 verbose cli   '-g',
  1 verbose cli   'protractor',
  1 verbose cli   '--registry',
  1 verbose cli   'http://registry.npmjs.org/' ]
  2 info using npm@1.4.28
  3 info using node@v0.10.33
  4 verbose node symlink C:\Program Files\nodejs\\node.exe
  5 verbose cache add [ 'protractor', null ]
  6 verbose cache add name=undefined spec="protractor" args=["protractor",null]
  7 verbose parsed url { protocol: null,
  7 verbose parsed url   slashes: null,
  7 verbose parsed url   auth: null,
  7 verbose parsed url   host: null,
  7 verbose parsed url   port: null,
  7 verbose parsed url   hostname: null,
  7 verbose parsed url   hash: null,
  7 verbose parsed url   search: null,
  7 verbose parsed url   query: null,
  7 verbose parsed url   pathname: 'protractor',
  7 verbose parsed url   path: 'protractor',
  7 verbose parsed url   href: 'protractor' }
  8 silly lockFile 4f4f4858-protractor protractor
  9 verbose lock protractor C:\Users\test\AppData\Roaming\npm-cache\4f4f4858-protractor.lock
  10 silly lockFile 4f4f4858-protractor protractor
  11 silly lockFile 4f4f4858-protractor protractor
  12 verbose addNamed [ 'protractor', '' ]
  13 verbose addNamed [ null, '*' ]
  14 silly lockFile 80d5ca5a-protractor protractor@
  15 verbose lock protractor@ C:\Users\test\AppData\Roaming\npm-cache\80d5ca5a-protractor.lock
  16 silly addNameRange { name: 'protractor', range: '*', hasData: false }
  17 verbose request where is /protractor
  18 verbose request registry http://registry.npmjs.org/
  19 verbose request id b468ffda57abdf0d
  20 verbose url raw /protractor
  21 verbose url resolving [ 'http://registry.npmjs.org/', './protractor' ]
  22 verbose url resolved http://registry.npmjs.org/protractor
  23 verbose request where is http://registry.npmjs.org/protractor
  24 info trying registry request attempt 1 at 18:20:15
  25 http GET http://registry.npmjs.org/protractor
  26 info retry will retry, error on last attempt: Error: connect ETIMEDOUT
  27 info trying registry request attempt 2 at 18:20:47
  28 http GET http://registry.npmjs.org/protractor
  29 info retry will retry, error on last attempt: Error: connect ETIMEDOUT
  30 info trying registry request attempt 3 at 18:22:08
  31 http GET http://registry.npmjs.org/protractor
  32 silly lockFile 80d5ca5a-protractor protractor@
  33 silly lockFile 80d5ca5a-protractor protractor@
  34 error network connect ETIMEDOUT
  34 error network This is most likely not a problem with npm itself
  34 error network and is related to network connectivity.
  34 error network In most cases you are behind a proxy or have bad network settings.
  34 error network
  34 error network If you are behind a proxy, please make sure that the
  34 error network 'proxy' config is set properly.  See: 'npm help config'
  35 error System Windows_NT 6.1.7600
  36 error command "C:\\Program Files\\nodejs\\\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "install" "-g" "protractor" "--registry" "http://registry.npmjs.org/"
  37 error cwd C:\Windows\system32
  38 error node -v v0.10.33
  39 error npm -v 1.4.28
  40 error syscall connect
  41 error code ETIMEDOUT
  42 error errno ETIMEDOUT
  43 verbose exit [ 1, true ]</code></pre>
  </div>
  </div>
  </p>