Repository navigation
Description
FerretDB version
1.22
Backend
PostgreSQL
Environment
- OS: Ubuntu 22.04
- Deployment:
- Deployment details:
What did you do?
My .NET service gets stuck at establishing the connection with FerretDB:
17:44:08.140 [Error] (Conning.GraphQL.GraphSchema.) System.AggregateException: One or more errors occurred. (Unable to authenticate using sasl protocol mechanism SCRAM-SHA-256.)
---> MongoDB.Driver.MongoAuthenticationException: Unable to authenticate using sasl protocol mechanism SCRAM-SHA-256.
---> MongoDB.Driver.MongoConnectionException: An exception occurred while receiving a message from the server.
note: The new authentication SCRAM-SHA-256 is enabled -> FERRETDB_TEST_ENABLE_NEW_AUTH=true
I've taken a look at the FerretDB log and got the following:
2024-07-18T09:44:07.854Z ERROR // 172.19.0.1:50446 -> 172.19.0.3:27017 clientconn/conn.go:525 Handler error for unhandled response opcode {"error": "UnsupportedOpQueryCommand (352): Unsupported OP_QUERY command: saslContinue. The client driver may require an upgrade.", "opcode": "OP_REPLY"}
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).route
/src/internal/clientconn/conn.go:525
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).run
/src/internal/clientconn/conn.go:316
github.com/FerretDB/FerretDB/internal/clientconn.acceptLoop.func1
/src/internal/clientconn/listener.go:305
2024-07-18T09:44:07.854Z ERROR // 172.19.0.1:50446 -> 172.19.0.3:27017 clientconn/conn.go:615 Response header: length: 0, id: 0, response_to: 0, opcode: OP_REPLY
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).logResponse
/src/internal/clientconn/conn.go:615
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).run
/src/internal/clientconn/conn.go:317
github.com/FerretDB/FerretDB/internal/clientconn.acceptLoop.func1
/src/internal/clientconn/listener.go:305
2024-07-18T09:44:07.854Z ERROR // 172.19.0.1:50446 -> 172.19.0.3:27017 clientconn/conn.go:616 Response message:
%!s()
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).logResponse
/src/internal/clientconn/conn.go:616
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).run
/src/internal/clientconn/conn.go:317
github.com/FerretDB/FerretDB/internal/clientconn.acceptLoop.func1
/src/internal/clientconn/listener.go:305
2024-07-18T09:44:07.854Z DPANIC // 172.19.0.1:50446 -> 172.19.0.3:27017 clientconn/conn.go:170 no response to send to client
(err = )
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).run.func3
/src/internal/clientconn/conn.go:170
runtime.gopanic
/usr/local/go/src/runtime/panic.go:770
github.com/FerretDB/FerretDB/internal/clientconn.(*conn).run
/src/internal/clientconn/conn.go:376
github.com/FerretDB/FerretDB/internal/clientconn.acceptLoop.func1
/src/internal/clientconn/listener.go:305
2024-07-18T09:44:07.854Z WARN listener clientconn/listener.go:310 Connection stopped {"conn": "172.19.0.1:50446 -> 172.19.0.3:27017", "error": "panic"}
What did you expect to see?
My .NET service can establish the connection with FerretDB then execute some mongo queries on the flight
What did you see instead?
Errors shown as above
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
JzhJay commentedon Jul 18, 2024
My C# Mongo Client driver is up to date: V2.27
Spoomer commentedon Aug 24, 2024
Hey,
I think mongodb changed something in the mongodb driver. On my machine after I updated the driver from 2.24 to 2.28 FerretDb gets an empty Username and can't connect to postgres. After downgrading the driver to 2.24 the error was gone. Maybe it's the same in your case. You can check the postgres logs if the auth fails because of an empty username or "ferretdb" (I think its now the ferretdb default if no username is provided) as user.
AlekSi commentedon Aug 26, 2024
We plan to fix this issue in the next release (planned for this week)
AlekSi commentedon Aug 28, 2024
v1.24.0 is out with the fix for that issue. Please let us know if it works for you.
Update FerretDB v1.24.0 (#307)