Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misleading error message when running ./nakama migrate up #1096

Open
tsafs opened this issue Oct 7, 2023 · 0 comments · May be fixed by #1258
Open

Misleading error message when running ./nakama migrate up #1096

tsafs opened this issue Oct 7, 2023 · 0 comments · May be fixed by #1258

Comments

@tsafs
Copy link

tsafs commented Oct 7, 2023

Description

Misleading error message when running ./nakama migrate up.

See these two attempts at running the command:

> ./nakama migrate up
{"level":"info","ts":"2023-10-07T12:06:22.031+0200","caller":"migrate/migrate.go:155","msg":"Database connection","dsn":"postgres://root@localhost:26257/nakama?sslmode=prefer"}
{"level":"fatal","ts":"2023-10-07T12:06:23.328+0200","caller":"migrate/migrate.go:169","msg":"Failed to check if db exists","db":"nakama","error":"failed to connect to `host=localhost user=root database=nakama`: server error (ERROR: node is running secure mode, SSL connection required (SQLSTATE 08P01))"}
> ./nakama migrate up --database.address root:[email protected]:26257
{"level":"info","ts":"2023-10-07T12:11:19.990+0200","caller":"migrate/migrate.go:155","msg":"Database connection","dsn":"postgres://root:[email protected]:26257/nakama?sslmode=prefer"}
{"level":"info","ts":"2023-10-07T12:11:20.788+0200","caller":"migrate/migrate.go:203","msg":"Database information","version":"CockroachDB CCL v23.1.4 (x86_64-pc-linux-gnu, built 2023/06/16 20:36:15, go1.19.4)"}
{"level":"info","ts":"2023-10-07T12:11:31.680+0200","caller":"migrate/migrate.go:226","msg":"Successfully applied migration","count":11}

You can see that the first attempt failed, because the username and password were incorrect. However, the error message implies that I have to enable SSL, which was in fact already enabled.

Steps to Reproduce

  1. Set up Cockroach DB via minikube
  2. Port forward 26257 and enable SSL doing so
  3. Run ./nakama migrate up

Expected Result

I expect the correct error message to be returned.

Actual Result

See the description

Context

The client I use does not matter in this case. I'm using a linux machine.

Your Environment

  • Nakama: 3.17.1+258a7f35
  • Database: cockroachdb/cockroach:v23.1.4
  • Environment name and version: What is this?
  • Operating System and version: Pop!_OS 22.04 LTS
toqueteos added a commit to toqueteos/nakama that referenced this issue Aug 1, 2024
@toqueteos toqueteos linked a pull request Aug 1, 2024 that will close this issue
toqueteos added a commit to toqueteos/nakama that referenced this issue Aug 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant