title: IntelliJ cannot connect to protected tcp Docker socket
body: <p>I want to use the <a href="https://www.jetbrains.com/help/idea/docker.html" rel="nofollow noreferrer">Docker integration in IntelliJ</a> to connect to a protected remote Docker socket:</p>
  
  <p><a href="https://i.stack.imgur.com/AsYuR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AsYuR.png" alt="Docker Socket Configuration in IntelliJ"></a></p>
  
  <p>As you can see in the above picture I'm getting the following error:</p>
  
  <pre><code>Cannot connect: java.io.IOException: Channel disconnected before any data was received
  </code></pre>
  
  <p>When I set the Docker <a href="https://docs.docker.com/engine/security/https/#secure-by-default" rel="nofollow noreferrer">environment variables</a> <code>DOCKER_TLS_VERIFY=1</code>, <code>DOCKER_HOST=tcp://myhost:2376</code>, <code>DOCKER_CERT_PATH=/path/to/certs/</code> to the same values as in the IntelliJ configuration and try to connect via terminal its working perfectly. </p>
  
  <p>Does anyone know what's causing this error and how I can fix it?</p>