I have set up my CockroachDB in secure mode and I was able to get nakama to connect and function ok. However, I could not get the “nakama migrate up” function to work correctly. I receive the following error (this does not happen in --insecure mode):
/nakama # ./nakama migrate up --database.address “nakama@cockroachdb:26257/?sslcert=/certs/client.nakama.crt&sslkey=/certs/client.nakama.key&sslmode=require”
{“level”:“info”,“ts”:“2020-03-06T02:56:47.035Z”,“msg”:“Database connection”,“dsn”:“nakama@cockroachdb:26257/?sslcert=/certs/client.nakama.crt&sslkey=/certs/client.nakama.key&sslmode=require”}
{“level”:“fatal”,“ts”:“2020-03-06T02:56:47.055Z”,“msg”:“Error querying database version”,“error”:“unknown oid: 25, name: version”,“errorVerbose”:“unknown oid: 25, name: version\ngithub.com/jackc/pgx.(*Conn).prepareEx\n\tgithub.com/jackc/pgx@v3.5.0+incompatible/conn.go:1137\ngithub.com/jackc/pgx.(*Conn).PrepareEx\n\tgithub.com/jackc/pgx@v3.5.0+incompatible/conn.go:1065\ngithub.com/jackc/pgx/stdlib.(*Conn).QueryContext\n\tgithub.com/jackc/pgx@v3.5.0+incompatible/stdlib/sql.go:365\ndatabase/sql.ctxDriverQuery\n\tdatabase/sql/ctxutil.go:48\ndatabase/sql.(*DB).queryDC.func1\n\tdatabase/sql/sql.go:1592\ndatabase/sql.withLock\n\tdatabase/sql/sql.go:3184\ndatabase/sql.(*DB).queryDC\n\tdatabase/sql/sql.go:1587\ndatabase/sql.(*DB).query\n\tdatabase/sql/sql.go:1570\ndatabase/sql.(*DB).QueryContext\n\tdatabase/sql/sql.go:1547\ndatabase/sql.(*DB).QueryRowContext\n\tdatabase/sql/sql.go:1648\ndatabase/sql.(*DB).QueryRow\n\tdatabase/sql/sql.go:1659\ngithub.com/heroiclabs/nakama/v2/migrate.Parse\n\tgithub.com/heroiclabs/nakama/v2@/migrate/migrate.go:151\nmain.main\n\tmain.go:79\nruntime.main\n\truntime/proc.go:203\nruntime.goexit\n\truntime/asm_amd64.s:1357",“stacktrace”:"github.com/heroiclabs/nakama/v2/migrate.Parse\n\tgithub.com/heroiclabs/nakama/v2@/migrate/migrate.go:152\nmain.main\n\tmain.go:79\nruntime.main\n\truntime/proc.go:203”}
I am using the docker container setup for Cockroach and Nakama. Any help on why this might be? When I run the SELECT version() query from DBeaver using the same user, everything works so I don’t think it is a permission thing.