title: golang gocql failed to connect to 127.0.0.1:9042 not enough bytes to read header require 9 got: 8
body: <p>I get this error trying to compile:</p>
  
  <pre><code>package main
  import "fmt"
  import "log"
  import "github.com/gocql/gocql"
  var (
      name, sex string
      age int
  )
  func main() {
      // connect to the cluster
      cluster := gocql.NewCluster("127.0.0.1")
      cluster.Keyspace = "dbaccess"
      session, _ := cluster.CreateSession()
      defer session.Close()
      cluster.ProtoVersion = 4
      if err := session.Query("SELECT name, age FROM people WHERE name='doug'").Scan(&amp;name, &amp;age); 
      err != nil {
          log.Fatal(err)
      }
      fmt.Println(name, age)
  }
  </code></pre>
  
  <p>I added the line </p>
  
  <pre><code>cluster.ProtoVersion = 4
  </code></pre>
  
  <p>After reading about it <a href="https://github.com/gocql/gocql/issues/538" rel="nofollow">here</a> but I'm too new to understand if that's my issue, or I did something wrong elsewhere. Do I have to wait for an update to gocql that fixes this, or what should I do?</p>