could use some help with a bit of roadblock. Apparently, I can't seem to make a connection via the bolt driver. Here's my code:
func main() {
con := createConnection()
defer con.Close()
}
func createConnection() bolt.Conn {
driver := bolt.NewDriver()
con, err := driver.OpenNeo(URI)
handleError(err)
return con
}
And here are the error(s) that I've got:
panic: An error occurred initializing connection
An error occurred decoding ack failure message response
Couldn't read expected bytes for message length. Read: 0 Expected: 2.
Internal Error(*errors.errorString):EOF
Stack Trace:
goroutine 1 [running]:
runtime/debug.Stack(0x62407f, 0x46, 0xc042075a68)
Okay, so I've found the solution for this. My URI wasn't correctly formed. It was: ‘URI = "bolt://local host:7687"‘ But it should have been: ‘URI = "bolt://neo4j:password@localhost:7687"‘
Обсуждают сегодня