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

Using a PostgreSQL with a non en_US.UTF8 locale #4068

Open
LostInBrittany opened this issue Feb 13, 2024 · 1 comment
Open

Using a PostgreSQL with a non en_US.UTF8 locale #4068

LostInBrittany opened this issue Feb 13, 2024 · 1 comment
Assignees
Labels
code/bug Some user-visible feature works incorrectly not ready Issues that are not ready to be worked on; PRs that should skip CI

Comments

@LostInBrittany
Copy link

LostInBrittany commented Feb 13, 2024

FerretDB version

FerretDB v1.19.0

Backend

PostgreSQL 15

Environment

  • OS: NixOS

  • Deployment:Docker using the latest ghcr.io/ferretdb/ferretdb image

  • Deployment details: I am connecting FerretDB to a remote PostgreSQL 15 DBaaS

    The DBaaS provider gives me a database that is in en_GB.UTF8 locale, I can't change that as user

What did you do?

I simply wanted to connect to the database.

What did you expect to see?

A simple connection

What did you see instead?

$ mongosh "mongodb://<user>:<password>@127.0.0.1:27017/bytlscq26yrnu3b94hvs?authMechanism=PLAIN"
Current Mongosh Log ID:	65cb4d41181013639dd4706c
Connecting to:		mongodb://<credentials>@127.0.0.1:27017/bytlscq26yrnu3b94hvs?authMechanism=PLAIN&directConnection=true&serverSelectionTimeoutMS=2000&appName=mongosh+2.0.1
MongoServerError: [msg_ping.go:52 handler.(*Handler).MsgPing] [backend.go:67 postgresql.(*backend).Status] [registry.go:259 metadata.(*Registry).DatabaseList] [registry.go:132 metadata.(*Registry).getPool] [pool.go:128 pool.(*Pool).Get] [opendb.go:95 pool.openDB] [opendb.go:134 pool.checkConnection] "lc_collate" is "en_GB.UTF-8"; supported values are [POSIX C C.UTF8 en_US.UTF8]


