You are not logged in.
Pages: 1
I'm trying to connect to an Atlas MongoDB server using a simples authentication, but i got a error after when calling 'OpenAuth' method.
My code.
Client := TMongoClient.Create('shard00',27017);
DB := Client.OpenAuth('admin','usr','pass');
The error happens at this method:
procedure TMongoClient.AfterOpen;
begin
if VarIsEmptyOrNull(fServerBuildInfo) then begin
fConnections[0].RunCommand('admin','buildinfo',fServerBuildInfo);
with _Safe(fServerBuildInfo)^.A['versionArray']^ do
if Count=4 then
fServerBuildInfoNumber := // e.g. 2040900 for MongoDB 2.4.9
integer(Values[0])*1000000+integer(Values[1])*10000+
integer(Values[2])*100+integer(Values[3]);
end;
end;
I got the updated version
Error message: Server did reset the connection: probably due to a bad formatted BSON request -> close socket
Offline
Has anyone managed to find the cause of this problem?
if i connect without authentication it works, however if i connect using simple authentication it breaks.
Offline
I just fixed a protocol problem by https://synopse.info/fossil/info/0aba463a6d
But I still have issues with the authentication.
I guess something was also changed with MongoDB 4.x about default authentication parameters.
Investigating...
Edit: please check https://synopse.info/fossil/info/fd93a93e5e
Offline
Pages: 1