[GODRIVER-1311] Running v1.1.0+ against mongot doesn't work Created: 12/Sep/19  Updated: 28/Oct/23  Resolved: 03/Oct/19

Status: Closed
Project: Go Driver
Component/s: Connections
Affects Version/s: None
Fix Version/s: 1.1.2

Type: Bug Priority: Major - P3
Reporter: Tomer Yakir Assignee: Divjot Arora (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends

 Description   

v1.0.1 works fine.

Repro env:
1. mongod v4.2.0
2. mongot_0.1.4.319
3. macos 10.14.6
4. go version go1.11.6

When running the following code:

client, err := mongo.NewClient(options.Client().ApplyURI("mongodb://__system:p@localhost:27037/?authSource=local"))
    fmt.Println("1", err, version.Driver)
    if err != nil {
        panic(err)
    }
    ctx, _ := context.WithTimeout(context.Background(), 10*time.Second)
    err = client.Connect(ctx)
    fmt.Println("2", err)
    if err != nil {
        panic(err)
    }
    err = client.Ping(ctx, nil)
    fmt.Println("3", err)
    if err != nil {
        panic(err)
    }
    return client, err

it returns:

1 <nil> v1.1.1
2 <nil>
panic: connection() : auth error: sasl conversation error: unable to authenticate using mechanism "SCRAM-SHA-1": do not know how to handle OP_QUERY for non-commands



 Comments   
Comment by Githook User [ 03/Oct/19 ]

Author:

{'username': 'divjotarora', 'email': 'divjot.arora@10gen.com', 'name': 'Divjot Arora'}

Message: Store connection description before authenticating.

GODRIVER-1311

Change-Id: I04c1dfe730ef483d675a4fa01ca8c118f3ef69f0
Branch: release/1.1
https://github.com/mongodb/mongo-go-driver/commit/7cb4923129584cab2bc160c37eb056dc80c30776

Comment by Githook User [ 03/Oct/19 ]

Author:

{'name': 'Divjot Arora', 'username': 'divjotarora', 'email': 'divjot.arora@10gen.com'}

Message: Store connection description before authenticating.

GODRIVER-1311

Change-Id: I04c1dfe730ef483d675a4fa01ca8c118f3ef69f0
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/49b4bbb863ca71ed7f62b008bd4a1c8e7f69f67d

Comment by Divjot Arora (Inactive) [ 01/Oct/19 ]

CR: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/470022

Comment by Jeffrey Yemin [ 12/Sep/19 ]

So divjot.arora the thing to check for is whether we're sending saslStart using OP_QUERY rather than OP_MSG in the 1.1 driver

Comment by Jeffrey Yemin [ 12/Sep/19 ]

Hi tomer.yakir,

That error message, "do not know how to handle OP_QUERY for non-commands", is strange. What non-command would the driver be sending? Can you confirm that the message is accurate? Also, please share any server logs that would provide more context, as it's probably not trivial for us to spin up an instance of mongot.

Generated at Thu Feb 08 08:36:08 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.