$ docker compose logs ferretdb
ferretdb-1  | 2024-02-13T11:08:31.189Z	INFO	ferretdb/main.go:278	Starting FerretDB v1.19.0...	{"version": "v1.19.0", "commit": "0e7b0483461a5016c3e2d3639b8b4e3b679f3bac", "branch": "unknown", "dirty": true, "package": "docker", "debugBuild": false, "buildEnvironment": {"-buildmode":"exe","-compiler":"gc","CGO_ENABLED":"0","GOAMD64":"v1","GOARCH":"amd64","GOOS":"linux","go.version":"go1.21.6","vcs":"git","vcs.time":"2024-01-29T10:43:13Z"}, "uuid": "a5efae5c-1384-4eb9-869b-7f8ac473799d"}
ferretdb-1  | 2024-02-13T11:08:31.190Z	INFO	postgresql	handler/handler.go:142	Capped collections cleanup enabled.	{"interval": "1m0s"}
ferretdb-1  | 2024-02-13T11:08:31.190Z	INFO	telemetry	telemetry/reporter.go:148	The telemetry state is undecided; the first report will be sent in 1h0m0s. Read more about FerretDB telemetry and how to opt out at https://beacon.ferretdb.io.
ferretdb-1  | 2024-02-13T11:08:31.190Z	INFO	listener	clientconn/listener.go:103	Listening on TCP [::]:27017 ...
ferretdb-1  | 2024-02-13T11:08:31.192Z	INFO	debug	debug/debug.go:103	Starting debug server on http://[::]:8080 ...
ferretdb-1  | 2024-02-13T11:08:31.192Z	INFO	debug	debug/debug.go:109	http://[::]:8080/debug/graphs - Visualize metrics
ferretdb-1  | 2024-02-13T11:08:31.192Z	INFO	debug	debug/debug.go:109	http://[::]:8080/debug/metrics - Metrics in Prometheus format
ferretdb-1  | 2024-02-13T11:08:31.192Z	INFO	debug	debug/debug.go:109	http://[::]:8080/debug/pprof - Runtime profiling data for pprof
ferretdb-1  | 2024-02-13T11:08:31.192Z	INFO	debug	debug/debug.go:109	http://[::]:8080/debug/vars - Expvar package metrics
ferretdb-1  | 2024-02-13T11:08:33.490Z	INFO	listener	clientconn/listener.go:303	Connection started	{"conn": "172.23.0.1:44894 -> 172.23.0.2:27017"}
ferretdb-1  | 2024-02-13T11:08:33.494Z	INFO	listener	clientconn/listener.go:303	Connection started	{"conn": "172.23.0.1:44908 -> 172.23.0.2:27017"}
ferretdb-1  | 2024-02-13T11:08:33.776Z	INFO	postgresql	tracelog/tracelog.go:335	Connect	{"pid": 5147, "host": "bytlscq26yrnu3b94hvs-postgresql.services.clever-cloud.com", "port": 6584, "database": "bytlscq26yrnu3b94hvs", "time": "279.129525ms"}
ferretdb-1  | 2024-02-13T11:08:33.798Z	INFO	postgresql	tracelog/tracelog.go:335	Prepare	{"alreadyPrepared": false, "pid": 5147, "name": "stmtcache_df1f1d15d442789a5b9c81cdddf44d88d5748499cc488650", "sql": "SELECT version()", "time": "22.699467ms"}
ferretdb-1  | 2024-02-13T11:08:33.823Z	INFO	postgresql	tracelog/tracelog.go:335	Query	{"sql": "SELECT version()", "args": [], "time": "46.828979ms", "commandTag": "SELECT 1", "pid": 5147}
ferretdb-1  | 2024-02-13T11:08:33.847Z	INFO	postgresql	tracelog/tracelog.go:335	Prepare	{"name": "stmtcache_044acdca1c06eb0c67ff0d503eb085d2c5210a5f877152f3", "sql": "SHOW ALL", "time": "23.622232ms", "alreadyPrepared": false, "pid": 5147}
ferretdb-1  | 2024-02-13T11:08:33.901Z	INFO	postgresql	tracelog/tracelog.go:335	Query	{"sql": "SHOW ALL", "args": [], "time": "78.449059ms", "commandTag": "SHOW", "pid": 5147}
ferretdb-1  | 2024-02-13T11:08:33.902Z	WARN	postgresql	pool/pool.go:127	Pool: connection failed	{"username": "ugphbmu7ebdo9tymdogf", "error": "[opendb.go:95 pool.openDB] [opendb.go:134 pool.checkConnection] \"lc_collate\" is \"en_GB.UTF-8\"; supported values are [POSIX C C.UTF8 en_US.UTF8]"}
ferretdb-1  | 2024-02-13T11:08:33.902Z	WARN	// 172.23.0.1:44908 -> 172.23.0.2:27017 	clientconn/conn.go:606	Response header: length:   451, id:    3, response_to:    4, opcode: OP_MSG
ferretdb-1  | 2024-02-13T11:08:33.902Z	WARN	// 172.23.0.1:44908 -> 172.23.0.2:27017 	clientconn/conn.go:607	Response message:
ferretdb-1  | {
ferretdb-1  |   "Checksum": 0,
ferretdb-1  |   "FlagBits": 0,
ferretdb-1  |   "Sections": [
ferretdb-1  |     {
ferretdb-1  |       "Document": {
ferretdb-1  |         "$k": [
ferretdb-1  |           "ok",
ferretdb-1  |           "errmsg",
ferretdb-1  |           "code",
ferretdb-1  |           "codeName"
ferretdb-1  |         ],
ferretdb-1  |         "ok": {
ferretdb-1  |           "$f": 0
ferretdb-1  |         },
ferretdb-1  |         "errmsg": "[msg_ping.go:52 handler.(*Handler).MsgPing] [backend.go:67 postgresql.(*backend).Status] [registry.go:259 metadata.(*Registry).DatabaseList] [registry.go:132 metadata.(*Registry).getPool] [pool.go:128 pool.(*Pool).Get] [opendb.go:95 pool.openDB] [opendb.go:134 pool.checkConnection] \"lc_collate\" is \"en_GB.UTF-8\"; supported values are [POSIX C C.UTF8 en_US.UTF8]",
ferretdb-1  |         "code": 1,
ferretdb-1  |         "codeName": "InternalError"
ferretdb-1  |       },
ferretdb-1  |       "Kind": 0
ferretdb-1  |     }
ferretdb-1  |   ]
ferretdb-1  | }
ferretdb-1  | 
ferretdb-1  | 
ferretdb-1  | 
ferretdb-1  | 2024-02-13T11:08:33.908Z	INFO	listener	clientconn/listener.go:308	Connection stopped	{"conn": "172.23.0.1:44894 -> 172.23.0.2:27017"}
ferretdb-1  | 2024-02-13T11:08:33.909Z	INFO	listener	clientconn/listener.go:308	Connection stopped	{"conn": "172.23.0.1:44908 -> 172.23.0.2:27017"}
@LostInBrittany LostInBrittany added code/bug Some user-visible feature works incorrectly not ready Issues that are not ready to be worked on; PRs that should skip CI labels Feb 13, 2024
@LostInBrittany
Copy link
Author

It seems the same issue than #813, I hadn't seen about it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code/bug Some user-visible feature works incorrectly not ready Issues that are not ready to be worked on; PRs that should skip CI
Projects
None yet
Development

No branches or pull requests

2 participants