title: Python Cassandra driver: connect to Docker container on server - cassandra.UnresolvableContactPoints: {}
body: <p>I am runnning cassandra in a docker container on a custom server.</p>
  <p>I start cassandra docker like this:</p>
  <pre><code>docker run  --name cassandra -p 9042:9042 -d cassandra:latest
  </code></pre>
  <p>When i want to conect to the server via the python cassandra driver from datastax like this:</p>
  <pre><code>from cassandra.cqlengine import connection
  
  connection.setup([&quot;http://myserver.myname.com&quot;], &quot;cqlengine&quot;, protocol_version=3)
  </code></pre>
  <p>The exception is thrown:</p>
  <pre><code>    File &quot;C:\LONG\PATH\TO\venv\lib\site-packages\cassandra\cqlengine\connection.py&quot;, line 106, in setup
          self.cluster = Cluster(self.hosts, **self.cluster_options)
        File &quot;cassandra\cluster.py&quot;, line 1181, in cassandra.cluster.Cluster.__init__
  
      cassandra.UnresolvableContactPoints: {}
  python-BaseException
  </code></pre>
  <p>After hours of searching through docker network permissions I found the simple solution, so maybe this will help you too.</p>