title: How to fix 'ECONNRESET: socket hang up' on Windows Subsystem for Linux?
body: <p>I'm trying to set up Sidekiq on my Heroku app - currently following this tutorial on <a href="https://gorails.com/episodes/deploying-sidekiq-to-production-with-heroku?autoplay=1" rel="nofollow noreferrer">GoRails</a>. However, I seem to get errors whenever I run terminal commands that require internet access. I use the Windows Subsystem for Linux in my development and have had no issues with it till now.</p>
  
  <p>For example, when I run <code>heroku config</code> in order to verify my <code>heroku redis</code> has been set up, I get the following (note the error in question in the last line):</p>
  
  <pre><code> ▸    heroku-cli: update available from 6.14.39-addc925 to
   ▸    6.99.0-ec9edad
   ▸    ECONNRESET: socket hang up
  </code></pre>
  
  <p>I'm not sure what's wrong, but I don't think it's a heroku-cli issue, per se. I think it's more of a Windows Subsystem for Linux issue. For example, when I run <code>yarn global list</code>, I get the following</p>
  
  <pre><code>yarn global v1.3.2
  
  Done in 0.36s.
  info There appears to be trouble with your network connection. Retrying...
  info There appears to be trouble with your network connection. Retrying...
  info There appears to be trouble with your network connection. Retrying...
  info There appears to be trouble with your network connection. Retrying...
  </code></pre>
  
  <p>Similarly, when I run <code>sudo apt-get update</code> in an effort to update the subsystem itself, I get a whole lot of errors. Here's a small sample: </p>
  
  <pre><code>...
  ...
  Err:14 https://deb.nodesource.com/node_8.x xenial/main Sources
    gnutls_handshake() failed: Error in the push function.
  ...
  ...
  Err:84 http://archive.ubuntu.com/ubuntu xenial/multiverse amd64 Packages
    Connection failed [IP: 91.189.88.161 80]
  ...
  ...
  </code></pre>
  
  <p>It installs some packages, but the connection fails for many of them. Also when running <code>sudo apt-get upgrade heroku</code>: </p>
  
  <pre><code>Err:1 https://cli-assets.heroku.com/branches/stable/apt ./ heroku 6.14.40-1
    gnutls_handshake() failed: Error in the push function.
  Err:2 http://security.ubuntu.com/ubuntu xenial-security/main amd64 libssl-doc all 1.0.2g-1ubuntu4.10
    Connection failed [IP: 91.189.88.161 80]
  ...
  ...
  </code></pre>
  
  <p>The <code>update available</code> message that heroku gives me doesn't go away either.</p>
  
  <p>Running <code>heroku update</code> gives me the following:</p>
  
  <pre><code> ▸    heroku-cli: update available from 6.14.39-addc925 to
   ▸    6.99.0-ec9edad
   ▸    update the CLI with "sudo apt-get upgrade heroku"
   ▸    'ECONNRESET': socket hang up
  </code></pre>
  
  <p>I don't think it is a network issue, given I can freely access websites on Chrome etc. </p>
  
  <p>Any ideas what could be wrong and what I could do to fix it? (I don't want to try pushing my code till after this is resolved)</p>