I’m not sure why I’m getting this error.
[replication-6] master: Received bytes: "*3\r\n$8\r\nREPLCONF\r\n$14\r\nlistening-port\r\n$4\r\n6380\r\n"
[replication-6] master: Received RESP value: ["REPLCONF", "listening-port", "6380"]
[replication-6] Received ["REPLCONF", "listening-port", "6380"]
[replication-6] master: Sent "OK"
[replication-6] master: Sent bytes: "+OK\r\n"
[your_program] Connected to master node at:
[your_program] localhost:6379
[replication-6] master: Received bytes: "*5\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$3\r\neof\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n"
[replication-6] master: Received RESP value: ["REPLCONF", "capa", "eof", "capa", "psync2"]
[replication-6] Received ["REPLCONF", "capa", "eof", "capa", "psync2"]
[replication-6] Found extra data: "*5\r\n$8\r\nREPLCONF\r\n$4\r\ncapa\r\n$3\r\neof\r\n$4\r\ncapa\r\n$6\r\npsync2\r\n*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n"
[replication-6] Test failed
here is the code
_, err = conn.Write(respArray([]string{
"REPLCONF",
"capa",
"eof",
"capa",
"psync2",
}))
if err != nil {
fmt.Println("failed to send REPLCONF")
os.Exit(1)
}
conn.Write(respArray([]string{
"PSYNC",
"?",
"-1",
}))