The code is written with Go and Cassandra and when I build it works good in my local computer.
But when I upload it to the server (Ubuntu 20) it throws this error
gocql: unable to dial control conn 127.0.0.1: gocql: received unexpected frame on stream 0: [header version=[version=4 direction=RESP] flags=0x0 stream=0 op=SUPPORTED length=96]
panic: gocql: unable to create session: control: unable to connect to initial hosts: gocql: received unexpected frame on stream 0: [header version=[version=4 direction=RESP] flags=0x0 stream=0 op=SUPPORTED length=96]
And this is the code
var err error
cluster := gocql.NewCluster("127.0.0.1")
cluster.Keyspace = "rentminer"
cluster.ConnectTimeout = time.Second * 1000
cluster.Consistency = gocql.One
Db, err = cluster.CreateSession()
if err != nil {
panic(err)
}
Anybody has any solution???
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…